Site icon The Lone Sysadmin

VMware & Linux Hot-Add Disks

Did you know you can add new virtual hard disks to a running Linux VMware VM, and they can be visible to the OS without a reboot?

First, add a new hard disk the way you’d normally do it (Edit Settings -> etc.). Add it to the existing virtual SCSI adapter (don’t create a new one).

Then, use a script like Kurt Garloff’s rescan-scsi-bus.sh to pick up the new device.

If you’re using the Linux Logical Volume Manager you can partition the new device, run pvcreate, add it to a volume group, and grow a filesystem with ext2online/resize2fs (RHEL 4/5), all without the end users noticing.

Just don’t forget to align the partitions on the new device before you use it. Misaligned I/O is a serious performance drag.

Exit mobile version