Rescan disk devices on a Linux VMware virtual machine without a reboot

If you add a new Hard Disk virtual device to a running Virtual Machine in VMware, that VM will most likely not recognize that new disk straight away. To do a re-scan of your SCSI bus while the Virtual Machine is running, to force it to re-read all its attached hard disks, you can issue the following command.

First, find your hostbus ID.

# ls /sys/class/scsi_host        
host0

In this case, host0 is the hostbus. Next, force a rescan. Replace the host0 in the path with whatever value you may have received with the ls output above.

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

If you run a fdisk -l now, it will display the newly added hard disk without the need to reboot your Linux virtual machine.