Add/Detect a new disk in a Linux VM dynamically without rebooting

by | Jan 11, 2015 | VMWare

Its possible to add a disk dynamically (without reboot) in a Linux host in Virtual Environment by following some simple steps in this article. In a Virtualized world there is a frequent requirement for adding extra disks/space on the fly, as and when required with “Downtime” being a BIG NO NO….

Once you have added a new disk using vSphere Client interface for the host, go ahead and scan the iSCSI Bus Channel.

Run this command to detect the new disk.

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

 * “/host1/” can differ on machines. To see the available iSCSI Bus Channel on the host, Run the below command

# ls /sys/class/scsi_host


[root@smtp-proxy ~]# ls /sys/class/scsi_host
host0  host1  host2

*I used host2 to get the disk detected dynamically on Linux VM.

Now run the command “lvmdiskscan” to confirm the changes and verify the disk has been detected.

# lvmdiskscan

If you encounter any errors during the process, let us know via Contact Us and will get it resolved promptly.

Related Articles….