Hi everyone!
Here’s a case that the lsscsi command can be used to view drive letters but devices are not displayed using the fdisk –l command.
[Symptom]
After LUNs are scanned on the host, the lsscsi command can be executed to view driver letters of LUNs.
However, the devices are not displayed after the fdisk -l command is executed.
As a result, some tools cannot read data from and write data into the LUNs.
[Fault Diagnosis]
When a LUN is reported for the first time, a drive letter is generated and the information about capacity and partitions is read.
If the information fails to be read, the information about the device that is generated is incomplete.
As a result, the tools such as fdisk cannot identify the device.
Then, when LUNs are scanned, the host does not read the information because the drive letters of the LUNs are already generated.
[Solution]
Method 1
Go to the /sys/block/sd[?]/device/ directory (sd[?] indicates the LUN that has the problem).
Run the echo one > rescan command to trigger the system to update the SCSI device information.
Run the fdisk -l command to view the device.
Method 2
Run the echo 1 > /sys/block/sd[?]/devece/delete command to delete the faulty LUN.
Run the echo "- - -" > /sys/class/scsi_host/host[?]/scan command(host[?] indicates the host port where the faulty LUN resides. Then, you can scan for LUNs again.
Run the fdisk -l command to view the device.