Odd problem with Sun Cluster and Veritas Volume Manager
- 14 years ago
I wrote a short script to accomplish this task without taking down time.
for volname in $@; do
vxassist -g ocsrawdg -b mirror $volname ocsrawdisk1 ocsrawdisk2 ocsrawdisk3 ocsrawdisk4 ocsrawdisk5
scconf -c -D name=ocsrawdg,sync
vxtask -w 10 monitor
scconf -c -D name=ocsrawdg,sync
doneBasically, it just takes a list of all the volumes in the disk group and mirrors each one onto the new storage one at a time. As soon as the mirror process goes into background the scconf command syncs the disk group across the cluster. The real saving grace in this situation is the vxtask monitor function which will continue to run as long as the mirror is being built, then exits at the end, which gives me the perfect trigger to resync the disk group again, go back for the next volume in the diosk group, rinse and repeat until they are all done. It's time consuming, and the vxtask monitor is noisy, but the end users don't see any down time.
I will probably have to use a similar script when removing the plexes from the old storage, but that won't require waiting for the mirror to build. So, no need for the vxtask monitor.