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.

VMWare Related Articles......

Follow these simple steps to resize a Virtual machine disk (vmdk) and then extend the volume using LVM. Make sure...
The process of replacing the default SSL certificates on ESXi 6.x/6.5 is a simple process involving around 5-10 steps. We...
Update ESXi version
Its a very quick process to update ESXi version to the latest. This procedure is completed via esxcli going through...
It's now possible to integrate FreeIPA/IDM (Red Hat) into vCenter Appliance (vCSA)/ vCenter Server for User authentications. We need to...
It is possible to use DCUI (Direct Console User Interface) via SSH session to ESXi. At the command prompt just...