Thursday, April 29, 2010

Cleaning up Solaris 10 Device Tree when LUNs Removed

The following was copied from Symantec here: http://sfdoccentral.symantec.com/sf/5.0MP3/solaris/html/vxvm_admin/ch02s24s03.htm but I added some notes because their instructions were not correct (at least on my system) in some spots.


To clean up the device tree after you remove LUNs

1.

The removed devices show up as drive not available (or drive type unknown) in the output of the format command:

413. c3t5006048ACAFE4A7Cd252
/pci@1d,700000/SUNW,qlc@1,1/fp@0,0/ssd@w5006048acafe4a7c,fc

2.

After the LUNs are unmapped using Array management or the command line, Solaris also displays the devices as either
unusable or failing (or maybe unknown just like all the devices - make sure you have the right ones!).

bash-3.00# cfgadm -al -o show_SCSI_LUN
[...]
c2::5006048acafe4a73,256 disk connected configured unusable
c3::5006048acafe4a7c,255 disk connected configured unusable
[...]

3.

If the removed LUNs show up as failing, you need to force a LIP on the HBA. This operation probes the
targets again, so that the device shows up as unusable. Unless the device shows up as unusable, it cannot be
removed from the device tree. Do a long listing of the rdsk directory to see what device to spevify:

luxadm -e forcelip /devices/pci@1d,700000/SUNW,qlc@1,1/fp@0,0:devctl

4.

To remove the device from the cfgadm database, run the following commands on the HBA:

cfgadm -c unconfigure -o unusable_SCSI_LUN c2::5006048acafe4a73

or this one if not unusable:

cfgadm -c unconfigure -o c3::5006048acafe4a7c

5.

Repeat step 2 to verify that the LUNs have been removed.
6.

Clean up the device tree. The following command removes the /dev/rdsk... links to /devices.

$devfsadm -Cv

No comments: