VXVM Volume Recover

Tuesday, September 1, 2009 at 4:01 AM
1. Restore the VERITAS Volume Manager (tm) information to the failed disk. From the vxdisk list output:

# vxdisk list
- - oracled04 oracledg failed was:c1t12d0s2
- - oracled03 oracledg failed was:c1t13d0s2

2. Use the vxdiskadm utility to remove and replace the failed drive:

# vxdiskadm
Choose item no. 4 to 'Remove a disk for replacement'.
Note: The data in the public region will not be lost.
Choose item no. 5 'Replace a failed or removed disk'.
Note: Re-initialize the disk only to restore Volume Manager information to the private region.
After running items 4 and 5, the vxdisk list output should be similar to the following output:

# vxdisk list
c1t12d0s2 sliced oracled04 oracledg online
c1t13d0s2 sliced oracled03 oracledg online
c1t14d0s2 sliced oracled02 oracledg online
c1t15d0s2 sliced oracled01 oracledg online


3. Recover the volume by performing the following:

# vxprint -htg testdg

dm testdg01 c1t12d0s2 sliced 2179 8920560
dm testdg02 c1t13d0s2 sliced 2179 8920560
dm testdg03 c1t14d0s2 sliced 2179 8920560

v testvol - ENABLED ACTIVE 204800 SELECT -
pl testvol-03 testvol ENABLED ACTIVE 204864 STRIPE - RW
sv testvol-S01 testvol-03 testvol-L01 1 102460 0/0 ENA
sv testvol-S02 testvol-03 testvol-L02 1 102460 1/0 ENA

v testvol-L01 - DISABLED ACTIVE 204800 SELECT -
pl testvol-P01 testvol-L01 DISABLED RECOVER 204864 CONCAT - RW
sd oracled01-02 testvol-P01 oracled01 0 102460 c1t13d0 ENA
pl testvol-P02 testvol-L01 DISABLED RECOVER 204864 CONCAT - RW
sd testdg01-01 testvol-P02 oracled03 0 102460 c1t12d0 ENA

v testvol-L02 - ENABLED ACTIVE 204800 SELECT -
pl testvol-P03 testvol-L02 ENABLED ACTIVE 204864 CONCAT - RW
sd oracled02-02 testvol-P03 oracled02 0 102460 c1t13d0 ENA
pl testvol-P04 testvol-L02 ENABLED ACTIVE 204864 CONCAT - RW
sd oracled04-02 testvol-P04 oracled04 0 102460 c1t12d0 ENA


# vxmend -o force off testvol-P01
# vxmend -o force off testvol-P02
# vxmend on testvol-P01
# vxmend on testvol-P02

Note: This changes the plex state from RECOVER to STALE:

# vxprint -htg testdg
dm testdg01 c1t12d0s2 sliced 2179 8920560
dm testdg02 c1t13d0s2 sliced 2179 8920560
dm testdg03 c1t14d0s2 sliced 2179 8920560

v testvol - ENABLED ACTIVE 204800 SELECT -
pl testvol-03 testvol ENABLED ACTIVE 204864 STRIPE - RW
sv testvol-S01 testvol-03 testvol-L01 1 102460 0/0 ENA
sv testvol-S02 testvol-03 testvol-L02 1 102460 1/0 ENA

v testvol-L01 - DISABLED ACTIVE 204800 SELECT -
pl testvol-P01 testvol-L01 DISABLED STALE 204864 CONCAT - RW
sd oracled01-02 testvol-P01 oracled01 0 102460 c1t13d0 ENA
pl testvol-P02 testvol-L01 DISABLED STALE 204864 CONCAT - RW
sd testdg01-01 testvol-P02 oracled03 0 102460 c1t12d0 ENA

v testvol-L02 - ENABLED ACTIVE 204800 SELECT -
pl testvol-P03 testvol-L02 ENABLED ACTIVE 204864 CONCAT - RW
sd oracled02-02 testvol-P03 oracled02 0 102460 c1t13d0 ENA
pl testvol-P04 testvol-L02 ENABLED ACTIVE 204864 CONCAT - RW
sd oracled04-02 testvol-P04 oracled04 0 102460 c1t12d0 ENA

# vxmend fix clean testvol-P01
# vxmend fix clean testvol-P02

Note: This puts the plex in CLEAN state:
# vxprint -htg testdg
dm testdg01 c1t12d0s2 sliced 2179 8920560
dm testdg02 c1t13d0s2 sliced 2179 8920560
dm testdg03 c1t14d0s2 sliced 2179 8920560

v testvol - ENABLED ACTIVE 204800 SELECT -
pl testvol-03 testvol ENABLED ACTIVE 204864 STRIPE - RW
sv testvol-S01 testvol-03 testvol-L01 1 102460 0/0 ENA
sv testvol-S02 testvol-03 testvol-L02 1 102460 1/0 ENA

v testvol-L01 - DISABLED ACTIVE 204800 SELECT -
pl testvol-P01 testvol-L01 DISABLED CLEAN 204864 CONCAT - RW
sd oracled01-02 testvol-P01 oracled01 0 102460 c1t13d0 ENA
pl testvol-P02 testvol-L01 DISABLED CLEAN 204864 CONCAT - RW
sd testdg01-01 testvol-P02 oracled03 0 102460 c1t12d0 ENA

v testvol-L02 - ENABLED ACTIVE 204800 SELECT -
pl testvol-P03 testvol-L02 ENABLED ACTIVE 204864 CONCAT - RW
sd oracled02-02 testvol-P03 oracled02 0 102460 c1t13d0 ENA
pl testvol-P04 testvol-L02 ENABLED ACTIVE 204864 CONCAT - RW
sd oracled04-02 testvol-P04 oracled04 0 102460 c1t12d0 ENA

# vxvol start testvol-L01

Note: In the case where the plex state does not switch to
CLEAN state, that plex can be disassociated in"DISABLED STALE" state. After disassociating the plex, the "DISABLED CLEAN" that is left within the volume can be started using the vxvol utility. Once the volume is "ENABLED ACTIVE", just re-attach the disassociated plex and this will automatically be synced with the GOOD plex.

4. Run a file system utility check and mount the file system. Below is the command for 'vxfs' file system:
# fsck -F vxfs /dev/vx/rdsk/testdg/testvol
Note: The file system is clean - log replay is not required
# mount -F vxfs /dev/vx/dsk/testdg/testvol /testvol
# df -k /testvol
File system kbytes used avail capacity mounted on
/dev/vx/dsk/testdg/testvol
44429208 39734216 4658376 90% /testvol

0 comments

Post a Comment

Solaris | Powered by Blogger | Entries (RSS) | Comments (RSS) | Designed by MB Web Design | XML Coded By Cahayabiru.com