Skip to content

Manual Partition Resize

After we increase your disk size, the VM's partition does not grow automatically - you extend it inside the operating system. Steps for both Linux and Windows are below.

Linux

TL;DR

DON'T RUN THESE COMMANDS IF YOU DON'T KNOW THE PARTITION NUMBER!!!

Run it only if you are sure the partition is sda1! Otherwise read the rest of the article

 growpart /dev/sda 1
ext4 filesystem:
resize2fs /dev/sda1
xfs filesystem:
xfs_growfs /

Step 1

Check what's the name of the root partition with command:

lsblk

Linux Based Systems

In our case is sda2

Step 2

Extend the partition with command:

growpart /dev/sda 2

Linux Based Systems

Step 3

Grow the filesystem to fill the extended partition:

ext4 (most common):

resize2fs /dev/sda2
xfs (used by RHEL/Rocky/AlmaLinux root):
xfs_growfs /
Check the result with df -h / - the root filesystem should now show the full size.

Windows

After we increase your disk, Windows does not extend the C: drive on its own. Extend it into the new unallocated space using either method below.

Option A - Disk Management (graphical)

Extend the volume

  1. Press Win + R, type diskmgmt.msc, and press Enter.
  2. Right-click the C: volume and choose Extend Volume...
  3. Follow the wizard, accept the default (it offers all the new space), then click Finish.

If Extend Volume is greyed out, the new space is not showing yet - use Option B and run rescan first.

Option B - diskpart (command line)

Run in an elevated Command Prompt or PowerShell (Run as administrator)

diskpart
rescan
list volume
select volume <N>
extend
exit
Replace <N> with the number of your C: volume from list volume. rescan makes Windows pick up the enlarged disk, and extend with no size grows the volume into all adjacent free space.

No reboot needed, but the space must be adjacent

Extending only works into unallocated space that sits immediately after the C: volume, which is where our disk increase adds it. If you see the extra space but it is not adjacent (for example a recovery partition sits between), open a ticket and we will help.