Scan Fiber Channel LUNs on a Linux or VMware Host

Most Linux distributions will perform a full scan of the Fiber Channel HBAs upon booting.  Rebooting a production system can be a pain in the ass, and it can be time-consuming even during pre-production standup.  So how can you scan Fiber Channel HBAs for new or altered LUNs without rebooting?  If you're using a modern Linux distribution or hacking away at the command line of an ESX host, use the following command:

echo "- - -" >/sys/class/scsi_host/host(x)/scan

Replace (x) with the host number.  If you only have a single HBA, it will be numbered 0, so use the following:

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