Configuration Information Cannot Be Found After LUN Mapping Is Canceled. Why?
Symptom
Partitions have been created for a LUN. The user cancels the LUN mapping and then uses the mpathadm command to query STMS multipathing information. An error message is returned, stating that the configuration information cannot be found and the operation cannot be performed.
bash-3.2# mpathadm list LU
/dev/rdsk/c0t5000C500552839D3d0s2
Total Path Count: 1
Operational Path Count: 1
/dev/rdsk/c0t5000C500552087F3d0s2
Total Path Count: 1
Operational Path Count: 1
/dev/rdsk/c0t60022A1100041661001DBD4300000000d0s2
Total Path Count: 2
Operational Path Count: 2
/dev/rdsk/c0t60022A1100041661001DF8EA00000001d0s2
Total Path Count: 2
Operational Path Count: 2
mpathadm: Error: Unable to get configuration information.
mpathadm: Unable to complete operation
Root Cause
The mpathadm command queries information about all LUNs. If the host has residual information about the removed LUN, an error is returned when the command is executed.
Solution
Clear the residual LUN information as follows:
- Run the cfgadm -al command to check the Ap_Ids of the FC mount points.
In this example, c5 and c6 whose Type is fc-fabric are the FC mount points for the two HBA ports.
bash-3.2# cfgadm -al
Ap_Id Type Receptacle Occupant Condition
c2 scsi-sas connected configured unknown
c2::w5000c500552839d1,0 disk-path connected configured unknown
c3 scsi-sas connected configured unknown
c3::w5000c500552087f1,0 disk-path connected configured unknown
c4 scsi-sas connected unconfigured unknown
c5 fc-fabric connected configured unknown
c5::201b0022a1041661 disk connected configured unknown
c6 fc-fabric connected configured unknown
c6::200a0022a1041661 disk connected configured unknown
- Manually unconfigure and configure the two mount points to update the LUN information.
Although STMS works in round-robin mode, only one port (c6) has I/Os because ALUA is enabled on the array. When you unconfigure c6, an operation failure is returned. This return is normal and indicates that the operation does not affect the I/Os. This can be verified by the I/O monitoring statistics.
bash-3.2# cfgadm -c unconfigure c5
bash-3.2# cfgadm -c unconfigure c6
cfgadm: Library error: remove operation failed: /devices/pci@77,0/pci8086,3c06@2,2/pci10df,f134@0,1/fp@0,0/disk@w200a0022a1041661,0: I/O error
remove operation failed: /devices/pci@77,0/pci8086,3c06@2,2/pci10df,f134@0,1/fp@0,0/disk@w200a0022a1041661,0: I/O error
failed to unconfigure ANY device on FCA port
bash-3.2# cfgadm -c configure c6
bash-3.2# cfgadm -c configure c5
- Run the format command to check the LUN status. The residual information should be cleared.
bash-3.2# format
Searching for disks...done
AVAILABLE DISK SELECTIONS:
0. c0t5000C500552087F3d0 <DEFAULT cyl 36469 alt 2 hd 255 sec 63>
/scsi_vhci/disk@g5000c500552087f3
1. c0t5000C500552839D3d0 <DEFAULT cyl 36469 alt 2 hd 255 sec 63>
/scsi_vhci/disk@g5000c500552839d3
2. c0t60022A1100041661001DBD4300000000d0 <DEFAULT cyl 2557 alt 2 hd 128 sec 32>
/scsi_vhci/disk@g60022a1100041661001dbd4300000000
Specify disk (enter its number):
- Run the mpathadm command again. It is executed successfully.