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

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

Output:

[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.

Most Read Articles

Add/Detect a new disk in ...

Written By Farooq Mohammed Ahmed on Sunday, 11 January 2015 19:22
Add/Detect a new disk in ...

Replace SSL Certificates ...

Written By Farooq Mohammed Ahmed on Friday, 16 December 2016 08:05
Replace SSL Certificates ...

Using awk in Alias Comman...

Written By Farooq Mohammed Ahmed on Friday, 19 February 2016 14:22
Using awk in Alias Comman...

Script to Monitor Nagios ...

Written By Farooq Mohammed Ahmed on Monday, 18 July 2016 22:48
Script to Monitor Nagios ...

Generate/Create a SHA2/SH...

Written By Farooq Mohammed Ahmed on Tuesday, 25 October 2016 13:56
Generate/Create a SHA2/SH...