Tuesday, March 30, 2010

Removing and Unregistering a Disk Group from Sun Cluster

Lets see, how to remove a disk group from Sun Cluster running veritas volume manager. It was a bit surprising for me to see very little of this topic posted in the net, though, I did came across couple of posts for removing device groups with SVM.

Environment is a 3.1 Sun Cluster running VxVM. Normally, one would see this type of a request associated with removal of resource group or migration of applications from the server.

Make sure

a) no filesystems are mounted from the disk group.

b) Entries are not there in vfstab

In order to remove the disk group from the cluster control, you need to bring the device group offline from cluster control and then un-register the disk group from cluster.

1. Make sure no mounted file systems of the disk groups are present.

2. Make sure no entries are present in /etc/vfstab.

3. Make sure the volumes are removed ; # vxedit -g -rf rm

4. Sync the cluster ; # scconf -c -D name=,sync

5. Offline the disk group. ; # scswitch -F -D

6. Un-Register the disk group ; # scconf -r -D name=

7. Once the diskgroup is offline, Sun Cluster deports the disk group. You need to import the dg again and destroy it.

# vxdg import ; # vxdg destroy