How to resize the root partition in VMware vCenter Server Appliance (VCSA)

Here I will explain how to resize the root (/) partition on the VMware vCenter Server Appliance (VCSA). This can be necessary if the update/upgrade process fails due to the inadequate free space on the appliance. 

First, identify the VMDK you need to increase. Normally it is the VMDK1, originally sized to 12 GB. You can confirm this by running the following command from the VCSA shell. Consult the VMware KB2126276 article if in doubt.

# df -h

You should see /dev/sda3 mounted as the root partition (/). Increase the VMDK1 (or whatever VMDK is the root partition in your case) to 30 GB or whatever size you want/need. Now let’s confirm the physical size of the root partition.

# fdisk -l /dev/sda3

Now we will delete the root partition using fdisk

# fdisk /dev/sda

Select option d for delete partition and then 3 for partition number 3. Now click n for new partition, p for primary partition and then 3 for partition number 3 (all defaults). Now toggle the bootable flag by clicking a and again selecting partition number 3. New we will reboot the system in order for the new partition settings to take effect.

The next step is to extend the filesystem. This is done by using the resize2fs command:

# resize2fs /dev/sda3

After resizing is complete, confirm that the root partition (/) now has (in my case) 30 GB by running:

# df -h

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.