Tuesday, July 7, 2009

How to add a disk to a vmware linux guest without rebooting

I have a whole series of linux guests running on some ESX hosts off NFS shares.

Today I wanted to add another disk to a running guest and couldn't reboot it.
ESX let me add the disk but the CentOS 5.3 guests didn't see it automatically.

I ran this command:
echo - - - > /sys/class/scsi_host/host0/scan

"That is echo dash space dash space dash /sys/class/scsi_host/host zero /scan"

and then the disk showed up under fdisk -l

Put a new LVM on it, added a filesystem, and mounted it.

No comments:

Post a Comment