Sun Microsystems, Inc.  Sun System Handbook - ISO 3.4 June 2011 Internal/Partner Edition
   Home | Current Systems | Former STK Products | EOL Systems | Components | General Info | Search | Feedback

Asset ID: 1-71-1018716.1
Update Date:2011-06-08
Keywords:

Solution Type  Technical Instruction Sure

Solution  1018716.1 :   How to Unconfigure a Single Lun from a Target which has multiple Luns  


Related Items
  • Sun Storage 6540 Array
  •  
  • Sun Storage 3510 FC Array
  •  
  • Sun Storage 6320 System
  •  
  • Sun Storage T3 Array
  •  
  • Sun Storage T3+ Array
  •  
  • Sun Storage 9970 System
  •  
  • Sun Storage 6120 Array
  •  
  • Sun Storage 6130 Array
  •  
  • Sun Storage 6140 Array
  •  
  • Sun Storage 6920 System
  •  
  • Sun Storage 9990 System
  •  
  • Sun Storage 9960 System
  •  
  • Sun Storage 3511 SATA Array
  •  
  • Sun Storage 9980 System
  •  
Related Categories
  • GCS>Sun Microsystems>Storage Software>Sun Storage SAN Software
  •  
  • GCS>Sun Microsystems>Storage - Disk>Modular Disk - Other
  •  
  • GCS>Sun Microsystems>Storage - Disk>Modular Disk - 3xxx Arrays
  •  
  • GCS>Sun Microsystems>Storage - Disk>Modular Disk - 6xxx Arrays
  •  
  • GCS>Sun Microsystems>Storage - Disk>Datacenter Disk
  •  

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 :

         142088 for Sol10

         113044 for Sol9

         111846 for Sol8

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
unusable lun, when other luns are being used


CR: 6482253 cfgadm fails to unconfigure unusable luns on a
controller when the devices are under VxVM control


CR: 6463935  cfgadm failed to unconfigure luns if remain
paths from same port with MPxIO  


All these CR  will be fixed in Solaris11
(solaris-nevada)and seems to be  backported in Solaris 10-u3,
 Solaris 9 and Solaris 8 with the mentionned patches  (
look at README)


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
  Copyright © 2011 Sun Microsystems, Inc.  All rights reserved.
 Feedback