Tuesday, May 27, 2008

Solaris vx removing duplicate devices from vxdisk list

vxdisk listDEVICE TYPE DISK GROUP STATUS
c7t21d0s2 sliced disk01 oradg online
c7t22d0s2 sliced disk02 oradg error
c7t22d0s2 sliced - - error
c7t23d0s2 sliced disk03 oradg online

vxdg -g oradg rmdisk disk02
vxdisk rm c7t22d0s2
vxdisk rm c7t22d0s2
devfsadm -C
vxdctl enable
vxdisk list

DEVICE TYPE DISK GROUP STATUS
c7t21d0s2 sliced disk01 oradg online
c7t22d0s2 sliced disk02 oradg online
c7t23d0s2 sliced disk03 oradg online

Details:
This specific procedure must be used when replacing one of the internal fibre drives within the following servers and/or arrays:

Sun Fire 280R, V480, and V880.
SENA A5X00 Arrays.

Note: Failure to follow this procedure could result in a duplicate device entry for the replaced disk in Volume Manager. This is most notable when running a vxdisk list command.

Example:

# vxdisk list
DEVICE TYPE DISK GROUP STATUS
c1t0d0s2 sliced rootdisk rootdg online
c1t1d0s2 sliced - - error
c1t1d0s2 sliced - - error


1. Select vxdiskadm option 4 - Select the Volume Manager disk to be replaced

2. luxadm -e offline - detach ssd instance

Use luxadm to get this disk out of the Solaris kernel configuration. The device path should end in ",raw" (for example, pci@1f,0/ide@d/dad@0,0:a,raw). This is the path from the /devices directory, not /dev/rdsk/c?t?d?s?.

* If the disk is multipathed, run the luxadm -e offline on the second path as well

3. devfsadm -C

The -C option cleans up the /dev directory, and removes any lingering logical links to the device link names. It should remove all the device paths for this particular disk. This can be verified with:

# ls -ld /dev/dsk/c1t1d* - This should return no devices entries for c1t1d*.


4. The drive can now be pulled physically

5. luxadm insert_device

This is an interactive command. It will go through the steps to insert the new device and create the necessary entries in the Solaris device tree.

6. vxdctl enable

This is for Volume Manager to rescan the disks. It should pick up the new disk with an "error" status. If not in error, the disk might contain some Volume Manager information, and might need to be formatted.

7. Select vxdiskadm option 5

This will start the recovery process (if needed).

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...