=========================================================================================
This example shows how to disable the disk group and then bring it back to enabled state:
=========================================================================================
login as: root
root@10.12.5.103's password:
Last login: Tue Jan 05 21:57:16 2014 from 192.168.2.10
Check the current state of disks and DG:
=======================================
[root@server1 ~]#
[root@server1 ~]# vxdisk -o alldgs list
DEVICE TYPE DISK GROUP STATUS
emc0_dd1 auto:cdsdisk appdg01 appdg online
emc0_dd2 auto:cdsdisk - - online
emc0_dd3 auto:cdsdisk - - online
emc0_dd4 auto:cdsdisk - - online
emc0_dd5 auto:none - - online invalid
emc0_dd6 auto:none - - online invalid
emc0_dd7 auto:none - - online invalid
emc0_dd8 auto:none - - online invalid
emc0_dd9 auto:none - - online invalid
emc0_d10 auto:none - - online invalid
emc0_d11 auto:none - - online invalid
emc0_d12 auto:none - - online invalid
sda auto:none - - online invalid
sdb auto:none - - online invalid
[root@server1 ~]#
[root@server1 ~]#
[root@server1 ~]# // make volume
[root@server1 ~]#
[root@server1 ~]#
Create a volume:
================
[root@server1 ~]# vxassist -g appdg make appvol 1g
[root@server1 ~]#
Check the volume and DG configuration:
======================================
[root@server1 ~]# vxprint -g appdg -htu h
DG NAME NCONFIG NLOG MINORS GROUP-ID
ST NAME STATE DM_CNT SPARE_CNT APPVOL_CNT
DM NAME DEVICE TYPE PRIVLEN PUBLEN STATE
RV NAME RLINK_CNT KSTATE STATE PRIMARY DATAVOLS SRL
RL NAME RVG KSTATE STATE REM_HOST REM_DG REM_RLNK
CO NAME CACHEVOL KSTATE STATE
VT NAME RVG KSTATE STATE NVOLUME
V NAME RVG/VSET/CO KSTATE STATE LENGTH READPOL PREFPLEX UTYPE
PL NAME VOLUME KSTATE STATE LENGTH LAYOUT NCOL/WID MODE
SD NAME PLEX DISK DISKOFFS LENGTH [COL/]OFF DEVICE MODE
SV NAME PLEX VOLNAME NVOLLAYR LENGTH [COL/]OFF AM/NM MODE
SC NAME PLEX CACHE DISKOFFS LENGTH [COL/]OFF DEVICE MODE
DC NAME PARENTVOL LOGVOL
SP NAME SNAPVOL DCO
EX NAME ASSOC VC PERMS MODE STATE
SR NAME KSTATE
dg appdg default default 11000 1422448584.34.sym1
dm appdg01 emc0_dd1 auto 32.00m 1.96g -
v appvol - ENABLED ACTIVE 1.00g SELECT - fsgen
pl appvol-01 appvol ENABLED ACTIVE 1.00g CONCAT - RW
sd appdg01-01 appvol-01 appdg01 0.00 1.00g 0.00 emc0_dd1 ENA
Create a file system:
=====================
[root@server1 ~]# mkfs -t vxfs /dev/vx/rdsk/appdg/appvol
version 9 layout
2097152 sectors, 1048576 blocks of size 1024, log size 16384 blocks
rcq size 1024 blocks
largefiles supported
Mount the file system:
=====================
[root@server1 ~]# df -k
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/sda1 21225712 4676320 15453764 24% /
mgt:/student1 21225728 6176640 13953472 31% /student1
[root@server1 ~]# mount -t vxfs /dev/vx/dsk/appdg/appvol /app
[root@server1 ~]#
[root@server1 ~]#
[root@server1 ~]#
[root@server1 ~]# df -k
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/sda1 21225712 4676324 15453760 24% /
mgt:/student1 21225728 6176640 13953472 31% /student1
/dev/vx/dsk/appdg/appvol
1048576 18773 965448 2% /app
Copy some files inside the file system:
======================================
[root@server1 ~]# cp -r /etc/default /app
[root@server1 ~]#
[root@server1 ~]# cd /apps
[root@server1 app]# ls -l
total 0
drwxr-xr-x 2 root root 96 Jan 29 01:21 default
drwxr-xr-x 2 root root 96 Jan 29 01:20 lost+found
[root@server1 app]#
[root@server1 app]#
Check the DG status and find out the path of devices, which is inside DG:
=========================================================================
[root@server1 /]# vxdg list
NAME STATE ID
appdg enabled,cds 1422448584.34.sym1
[root@server1 /]#
[root@server1 /]#
[root@server1 /]# vxdisk -eo alldgs list
DEVICE TYPE DISK GROUP STATUS OS_NATIVE_NAME ATTR
emc0_dd1 auto:cdsdisk appdg01 appdg online sdc lun
emc0_dd2 auto:cdsdisk - - online sde lun
emc0_dd3 auto:cdsdisk - - online sdg lun
emc0_dd4 auto:cdsdisk - - online sdi lun
emc0_dd5 auto:none - - online invalid sdk lun
emc0_dd6 auto:none - - online invalid sdm lun
emc0_dd7 auto:none - - online invalid sdo lun
emc0_dd8 auto:none - - online invalid sdq lun
emc0_dd9 auto:none - - online invalid sds lun
emc0_d10 auto:none - - online invalid sdu lun
emc0_d11 auto:none - - online invalid sdw lun
emc0_d12 auto:none - - online invalid sdy lun
sda auto:none - - online invalid sda -
sdb auto:none - - online invalid sdb -
[root@server1 /]#
Disable the DG by disabling device paths:
========================================
[root@server1 /]# /sbin/vxdmpadm -f disable path=sdc
[root@server1 /]# /sbin/vxdmpadm -f disable path=sdd
[root@server1 /]#
[root@server1 /]# dd if=/dev/zero of=/app/testfile bs=1024 count=100
Check the DG status:
====================
[root@server1 /]# vxdg list
NAME STATE ID
appdg disabled 1422448584.34.sym1
[root@server1 /]# vxdisk -o alldgs list
DEVICE TYPE DISK GROUP STATUS
emc0_dd1 auto:cdsdisk appdg01 appdg online dgdisabled <-----
emc0_dd2 auto:cdsdisk - - online
emc0_dd3 auto:cdsdisk - - online
emc0_dd4 auto:cdsdisk - - online
emc0_dd5 auto:none - - online invalid
emc0_dd6 auto:none - - online invalid
emc0_dd7 auto:none - - online invalid
emc0_dd8 auto:none - - online invalid
emc0_dd9 auto:none - - online invalid
emc0_d10 auto:none - - online invalid
emc0_d11 auto:none - - online invalid
emc0_d12 auto:none - - online invalid
sda auto:none - - online invalid
sdb auto:none - - online invalid
[root@server1 /]# df -k /app
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/vx/dsk/appdg/appvol
1048576 18877 965349 2% /app
[root@server1 /]#
[root@server1 /]#
[root@server1 /]#
[root@server1 /]# cd /app
[root@server1 app]# ls -l
total 100
drwxr-xr-x 2 root root 96 Jan 29 01:21 default
drwxr-xr-x 2 root root 96 Jan 29 01:20 lost+found
-rw-r--r-- 1 root root 102400 Jan 29 01:24 testfile
[root@server1 app]#
Unmount the file system and deport the DG:
=========================================
[root@server1 /]# umount /app
[root@server1 /]#
[root@server1 /]# vxdg deport appdg
Try importing the DG, but this will fail:
========================================
[root@server1 /]# vxdg import appdg
VxVM vxdg ERROR V-5-1-10978 Disk group appdg: import failed:
No valid disk found containing disk group
Check the disk status, which shows error:
=========================================
[root@server1 /]# vxdisk -o alldgs list
DEVICE TYPE DISK GROUP STATUS
emc0_dd1 auto - - error <-----
emc0_dd2 auto:cdsdisk - - online
emc0_dd3 auto:cdsdisk - - online
emc0_dd4 auto:cdsdisk - - online
emc0_dd5 auto:none - - online invalid
emc0_dd6 auto:none - - online invalid
emc0_dd7 auto:none - - online invalid
emc0_dd8 auto:none - - online invalid
emc0_dd9 auto:none - - online invalid
emc0_d10 auto:none - - online invalid
emc0_d11 auto:none - - online invalid
emc0_d12 auto:none - - online invalid
sda auto:none - - online invalid
sdb auto:none - - online invalid
[root@server1 /]#
List down the DG, but it will show no output:
============================================
[root@server1 /]# vxdg list
NAME STATE ID
Bring back the DG in imported state as follows:
==============================================
Firstly enable the device paths, to get the device in online status:
===================================================================
[root@server1 /]# /sbin/vxdmpadm -f enable path=sdc
[root@server1 /]# /sbin/vxdmpadm -f enable path=sdd
[root@server1 /]#
[root@server1 /]#
Check whether device has come online:
=====================================
[root@server1 /]# vxdisk -o alldgs list
DEVICE TYPE DISK GROUP STATUS
emc0_dd1 auto:cdsdisk - (appdg) online <-----
emc0_dd2 auto:cdsdisk - - online
emc0_dd3 auto:cdsdisk - - online
emc0_dd4 auto:cdsdisk - - online
emc0_dd5 auto:none - - online invalid
emc0_dd6 auto:none - - online invalid
emc0_dd7 auto:none - - online invalid
emc0_dd8 auto:none - - online invalid
emc0_dd9 auto:none - - online invalid
emc0_d10 auto:none - - online invalid
emc0_d11 auto:none - - online invalid
emc0_d12 auto:none - - online invalid
sda auto:none - - online invalid
sdb auto:none - - online invalid
Import the DG now:
==================
[root@server1 /]# vxdg list
NAME STATE ID
[root@server1 /]#
[root@server1 /]#
[root@server1 /]# vxdg import appdg
[root@server1 /]#
[root@server1 /]#
[root@server1 /]#
[root@server1 /]# vxdg list
NAME STATE ID
appdg enabled,cds 1422448584.34.sym1
Mount the file system:
=====================
[root@server1 app]# mount -t vxfs /dev/vx/dsk/appdg/appvol /app
log replay in progress
replay complete - marking super-block as CLEAN
[root@server1 app]# df -k
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/sda1 21225712 4676632 15453452 24% /
mgt:/student1 21225728 6176640 13953472 31% /student1
/dev/vx/dsk/appdg/appvol
1048576 18877 965349 2% /app
[root@server1 app]# cd /app
[root@server1 app]# ls -l
total 100
drwxr-xr-x 2 root root 96 Jan 29 01:21 default
drwxr-xr-x 2 root root 96 Jan 29 01:20 lost+found
-rw-r--r-- 1 root root 102400 Jan 29 01:24 testfile
Unmount the file system and destroy the DG:
=========================================
[root@server1 /]# umount /app
[root@server1 /]#
[root@server1 /]#
[root@server1 /]# df -k
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/sda1 21225712 4676636 15453448 24% /
tmpfs 1029756 0 1029756 0% /dev/shm
tmpfs 4 0 4 0% /dev/vx
mgt:/student 21225728 6176640 13953472 31% /student
[root@server1 /]#
[root@server1 /]#
[root@server1 /]# vxdg destroy appdg
No comments:
Post a Comment