(1 votes, average: 1.00 out of 5)
Loading...
Contents
How to flap a SAN device path without rebooting in Solaris
To flap a failed path just run Note: This will bring up/down that FC SCSI pathluxadm -e forcelip /dev/cfg/c2 Before: Ap_Id Type Receptacle Occupant Condition c2::500104f0007ef447 tape connected configured failed After: Ap_Id Type Receptacle Occupant Condition c2::500104f0007ef447 tape connected configured unknownIf the above dose not work Just run the below procedure
luxadm -e port /devices/pci@7c0/pci@0/pci@8/SUNW,qlc@0,1/fp@0,0:devctl CONNECTED /devices/pci@7c0/pci@0/pci@8/SUNW,qlc@0/fp@0,0:devctl CONNECTEDThen dump the mapped data
luxadm -e dump_map /devices/pci@7c0/pci@0/pci@8/SUNW,qlc@0/fp@0,0:devctl Pos Port_ID Hard_Addr Port WWN Node WWN Type 0 62f401 0 50060e80058cab20 50060e80058cab20 0x0 (Disk device) 1 630513 0 50060e8014397e20 50060e8014397e20 0x0 (Disk device) 2 634013 0 50060e8014397f20 50060e8014397f20 0x0 (Disk device) 3 634713 0 2100001b3205d150 2000001b3205d150 0x1f (Unknown Type,Host Bus Adapter)And last re-run a configure
cfgadm -c configure cx
How to remove SAN devices without rebooting in Solaris
Here are all my devices (local and SAN)echo | format Searching for disks...done AVAILABLE DISK SELECTIONS: 0. c1t0d0 <SUN36G cyl 24620 alt 2 hd 27 sec 107> /pci@8,600000/SUNW,qlc@4/fp@0,0/ssd@w21000004cf835d3a,0 1. c1t1d0 <SUN36G cyl 24620 alt 2 hd 27 sec 107> /pci@8,600000/SUNW,qlc@4/fp@0,0/ssd@w21000004cf4c72b6,0 2. c3t50001FE150061AA9d1 <HP-HSV210-5031 cyl 254 alt 2 hd 128 sec 128> /pci@8,700000/QLGC,qla@2/fp@0,0/ssd@w50001fe150061aa9,1let’s offline the LUNs now:
luxadm -e offline /dev/rdsk/c3t50001FE150061AA9d1s2Quiet straight forward, right ? Now, if you run you should notice all those LUNs are now in an ‘unusable’ state.
cfgadm -al -o show_FCP_devLet’s fully unconfigure them:
cfgadm -o unusable_FCP_dev -c unconfigure c3::50001fe150061aa9And finally, let’s cleanup the devices pathes
devfsadm -CNote: In a cluster configuration run also
scdidadm -CAll done !! To make sure run the device should not show in format any more.
echo | format Searching for disks...done AVAILABLE DISK SELECTIONS: 0. c1t0d0 <SUN36G cyl 24620 alt 2 hd 27 sec 107> /pci@8,600000/SUNW,qlc@4/fp@0,0/ssd@w21000004cf835d3a,0 1. c1t1d0 <SUN36G cyl 24620 alt 2 hd 27 sec 107> /pci@8,600000/SUNW,qlc@4/fp@0,0/ssd@w21000004cf4c72b6,0Now, you can completely remove those LUNs from the SAN, destroy them on the array,… as far as Solaris is concerned, they don’t exist anymore Want to make them reappear ? Just run ‘cfgadm -c configure’ on the controllers What if you’re running a non Sun volume management software like VxVM ? This was also tested with VxVM 5.0mp1 + DMP instead of MPXIO and it works really well Just make sure to deport those diskgroups and ‘vxdisk offline’ the Vx devices before running the luxadm offline
Another way to offline luns
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:413. c3t5006048ACAFE4A7Cd252 <drive not available> /pci@1d,700000/SUNW,qlc@1,1/fp@0,0/ssd@w5006048acafe4a7c,fc
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::5006048acafe4a7cRepeat 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
5
2
votes
Article Rating