Increase VMware vSAN Space and Performance Add Disks to Disk Group

Running VMware vSAN in the home lab environment rocks. It has allowed me to effectively have a great HCI solution running commodity hardware with the ability to scale storage as needed. I have been running off a pair of NVMe drives in my two-node configuration for over a year now and have slowly ran short on space. I had another NVMe drive in each of my hosts running as a standalone datastore for other uses, etc. However, after adding a third host for management workloads and standalone datastores, I wanted to reclaim the standalone NVMe storage in each of my vSAN hosts and expand my vSAN storage. Not only will I gain the space benefits but also performance improvements by increasing the number of disks in my capacity disk group. In this post, we will take a look at how to increase VMware vSAN space and performance add disks to disk group to see how easy it is to expand an existing vSAN datastore and add additional physical disks into the disk group.

Considerations to Increase VMware vSAN Space and Performance Add Disks to Disk Group

There are a few things you need to think about with when thinking about increasing VMware vSAN space and performance adding disks to your disk groups. VMware vSAN is very forgiving in adding space to vSAN and the process is extremely painless.
There are two ways that you can expand VMware vSAN space or when you see reduced performance across the vSAN cluster.
  • Expand the storage capacity space and performance by adding disks to your capacity disk groups.
  • Add an additional vSAN hosts to increase performance and capacity
After you expand cluster capacity you can perform a manual rebalance operation to distribute resouces evenly across the cluster.
When you add a new physical disk you need to make sure the physical disk type matches the type of disk making up the disk group as it is, either spindles or flash. Additionally, you need to make sure the disk is not claimed by another datastore or any other processes such as scratch, coredump, etc (not likely if you are adding a new disk but may be if you are claiming an existing disk for use with vSAN). I ran into a few issues since I was reclaiming a disk from an existing datastore for use with vSAN.

Removing Claims on Existing Disks to Add Disk to VMware vSAN Disk Group

As mentioned, I wanted to destroy an existing datastore so I could use the physical disk claimed by the datastore for adding a disk to vSAN. For me this involved the following:
  • Moving existing VMs off the datastore before deleting it
  • Deleting the coredump file stored on this datastore
  • Changing the scratch location from the datastore to /tmp/scratch
Moving-existing-vitual-machines-off-a-datastore-to-increase-VMware-vSAN-space-and-performance Increase VMware vSAN Space and Performance Add Disks to Disk Group
Moving existing vitual machines off a datastore to increase VMware vSAN space and performance
After I moved the existing VMs off the datastore, I simply tried to immediately unmount the datastore, however, receiving the error:
VMware-datastore-the-resource-is-in-use Increase VMware vSAN Space and Performance Add Disks to Disk Group
VMware datastore the resource is in use
Coredump-and-scratch-files-using-the-VMware-ESXi-datastore-preventing-unmount-and-delete Increase VMware vSAN Space and Performance Add Disks to Disk Group
Coredump and scratch files using the VMware ESXi datastore preventing unmount and delete
Removing-the-coredump-file-from-VMware-ESXi-to-add-disks-to-VMware-vSAN-disk-group Increase VMware vSAN Space and Performance Add Disks to Disk Group
Removing the coredump file from VMware ESXi to add disks to VMware vSAN disk group
Removing the Scratch Location from the ESXi host
I found a comment posted a long while ago on a blog post by “Henry” providing a great way change the location of the scratch directory without a reboot of the host.
I will give the concise steps here. SSH into the host and run the following:
  1. export NEWSCRATCH="/tmp/scratch"
  2. mkdir -p ${NEWSCRATCH}/{core,var/tmp,log}
Now go to the web client and change your configured scratch location. This is found under the Configure > System > Advanced System Settings you can filter on the word scratch. Populate the ScratchConfig.ConfiguredScratchLocation value with the value you created in the mkdircommand above.
Changing-the-configured-scratch-location-on-an-ESXi-host-without-reboot Increase VMware vSAN Space and Performance Add Disks to Disk Group

  1. cat /etc/vmware/locker.conf; echo
  2. # This should show "/tmp/scratch 0"
  3. vim-cmd hostsvc/advopt/view ScratchConfig.ConfiguredScratchLocation
  4. # value should contain "/tmp/scratch"
  5. Repoint current scratch to a new location (still SSH):
  6. – run:
  7. ln -sfnv "${NEWSCRATCH}" "/scratch"
  8. Restart _all_ running services (still SSH) – this may take a lot of time
  9. – run:
  10. ( for s in /etc/init.d/*; do echo $s; $s status && $s restart; done )
  11. Check that new location is used (using SSH):
  12. – run:
  13. vim-cmd hostsvc/advopt/view ScratchConfig.CurrentScratchLocation
  14. # value should contain “/tmp/scratch”
Now, you should be able to unmount and delete the old datastore.
Unmounting-an-existing-datastore-to-increase-VMware-vSA-space-and-performance Increase VMware vSAN Space and Performance Add Disks to Disk Group
Unmounting an existing datastore to increase space and performance in VMware vSAN
Datastore is unmounted, now it is ready to delete.
VMware-datastore-unmounted-and-ready-to-delete-to-increase-space-and-performance-in-VMware-vSAN Increase VMware vSAN Space and Performance Add Disks to Disk Group
VMware datastore unmounted and ready to delete to increase space and performance in VMware vSAN
Confirm deletion of the datastore.
Datastore-delete-confirmation Increase VMware vSAN Space and Performance Add Disks to Disk Group
Datastore delete confirmation

Increase VMware vSAN Space and Performance Add Disks to Disk Group

The process to actually increase VMware vSAN space and performance add disks to disk group process is fairly easy. For me, the hard part was just getting the disks freed up to add the vSAN disk group.
Right click the vSAN Cluster > Configure > vSAN > Disk Management then click the little disk symbol with a “+” sign.
Increase-VMware-vSAN-Space-and-Performance-Add-Disks-to-Disk-Group Increase VMware vSAN Space and Performance Add Disks to Disk Group
Increase VMware vSAN Space and Performance Add Disks to Disk Group
Choose the disk to add to the VMware vSAN disk group. Here I am adding another Samsung NVMe drive to the home lab.
Select-the-VMware-vSAN-disk-to-be-added-to-the-disk-group Increase VMware vSAN Space and Performance Add Disks to Disk Group
Select the VMware vSAN disk to be added to the disk group
You will see vCenter processes fire off to add the new disk to the disk group.
The-process-to-add-disks-to-the-VMware-vSAN-disk-group-begins Increase VMware vSAN Space and Performance Add Disks to Disk Group
The process to add disks to the VMware vSAN disk group begins
Now, instead of (1) capacity disk, I have (2) in the VMware vSAN disk group.
Capacity-disks-showing-correctly-in-the-disk-group-on-each-VMware-vSAN-host Increase VMware vSAN Space and Performance Add Disks to Disk Group
Capacity disks showing correctly in the disk group on each VMware vSAN host
You may or may not see the automatic disk rebalance operation needed. Depending on how much space was in use on your existing disks, this will either trigger a rebalance or not. The threshold is 80% use on any disk.
As you can see, even with adding the new disks, it isn’t showing a rebalance needed. This is found in the Monitor > vSAN > Health > Cluster > vSAN Disk Balance section.
Check-the-balance-of-data-across-the-VMware-vSAN-disks Increase VMware vSAN Space and Performance Add Disks to Disk Group
Check the balance of data across the VMware vSAN disks

Wrapping Up

One of the tremendous benefits to VMware vSAN HCI solution is he easy process to scale your storage and performance. To Increase VMware vSAN Space and Performance Add Disks to Disk Group or add additional vSAN hosts to the cluster. It’s that simple. As shown, if you are in a home lab configuration and you have disks you may want to bring into the vSAN environment, you may have to work through a few “in use” challenges to claim the disks for use with VMware vSAN.

Post a Comment

0 Comments