VXVM(VERITAS VOLUME MANAGER TRAINING) 10 OF 12
In this post, we are going to see traditional mirror break-off snapshot.To perform this snapshot ,we need free space equal to volume size on the diskgroup.It typically perform the volume mirror and it will make the new plex as snapshot volume for backup operations.
High Level plan for backup of database volume using third-mirror break-off:
1.Prepare the volume for snapshot.
2.Add a mirror using the vxassist or vxsnap
3.Make the snapshot and break it from volume.
4.Mount the volume and perform the backup.
We can perform the third-mirror break-off snapshot in two ways.
1.Using vxassist
2.Using vxsnap
Traditional third-mirror break-off snapshots
v oravol1 - ENABLED ACTIVE 204800 SELECT - fsgen
pl oravol1-01 oravol1 ENABLED ACTIVE 204800 CONCAT - RW
sd UXDISK1-01 oravol1-01 UXDISK1 0 143056 0 disk_0 ENA
sd UXDISK2-01 oravol1-01 UXDISK2 0 61744 143056 disk_1 ENA
1.Create the mirror plex
By end of this work, you can see the new plex created and its state in SNAPDONE
#vxassist -g UXDG snapstart oravol1
#vxprint -hvt
Disk group: UXDG
v oravol1 - ENABLED ACTIVE 204800 SELECT - fsgen
pl oravol1-01 oravol1 ENABLED ACTIVE 204800 CONCAT - RW
sd UXDISK1-01 oravol1-01 UXDISK1 0 143056 0 disk_0 ENA
sd UXDISK2-01 oravol1-01 UXDISK2 0 61744 143056 disk_1 ENA
pl oravol1-02 oravol1 ENABLED SNAPDONE 204800 CONCAT - WO
sd UXDISK3-01 oravol1-02 UXDISK3 0 143056 0 disk_4 ENA
sd UXDISK4-01 oravol1-02 UXDISK4 0 61744 143056 disk_5 ENA
This step will break the mirror plex in to separate volume.So that we can mount it in different mount point and backup can be performed without touching the actual database volume. (oravol1)
#vxassist -g UXDG snapshot oravol1
#vxprint -hvt
Disk group: UXDG
v SNAP-oravol1 - ENABLED ACTIVE 204800 ROUND - fsgen
pl oravol1-02 SNAP-oravol1 ENABLED ACTIVE 204800 CONCAT - RW
sd UXDISK3-01 oravol1-02 UXDISK3 0 143056 0 disk_4 ENA
sd UXDISK4-01 oravol1-02 UXDISK4 0 61744 143056 disk_5 ENA
v oravol1 - ENABLED ACTIVE 204800 SELECT - fsgen
pl oravol1-01 oravol1 ENABLED ACTIVE 204800 CONCAT - RW
sd UXDISK1-01 oravol1-01 UXDISK1 0 143056 0 disk_0 ENA
sd UXDISK2-01 oravol1-01 UXDISK2 0 61744 143056 disk_1 ENA
# mount -F vxfs /dev/vx/dsk/UXDG/SNAP-oravol1 /snaporavol1/
bash-3.00# df -h /snaporavol1/
Filesystem size used avail capacity Mounted on
/dev/vx/dsk/UXDG/SNAP-oravol1 100M 74M 24M 76% /snaporavol1
By doing this , SNAP-oravol1 will become individual volume.
# vxassist -g UXDG snapclear SNAP-oravol1
#vxassist -g UXDG snapback SNAP-oravol1
#vxprint -hvt
Disk group: UXDG
v oravol1 - ENABLED ACTIVE 204800 SELECT - fsgen
pl oravol1-01 oravol1 ENABLED ACTIVE 204800 CONCAT - RW
sd UXDISK1-01 oravol1-01 UXDISK1 0 143056 0 disk_0 ENA
sd UXDISK2-01 oravol1-01 UXDISK2 0 61744 143056 disk_1 ENA
pl oravol1-02 oravol1 ENABLED SNAPDONE 204800 CONCAT - WO
sd UXDISK3-01 oravol1-02 UXDISK3 0 143056 0 disk_4 ENA
sd UXDISK4-01 oravol1-02 UXDISK4 0 61744 143056 disk_5 ENA
# vxassist -g UXDG -o resyncfromreplica snapback SNAP-oravol1
This process will overwrite the volume using the snapshot data.
# vxsnap -g UXDG prepare oravol1 ndcomirs=2 drl=off
bash-3.00# vxprint -hvt
Disk group: UXDG
v oravol1 - ENABLED ACTIVE 204800 SELECT - fsgen
pl oravol1-01 oravol1 ENABLED ACTIVE 204800 CONCAT - RW
sd UXDISK1-01 oravol1-01 UXDISK1 0 143056 0 disk_0 ENA
sd UXDISK2-01 oravol1-01 UXDISK2 0 61744 143056 disk_1 ENA
dc oravol1_dco oravol1 oravol1_dcl
v oravol1_dcl - ENABLED ACTIVE 67840 SELECT - gen
pl oravol1_dcl-01 oravol1_dcl ENABLED ACTIVE 67840 CONCAT - RW
sd UXDISK3-01 oravol1_dcl-01 UXDISK3 0 67840 0 disk_4 ENA
pl oravol1_dcl-02 oravol1_dcl ENABLED ACTIVE 67840 CONCAT - RW
sd UXDISK4-01 oravol1_dcl-02 UXDISK4 0 67840 0 disk_5 ENA
#vxsnap -b -g UXDG addmir oravol1
#vxprint -hvt
Disk group: UXDG
v oravol1 - ENABLED ACTIVE 204800 SELECT - fsgen
pl oravol1-01 oravol1 ENABLED ACTIVE 204800 CONCAT - RW
sd UXDISK1-01 oravol1-01 UXDISK1 0 143056 0 disk_0 ENA
sd UXDISK2-01 oravol1-01 UXDISK2 0 61744 143056 disk_1 ENA
pl oravol1-02 oravol1 ENABLED SNAPATT 204800 CONCAT - WO
sd UXDISK6-01 oravol1-02 UXDISK6 0 204800 0 disk_7 ENA
dc oravol1_dco oravol1 oravol1_dcl
v oravol1_dcl - ENABLED ACTIVE 67840 SELECT - gen
pl oravol1_dcl-01 oravol1_dcl ENABLED ACTIVE 67840 CONCAT - RW
sd UXDISK3-01 oravol1_dcl-01 UXDISK3 0 67840 0 disk_4 ENA
pl oravol1_dcl-02 oravol1_dcl ENABLED ACTIVE 67840 CONCAT - RW
sd UXDISK4-01 oravol1_dcl-02 UXDISK4 0 67840 0 disk_5 ENA
pl oravol1_dcl-03 oravol1_dcl DISABLED DCOSNP 67840 CONCAT - RW
sd UXDISK6-02 oravol1_dcl-03 UXDISK6 204800 67840 0 disk_7 ENA
sp oravol1_cpmap oravol1 oravol1_dco
#vxsnap -g UXDG snapwait oravol1
Snapshot ready on volume oravol1
#vxprint -hvt
Disk group: UXDG
v oravol1 - ENABLED ACTIVE 204800 SELECT - fsgen
pl oravol1-01 oravol1 ENABLED ACTIVE 204800 CONCAT - RW
sd UXDISK1-01 oravol1-01 UXDISK1 0 143056 0 disk_0 ENA
sd UXDISK2-01 oravol1-01 UXDISK2 0 61744 143056 disk_1 ENA
pl oravol1-02 oravol1 ENABLED SNAPDONE 204800 CONCAT - WO
sd UXDISK6-01 oravol1-02 UXDISK6 0 204800 0 disk_7 ENA
dc oravol1_dco oravol1 oravol1_dcl
v oravol1_dcl - ENABLED ACTIVE 67840 SELECT - gen
pl oravol1_dcl-01 oravol1_dcl ENABLED ACTIVE 67840 CONCAT - RW
sd UXDISK3-01 oravol1_dcl-01 UXDISK3 0 67840 0 disk_4 ENA
pl oravol1_dcl-02 oravol1_dcl ENABLED ACTIVE 67840 CONCAT - RW
sd UXDISK4-01 oravol1_dcl-02 UXDISK4 0 67840 0 disk_5 ENA
pl oravol1_dcl-03 oravol1_dcl DISABLED DCOSNP 67840 CONCAT - RW
sd UXDISK6-02 oravol1_dcl-03 UXDISK6 204800 67840 0 disk_7 ENA
#vxsnap -g UXDG make source=oravol1/newvol=snaporavol1/nmirror=1
#vxprint -hvt
Disk group: UXDG
v oravol1 - ENABLED ACTIVE 204800 SELECT - fsgen
pl oravol1-01 oravol1 ENABLED ACTIVE 204800 CONCAT - RW
sd UXDISK1-01 oravol1-01 UXDISK1 0 143056 0 disk_0 ENA
sd UXDISK2-01 oravol1-01 UXDISK2 0 61744 143056 disk_1 ENA
dc oravol1_dco oravol1 oravol1_dcl
v oravol1_dcl - ENABLED ACTIVE 67840 SELECT - gen
pl oravol1_dcl-01 oravol1_dcl ENABLED ACTIVE 67840 CONCAT - RW
sd UXDISK3-01 oravol1_dcl-01 UXDISK3 0 67840 0 disk_4 ENA
pl oravol1_dcl-02 oravol1_dcl ENABLED ACTIVE 67840 CONCAT - RW
sd UXDISK4-01 oravol1_dcl-02 UXDISK4 0 67840 0 disk_5 ENA
sp snaporavol1_snp oravol1 oravol1_dco
v snaporavol1 - ENABLED ACTIVE 204800 ROUND - fsgen
pl oravol1-02 snaporavol1 ENABLED ACTIVE 204800 CONCAT - RW
sd UXDISK6-01 oravol1-02 UXDISK6 0 204800 0 disk_7 ENA
dc snaporavol1_dco snaporavol1 snaporavol1_dcl
v snaporavol1_dcl - ENABLED ACTIVE 67840 ROUND - gen
pl oravol1_dcl-03 snaporavol1_dcl ENABLED ACTIVE 67840 CONCAT - RW
sd UXDISK6-02 oravol1_dcl-03 UXDISK6 204800 67840 0 disk_7 ENA
sp oravol1_snp snaporavol1 snaporavol1_dco
4.Mount the snapshot volume and perform the backup:
# mount -F vxfs /dev/vx/dsk/UXDG/snaporavol1 /snaporavol1/
# df -h /snaporavol1/
Filesystem size used avail capacity Mounted on
/dev/vx/dsk/UXDG/snaporavol1 100M 74M 24M 76% /snaporavol1
Kunal Raykar says
Hi Lingeshwaran,
Thanks for this post. Just I would like to know which is best vxassist or using vsnap. If both are best then can you please suggest, which one to use in which condition.
Lingeswaran R says
Using “vxsnap” will save your time.
Kunal Raykar says
Thanks a lot..