How to add a new drive to a VMWare instance

We have been using Vmware for more then a decade now and always made the correct amount of space when first setting up the machines. A few days ago the story changes and I thought I would share what I found. The reason that I recommend this setup is that you can store data on other “drives” and if your primary drive fails you can recover that drive and other data is not affected.

Note: Understanding the basics of this concept is great but if you are going to do this understand what it does, do not simply copy and paste the commands.

Create the disks under Vmware EXSi

  1. Right click on the guest, click “Edit Settings…”
  2. Under the “Hardware” tab, click “Add”
  3. For the device type, select “Hard Disk”, click “Next”, and “Next” again
  4. Specify the size of your disk, optionally enable Thin Provisioning, and click “Next”, “Next”, “Finish”, “Ok”

Re-scan the system for new hardware

  1. cat /proc/partitions
    1. Note the list of devices
  2. sudo apt-get install scsitools
  3. sudo
  4. cat /proc/partitions
  5. See what devices were added

Partition and format your disks

  1. sudo fdisk /dev/<newdevice>
  2. sudo mkfs -t ext3 /dev/<newdevice><partitionnumber>

Add the devices to /dev/disk/by-uuid/

  1. sudo partprobe
  2. sudo blkid /dev/<newdevice><partitionnumber>
    1. Note the UUID

Add the new mount to /etc/fstab, and mount the filesystem

  1. vi /etc/fstab
  2. mount -a

Leave a Reply