Saturday, 6 July 2013

solaris. remove unusable scsi lun



Solaris remove unusable or failing scsi lun


1. The removed devices show up as drive not available in the output of the format command:
# format
Searching for disks...done
................
     255. c1t50000974082CCD5Cd249 <drive not available>
          /pci@3,700000/SUNW,qlc@0/fp@0,0/ssd@w50000974082ccd5c,f9
................
     529. c3t50000974082CCD58d249 <drive not available>
          /pci@7,700000/SUNW,qlc@0/fp@0,0/ssd@w50000974082ccd58,f9
2. After the LUNs are unmapped Solaris displays the devices as either unusable or failing.
# cfgadm -al -o show_SCSI_LUN | grep -i unusable
#
# cfgadm -al -o show_SCSI_LUN | grep -i failing
c1::50000974082ccd5c,249       disk         connected    configured   failing
c3::50000974082ccd58,249       disk         connected    configured   failing
#
3. This will kick the device from failing to unusable. and also removes them from format o/p.
# luxadm -e offline /dev/rdsk/c1t50000974082CCD5Cd249s0
# luxadm -e offline /dev/rdsk/c3t50000974082CCD58d249s0


Also you can use luxadm command to switch device from failing state to unusable

# luxadm -e forcelip /dev/cfg/c1
# luxadm -e forcelip /dev/cfg/c3
4. Check the state
# cfgadm -al -o show_SCSI_LUN | grep -i unusable
c1::50000974082ccd5c,249       disk         connected    configured   unusable
c3::50000974082ccd58,249       disk         connected    configured   unusable
5. To remove the device from the cfgadm database, run the following commands on the HBA:
# cfgadm -c unconfigure -o unusable_SCSI_LUN c1::50000974082ccd5c
# cfgadm -c unconfigure -o unusable_SCSI_LUN c3::50000974082ccd58
6. Repeat step 2 to verify that the LUNs have been removed.
7. Clean up the device tree. The following command removes the /dev/rdsk... links to /devices.


No comments:

Post a Comment