Post

Expanding the Datastore Disk for Proxmox Backup Server

Expanding the Datastore Disk for Proxmox Backup Server

When you expand a virtual disk attached to a Proxmox Backup Server, the datastore doesn’t automatically gain access to the new space. The partition and filesystem are still living in their original footprint, you need to walk through each layer manually.

Here’s the full process to stretch everything out so PBS can actually use the extra room.


1. Fix the GPT Partition Table

When a virtual disk is resized at the hypervisor level, the GPT partition table still references the old disk size. Fix that first.

1
sgdisk -e /dev/vdb

The -e flag moves the backup GPT header to the end of the disk, which is where it belongs now that the disk is larger. Without this step, subsequent tools may complain about a corrupt or incomplete partition table.


2. Recreate the Partition

With the partition table fixed, delete the existing partition and recreate it to fill the full disk. Despite how it sounds, this is safe — no data is wiped. You’re just redefining where the partition ends.

1
2
sgdisk -d 1 /dev/vdb
sgdisk -N 1 /dev/vdb

-d 1 deletes partition 1, and -N 1 recreates it using all available space on the disk. The start sector stays the same; only the end moves.


3. Install parted (if needed)

The next step uses partprobe, which ships with parted. If it’s not already installed:

1
apt install parted

4. Inform the Kernel

The kernel still has the old partition layout in memory. Tell it to re-read the partition table without requiring a reboot.

1
partprobe /dev/vdb

This signals the kernel to pick up the new partition boundaries. The partition /dev/vdb1 now reflects the full size of the disk.


5. Resize the Filesystem

The partition has grown, but the ext4 filesystem on top of it hasn’t stretched yet. Fix that now.

1
resize2fs /dev/vdb1

resize2fs expands the filesystem to fill the available space on the partition. It automatically uses the full size — no need to specify a target.


Done

Everything should now be in sync — disk → partition → filesystem.

A quick check:

1
df -h /dev/vdb1

You should see the expanded capacity reflected. Head back into the Proxmox Backup Server UI and confirm the datastore is reporting the correct available space under Datastore → Summary.

This post is licensed under CC BY 4.0 by the author.