Friday, May 2, 2008

Solaris Vxvm vxdiskadm option 4 replacing failed rootdisk fail

Exact Error Message
"vxvm:vxdg: ERROR: associating disk-media rootdisk with c0t0d0s2: Disk public region is too small"

Details:
Sometimes the above vxdiskadm command will fail. If it does, try to ensure that the disk is replaced with a disk with the same geometry. Use the output from the format command to verify if this is the case:

AVAILABLE DISK SELECTIONS:
0. c0t0d0
/sbus@3,0/SUNW,fas@3,8800000/sd@0,0
1. c2t1d0
/sbus@3,0/SUNW,fas@0,8800000/sd@1,0

If needed, the "public" and "private" lines from an output from vxdisk list c#t#d# of each device can be compared to confirm that the size is the same, although the disk will have to be initialized before this will work. (vxdisk list c#t#d# shows the same private/public configuration). Now that the disks have been established to be the same, an attempt can be made to manually mirror the volumes rather than use vxdiskadm:


The following is an example output of "vxdisk list" command:

DEVICE TYPE DISK GROUP STATUS
c0t0d0s2 sliced - - online
c2t1d0s2 sliced disk01 rootdg online
- - rootdisk rootdg removed was:c0t0d0s2

Run the following commands to completely remove the existence of the rootdisk in order to tidy up the configuration. This will involve disassociating plexes and removing the plexes with their associated subdisks:
Disassociate the plexes. This must be done with all plexes with a "STATE" of "DISABLED REMOVED". They must be done ONE AT A TIME. A plex can be located by looking for a "pl" in the far left column of information in the "vxprint -ht" output.
eg.
vxplex dis rootdiskvol-01
vxplex dis rootvol-01
vxplex dis swapvol-01


Run vxprint -ht to see that the plexes already disassociated
Remove the DISABLED REMOVED plexes and the rootdiskPriv subdisk.

eg.
vxedit -rf rm rootdiskvol-01
vxedit -rf rm rootvol-01
vxedit -rf rm swapvol-01

Remove the disk media name "rootdisk".
vxdg rmdisk rootdisk

Run a vxprint and make sure that all of the items from the "rootdisk" are removed (the original failed disk).

vxprint -htg rootdg


Once the vxprint shows that everything associated with the rootdisk has been removed, use vxdiskadm option 1 to initialize the new disk into rootdg (if not already done). DO NOT accept the default name. Instead, name it "rootdisk" (using the same diskname as previously). After the disk has been initialized, use vxdiskadm option 6 to mirror the volumes on a disk. This should automatically start the recovery process.

No comments:

UNIX: How to print column nicely using printf

[user@hostfwnms1-oam tmp]# cat b.sh printf "%-26s %-19s %-8s %-8s %-s %-s\n" HOSTNAME IP PING SNMPWALK 0-ok 1-fail for i in `cat n...