Sun System Handbook - ISO 3.4 June 2011 Internal/Partner Edition | |||
|
|
Solution Type Technical Instruction Sure Solution 1018716.1 : How to Unconfigure a Single Lun from a Target which has multiple Luns
PreviouslyPublishedAs 230430 Description In today's san environment, where scheduling a reboot is highly difficult, you would have come across situations where you need to unconfigure a single Lun out of the many that are presented to the same target without reboot. Note : The following procedure relies on the unmaping/removal of the LUN from the storage target and should not be confused with host based LUN masking. Host based LUN masking is the host 'masking' out selected LUNS from those being presented by a target (rather than the host configuring/using all the LUNs that are being presented). If host based LUN masking is required, Solaris[TM] 10 update 3 introduced this functionality. For more information on host based LUN masking see fp man page for details. 'man -s 7D fp' A. This procedure is valid only for the Sun Leadville Stack using the cfgadm commands with the minimum revision of the following patches : B. On Solaris 10 the hardware options with cfgadm commands have changed. See cfgadm_fp man page for details. C. Procedure applies to Lun unmapped from the array side , and
not for host based lun masking (on presented luns) which was
introduced in S10u3 and later.
-As of today there is no option with the cfgadm cmd to unconfigure a Single Lun. The only option available is to unconfigure the complete target device which is not helpful in situations where we have 100's of luns presented on the same target and you need to get rid of a few. Now with the last solaris update, the only way to achieve this is to get the luns into a unusable state and then unconfigure it. How to get a Lun to show up as unusable A. If possible Change the permission of the lun on the Array to None instead of Read Only Or Read Write B. UnMap the Luns from that Port ( target device) on the array. Below are the steps that need to be followed. The array used in the below example is a Sun StorEdge[TM] T3+ Steps to Follow How to unconfigure a single Lun from a target which has multiple Luns: A. Cfgadm shows the 3 luns presented on c4 and c5 # cfgadm -al -o show_FCP_dev Ap_Id Type Receptacle Occupant Condition c3 fc connected unconfigured unknown c4 fc-fabric connected configured unknown c4::50020f23000096b9,0 disk connected configured unknown c4::50020f23000096b9,1 disk connected configured unknown c4::50020f23000096b9,2 disk connected configured unknown c5 fc-fabric connected configured unknown c5::50020f2300008f6b,0 disk connected configured unknown c5::50020f2300008f6b,1 disk connected configured unknown c5::50020f2300008f6b,2 disk connected configured unknown On solaris 10 the command to use will be # cfgadm -al -o show_SCSI_LUN B. On the Array ( T3+) we have 3 volslices with readwrite permission purple2:/:<1>volslice list Slice Slice Num Start Blk Size Blks Capacity Volume sl1 0 0 20971520 10.000 GB v1 test 1 20971520 20971520 10.000 GB v1 s2 2 41943040 664797184 317.000 GB v1 - - 706740224 1637376 799.500 MB v1 purple2:/:<3>lun perm list lun slice WWN Group Name Group Perm WWN Perm Effective Perm -------------------------------------------------------------------------------------------------------------------------- 0 0 default -- -- rw rw 1 1 default -- -- rw rw 2 2 default -- -- rw rw C. Change the permission on Lun 2 from rw to none purple2:/:<5>lun default lun 2 none purple2:/:<6>lun perm list lun slice WWN Group Name Group Perm WWN Perm Effective Perm -------------------------------------------------------------------------------------------------------------------------- 0 0 default -- -- rw rw 1 1 default -- -- rw rw 2 2 default -- -- none none D. Now cfgadm shows Lun 2 as unusable # cfgadm -al -o show_FCP_dev Ap_Id Type Receptacle Occupant Condition c3 fc connected unconfigured unknown c4 fc-fabric connected configured unknown c4::50020f23000096b9,0 disk connected configured unknown c4::50020f23000096b9,1 disk connected configured unknown c4::50020f23000096b9,2 disk connected configured unusable c5 fc-fabric connected configured unknown c5::50020f2300008f6b,0 disk connected configured unknown c5::50020f2300008f6b,1 disk connected configured unknown c5::50020f2300008f6b,2 disk connected configured unusable E. We have achieved our goal to get the Lun to show up as unusable , now use the following command to unconfigure the Lun # cfgadm -c unconfigure -o unusable_FCP_dev c4::50020f23000096b9 On Solaris 10 the command to use will be # cfgadm -c unconfigure -o unusable_SCSI_LUN c4::50020f23000096b9 # cfgadm -al -o show_FCP_dev Ap_Id Type Receptacle Occupant Condition c3 fc connected unconfigured unknown c4 fc-fabric connected configured unknown c4::50020f23000096b9,0 disk connected configured unknown c4::50020f23000096b9,1 disk connected configured unknown c5 fc-fabric connected configured unknown c5::50020f2300008f6b,0 disk connected configured unknown c5::50020f2300008f6b,1 disk connected configured unknown c5::50020f2300008f6b,2 disk connected configured unusable F. Run the same command on the other Path ( c5 ) # cfgadm -c unconfigure -o unusable_FCP_dev c5::50020f2300008f6b On Solaris 10 the command to use will be # cfgadm -c unconfigure -o unusable_SCSI_LUN c5::50020f2300008f6b # cfgadm -al -o show_FCP_dev Ap_Id Type Receptacle Occupant Condition c3 fc connected unconfigured unknown c4 fc-fabric connected configured unknown c4::50020f23000096b9,0 disk connected configured unknown c4::50020f23000096b9,1 disk connected configured unknown c5 fc-fabric connected configured unknown c5::50020f2300008f6b,0 disk connected configured unknown c5::50020f2300008f6b,1 disk connected configured unknow You have sucessfully unconfigured Lun 2 from a Target that has other luns assigned to it without a Reboot Product Sun StorageTek T3 Array Sun StorageTek T3+ Array Sun StorageTek 6120/6320 Controller Firmware 3.2 Sun StorageTek 3511 SATA Array Sun StorageTek 3510 FC Array Sun StorageTek 6320 System Sun StorageTek 6120 Array Internal Comments The following CR are related to same issue, describing the difficulties to remove LUN in a SAN configuration. CR: 6444373, 2139937, 2139938, 2139937, 2139865 cfgadm cann't remove CR: 6482253 cfgadm fails to unconfigure unusable luns on a CR: 6463935 cfgadm failed to unconfigure luns if remain All these CR will be fixed in Solaris11 cfgadm, unconfigure, unusable, T3, T3+, 6120, 6320, Hitachi, unusable_FCP_dev, unusable_SCSI_LUN Previously Published As 82516 Change History Date: 2007-12-11 User Name: 95826 Action: Approved Comment: - verified metadata Date: 2009-12-22 User Name: [email protected] Action: Currency & Update - changed review date to 2008-12-10 - checked for TM - none added - checked audience : contract Publishing Version: 16 Date: 2007-12-10 User Name: 95826 Action: Accept Comment: Version: 0 Attachments This solution has no attachment |
||||||||||||
|