In this how to, I assume you have already added in a new hard disk in your VMware Linux guest machine. You can detect the new hard disk or rescan entire SCSI bus without rebooting the VMware Linux guest. This how to has been tested on VMware ESXi 5.0 and CentOS 5.8 as the Linux guest.
Below image shown is a new hard disk add: –
Below image shown is output of “fdisk -l” before the new hard disk is added: –
Now, once the new hard disk is added, type the magic oneliner command below to detect the new hard disk or rescan the SCSI bus: –
ls /sys/class/scsi_host/ | while read host ; do echo "- - -" > /sys/class/scsi_host/$host/scan ; done
Below image shown is output of “fdisk -l” after the new hard disk is added and oneliner command above is run: –
You will see a new disk /dev/sdd as above. You can also verify the new hard disk using dmesg output as below: –