Friday, April 04, 2008

Full-sized instant volume snapshots - method 2 : using empty volume

Full-sized instant volume snapshots - method 2 : using empty volume

1. find the required size for the snapshot volume.

#LEN=`vxprint -g datadg -F%len vol01`

2. find the name of the dco volume

#DCONAME=`vxprint -g datadg -F%dco_name vol01`

3. find the dco region size.

#RSZ=`vxprint -g datadg -F%regionsz $DCONAME`

4. Create a volume of the required size and redundancy

#vxassist -g datadg make snapvol01 $LEN init=active

5. To prepare the volume for snapshot operation
(to enable the fast resync using dco)

#vxsnap -g datadg prepare snapvol regionsize=$RSZ

6. create the snapshot using the empty volume.

#vxsnap -g datadg make source=vol01/snapvol=snapvol01

7. split the snapshot volume into a separate disk group

#vxdg split datadg offhostdg snapvol01

or

#vxdg -g datadg -o expand split datadg offhostdg snapvol01 snapvol02

8. deport the disk group

#vxdg deport offhostdg

9. import the disk group in remote host

(remote host)#vxdg import offhostdg

10. recover the disk group

(remote host)#vxdg -g offhostdg -sb

11. XXX Perform off-host processing XXX
fsck and mount, etc.....

12. deport the disk group

(remote host)#vxdg deport offhostdg

13. import back on the local host.

#vxdg import offhostdg

14. join the disk group

#vxdg join offhostdg datadg

15. Recover the disk group.

#vxrecover -sb

if the volume still in disabled state, then start it.

#vxvol -g datadg start vol01

16. update the snapshot volume
(refreshing the volume will sync the changed block from vol01 to
snapvol01)


#vxsnap -g datadg refresh snapvol01

or

#vxsnap -g datadg refresh snapvol01 source=vol01

17. If full resync of the volume is needed, then a reattach is required.

#vxsnap -g datadg reattach snapvol01 source=vol01

18. remove the snapshot volume if not required anymore.

#vxedit -g datadg -rf rm snapvol01

No comments: