Close

August 12, 2010

VMware Ubuntu Guest Add Harddrive without Rebooting

Four steps to add a new hard-disk to a running Ubuntu virtualized session, using Vmware.

  1. Add the new hard-disk to the Ubuntu vmware image using Vsphere or VMWare Server.
  2. 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.
  3. Do an “fdisk -l” and voila your new disk should be available.
  4. Do what you want with it!  (Software Raid or create a new partition etc).