Skip to content

Cleaning up the Operating System device tree after removing LUNs – Solaris 10 example

February 24, 2012

You must clean up the device tree after removing LUNs. The OS commands may vary for Solaris versions. This procedure uses Solaris 10.
Contact Sun Support if any of the steps in this section fail to produce the wanted results.

To clean up the device tree after you remove LUNs

The removed devices show up as drive not available in the output of the format command:

       7. c4t600601604141200038FA4213BEF4E011d0 

After the LUNs are unmapped using Array management or the command line, Solaris also displays the devices as either unusable or failing.

    bash-3.00# cfgadm -al -o show_SCSI_LUN | grep -i unusable
      c2::5006048acafe4a73,256   disk  connected  configured unusable
      c3::5006048acafe4a7c,255   disk  connected  configured unusable

    bash-3.00# cfgadm -al -o show_SCSI_LUN | grep -i failing
      c2::5006048acafe4a73,71    disk  connected configured  failing
      c3::5006048acafe4a7c,252   disk  connected configured  failing

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.

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

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

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

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

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

    $devfsadm -Cv

From → SysAdmin

Leave a Comment

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: