Fault Description
After the LUN scan command is executed on a host to scan for newly mapped LUNs, and the multipath software of Linux operating systems such as Red Hat is used to scan for mapped LUNs, only a part of LUNs are identified. However, after the lsscsi or df –l command is executed, all disks are displayed.
LUN scan command: echo "- - -" > /sys/class/scsi_host/${tmpHost}/scan
Symptom
No alarm is reported.
Cause
The multipath software cannot delete LUNs that have no mappings. During the scan, the host continuously delivers the read commands to LUNs that have been deleted. After the storage system returns a message indicating that no mapping exists, the multipath software identifies the path as invalid. Consequently, normal LUNs cannot be identified later.
Identification Method
Confirm that the host uses the multipath software.
Confirm that all disks are displayed after the df –l or lsscsi command is executed.
Confirm that all LUNs have reported related information by searching for the key word "scsiReportLunsExecute" in storage logs.
Example: [Report 69 LUN to host 0x10000090fae65d57,actual 69 LUN.][SCSI][scsiReportLunsExecute,458][CSD_5]
Solutions
Solution 1: Delete LUNs whose mappings have been deleted on the host. For details, visit http://www.linuxquestions.org/questions/linux-distributions-5/finding-luns-928777/.
deleted mpath device with multipath -f mpath<number>
cd into /sys/class/scsi_device
then echo 1 > device/delete for each device (based on scsi id)
Example:
multipath -f mpath2
echo 1 > /sys/class/scsi_device/5\:0\:0\:2/device/delete
echo 1 > /sys/class/scsi_device/6\:0\:0\:2/device/delete
echo 1 > /sys/class/scsi_device/5\:0\:1\:2/device/delete
echo 1 > /sys/class/scsi_device/6\:0\:1\:2/device/delete
Solution 2: If too many LUNs whose mappings have been deleted exist, it is risky to manually delete the LUNs. It is a good practice to stop services and restart the host.
Check After Recovery
Use the multipath software to scan for disks. All disks can be found.
Application Scope
OceanStor 18000 series:
All V100R001 versions
OceanStor V3 series:
All V3 versions