VMware Ubuntu Guest Add Harddrive without Rebooting
Four steps to add a new hard-disk to a running Ubuntu virtualized session, using Vmware.
- Add the new hard-disk to the Ubuntu vmware image using Vsphere or VMWare Server.
- Ssh into ubuntu session and run
“echo “- – -” > /sys/class/scsi_host/NUMBER/scan”
NUMBER is the scsi host value. It will not hurt rescanning a running host, so I simply keep incrementing till I reach a scsi host value that is not created in the system yet. - Do an “fdisk -l” and voila your new disk should be available.
- Do what you want with it! (Software Raid or create a new partition etc).