VMware Ubuntu Guest Add Harddrive without Rebooting

JTS

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).

About the author

During his twenty-five professional years, Mr. Silva has had experience in nearly every facet of the Information Technology industry. Ranging from advanced data mining / data visualization systems to running multi-state small business IT infrastructures, Mr. Silva has always provided precise and cost-effective strategies to meet any client’s needs. With his tremendous work ethic and “Can-Do” attitude, Mr. Silva has always met every challenge head-on and with intelligent determination. Mr. Silva is also a certified NAUI Advanced/Nitrox Diver, hoping to get a few more wrecks under his belt in the Atlantic.