Wednesday, March 4, 2009

Veritas Disk Group Copying and Splitting

Before you attempt this I would ensure that you have a license for the Fast Resync option, otherwise the split command in step 6 won't work. Also I would suggest testing this before using in any kind of production environment. If you want split up a disk group like a high school kegger, do this:

1. Add mirror plexs to the volumes you wish to move in the disk group. Make sure that the physical volume(the actual disk) you add the mirrored plex(es) to does not contain any information other than plex(es) you wish to move.

vxassist -g dgname mirror volname newdisk1

2. Once the mirroring is complete (which can be done in advance) umount and stop the veritas volume(s):

umount /filesystem vxvol -g dgname stop volname

3. Disassociate the Mirrored plex(es) from all the unmounted filesystem(s):

vxplex -g dgname dis plex_name

4. Modify the disassociated mirrored plex(es) to become their own volume(s)

vxpplex –g dgname dis plex_name vxmake –g dgname –U fsgen vol new_volname plex=plex_name

5. At this point if you want to verify that the volume you just created is ok you can mount it up (you don't need to do this but whatever):

vxvol -g dg_name start new_volname mount -F vxfs /dev/vx/dsk/dgname/new_volume /mountpoint

Check the volume however you would, once you are satisfied that every thing is ok unmount the volume and stop it again.

umount /mountpoint vxvol -g dgname stop new_volname

If you don't trust me and have completed step 5, you might also want to run a vxprint to cover yourself:

vxprint -ht > /tmp/disk_layout

6. Run a vxdg split command to break the volumes off into a new disk group. You will need to know the Veritas name for the physical disk that will be making your new disk group (hint is will be in the vxprint -ht output from above):

vxdg split dgname new_dgname newdisk1 (newdisk2,newdisk3, ...)

At this point you will have two copies of the same data, in two distinctly different disk groups!

At this point the sky is the limit, you can do just about anything (that is if what you want to do is something with the two disk groups).

If you are on a SAN, you can export one of the disk groups and import them into a different host:

On host1:

vxdg deport new_dgname vxdisk -o alldgs list

On host2:

vxdg import new_dgname vxdisk -o alldgs list vxvol -g dg_name start new_volname mount -F vxfs /dev/vx/dsk/dgname/new_volume /mountpoint


Readers who read this page, also read:




Bookmark and Share My Zimbio http://www.wikio.com

0 comments: