How to Scan new LUNs on Linux with QLogic driver

How to Scan new LUNs on Linux with QLogic driver

To scan for new LUNs on a Linux system with a QLogic driver, you can use the echo "- - -" > /sys/class/scsi_host/host[x]/scan command, where [x] is the host number of the QLogic HBA.

For example, to scan for new LUNs on host 0, you can use the following command:

refer ‮‬to:lautturi.com
echo "- - -" > /sys/class/scsi_host/host0/scan

This will scan for new LUNs on host 0.

To scan for new LUNs on host 1, you can use the following command:

echo "- - -" > /sys/class/scsi_host/host1/scan

This will scan for new LUNs on host 1.

You can also use the lsscsi command to list the LUNs that are currently detected by the QLogic HBA. For example:

lsscsi

This will list the LUNs that are currently detected by the QLogic HBA.

Keep in mind that you may need to use sudo to execute the echo and lsscsi commands if you do not have sufficient privileges.

sudo echo "- - -" > /sys/class/scsi_host/host0/scan
sudo lsscsi
Created Time:2017-10-29 22:08:35  Author:lautturi