lost all SAN disks and need to recreate the old DGs with all their volumes

Article:TECH62104  |  Created: 2008-01-29  |  Updated: 2010-01-10  |  Article URL http://www.symantec.com/docs/TECH62104
Article Type
Technical Solution


Environment

Issue



lost all SAN disks and need to recreate the old DGs with all their volumes

Solution



In this kind of situation the best thing to do is looking at /etc/vx/cbr/bk directory for a valid Disk Group configuration to use for our DG rebuild.
I'm assuming we are in front of a new SAN Luns and no one of them has a valid private region.
I'll write first all the steps needed for the DG rebuild process then I comment it.

1. Look for a valid configuration copy

root@blender# cd /etc/vx/cbr/bk
root@blender# ls
davisdg.1203334206.85.blender dgvcs01.1196267101.24.blender gabridg.1207566079.55.blender repodg.1200651788.26.blender
dg01.1196264827.21.pegasus dgvcs02.1196351295.27.pegasus ivandg.1212931022.78.blender rootdg.1215858349.23.blender

2. Check the DG layout is the one we want to recover (let's start with ivandg)
Since we are working with SF5.0 we have only one configuration copy available

[root@blender]$ cat ivandg.1212931022.78.blender/*cfgrec | vxprint -D - -h
Disk group: ivandg

TY NAME ASSOC KSTATE LENGTH PLOFFS STATE TUTIL0 PUTIL0
dg ivandg ivandg - - - - - -

dm ivandg01 c2t4d0s2 - 143567056 - - - -
dm ivandg03 c2t6d0s2 - 143546448 - - - -
dm ivandg04 c3t3d0s2 - 143567056 - - - -

sd ivandg01-02 - ENABLED 544 - - - -

v ivanvol01 fsgen ENABLED 10690560 - ACTIVE - -
pl ivanvol01-01 ivanvol01 ENABLED 10690560 - ACTIVE - -
sd ivandg01-01 ivanvol01-01 ENABLED 204800 0 - - -
sd ivandg01-03 ivanvol01-01 ENABLED 10485760 204800 - - -

v voltest fsgen ENABLED 204800 - ACTIVE - -
pl voltest-01 voltest ENABLED 204800 - ACTIVE - -
sd ivandg03-01 voltest-01 ENABLED 204800 0 - - -
pl voltest-02 voltest ENABLED 204800 - ACTIVE - -
sd ivandg01-04 voltest-02 ENABLED 204800 0 - - -


3. Get the disk name (not the device name) of each Lun of our DG and put it somewhere. We will have to call the disks of the DG to initialize with the same names otherwise the vxmake command we use later on will complain.

[root@blender]$ cat ivandg.1212931022.78.blender/*cfgrec | vxprint -D - -d | awk '/dm/ {print $2}' | tee /tmp/ivandg.disks # /tmp/ivandg.disks will contain the disk names
ivandg01
ivandg03
ivandg04

4. Create the vxmake script we will use to rebuild the ivandg structure once it's been created

[root@blender]$ cat ivandg.1212931022.78.blender/*cfgrec | vxprint -D - -mvphrs >/tmp/ivandg.make

To recall the vxprint options for the vxmake script I use to remind myself the mv unix command plus the phrase word plosives "phrs" ;-)


5. Initialize as many disks as the old DG ivandg had. To make the procedure sense we are assuming that the new Luns are exactly the same size of the old ones and the disks of our last DGs have been initialized without any specific private region size.

[root@blender]$ vxdisk list
DEVICE TYPE DISK GROUP STATUS
c1t0d0s2 auto:sliced rootdisk rootdg online
c1t1d0s2 auto:sliced - - online
c4t1d0s2 auto:none - - online invalid
c4t3d0s2 auto:none - - online invalid
c4t4d0s2 auto:none - - online invalid
c4t5d0s2 auto:none - - online invalid
c4t6d0s2 auto:none - - online invalid
c5t1d0s2 auto:none - - online invalid
c5t2d0s2 auto:none - - online invalid
c5t3d0s2 auto:none - - online invalid
c5t4d0s2 auto:none - - online invalid
c5t5d0s2 auto:none - - online invalid
c5t6d0s2 auto:none - - online invalid
[root@blender]$ vxdisk init c4t1d0s2
[root@blender]$ vxdisk init c4t3d0s2
[root@blender]$ vxdisk init c4t4d0s2

6. Create the new ivandg Disk Group taking care of giving the disks the same disks names of the old ones

[root@blender]$ # vxdg init ivandg ivandg01=c4t1d0s2 ivandg03=c4t3d0s2 ivandg04=c4t4d0s2

7. Rebuild the DG ivandg using the vxmake script

[root@blender]$ vxmake -g ivandg -d /tmp/ivandg.make

8. Check the new ivandg layout

[root@blender]$ vxprint -thg ivandg
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 ivandg default default 60000 1212931022.78.blender

dm ivandg01 c4t4d0s2 auto 65536 143567056 -
dm ivandg03 c4t6d0s2 auto 86144 143546448 -
dm ivandg04 c5t3d0s2 auto 65536 143567056 -

sd ivandg01-02 - ivandg01 204800 544 - c4t4d0 ENA

v ivanvol01 - DISABLED EMPTY 10690560 SELECT - fsgen
pl ivanvol01-01 ivanvol01 DISABLED ACTIVE 10690560 CONCAT - RW
sd ivandg01-01 ivanvol01-01 ivandg01 0 204800 0 c4t4d0 ENA
sd ivandg01-03 ivanvol01-01 ivandg01 205344 10485760 204800 c4t4d0 ENA

v voltest - DISABLED EMPTY 204800 SELECT - fsgen
pl voltest-01 voltest DISABLED ACTIVE 204800 CONCAT - RW
sd ivandg03-01 voltest-01 ivandg03 0 204800 0 c4t6d0 ENA
pl voltest-02 voltest DISABLED ACTIVE 204800 CONCAT - RW
sd ivandg01-04 voltest-02 ivandg01 10691104 204800 0 c4t4d0 ENA

9. Start the EMPY volumes

vxrecover -g ivandg -bsE

10. Check all volumes have been started correctly

[root@blender]$ vxprint -thg ivandg
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 ivandg default default 60000 1212931022.78.blender

dm ivandg01 c4t4d0s2 auto 65536 143567056 -
dm ivandg03 c4t6d0s2 auto 86144 143546448 -
dm ivandg04 c5t3d0s2 auto 65536 143567056 -

sd ivandg01-02 - ivandg01 204800 544 - c4t4d0 ENA

v ivanvol01 - ENABLED ACTIVE 10690560 SELECT - fsgen
pl ivanvol01-01 ivanvol01 ENABLED ACTIVE 10690560 CONCAT - RW
sd ivandg01-01 ivanvol01-01 ivandg01 0 204800 0 c4t4d0 ENA
sd ivandg01-03 ivanvol01-01 ivandg01 205344 10485760 204800 c4t4d0 ENA

v voltest - ENABLED ACTIVE 204800 SELECT - fsgen
pl voltest-01 voltest ENABLED ACTIVE 204800 CONCAT - RW
sd ivandg03-01 voltest-01 ivandg03 0 204800 0 c4t6d0 ENA
pl voltest-02 voltest ENABLED ACTIVE 204800 CONCAT - RW
sd ivandg01-04 voltest-02 ivandg01 10691104 204800 0 c4t4d0 ENA

At this stage the customer will be able to create his filesystems on the volumes and restore from a backup his files.


Legacy ID



306819


Article URL http://www.symantec.com/docs/TECH62104


Terms of use for this information are found in Legal Notices