How to Expand the Disk on Proxmox Backup Server (PBS)

If you increase the virtual disk size of your Proxmox Backup Server (PBS) at the hypervisor level, the additional storage is not automatically available to the operating system. While the disk and partition may reflect the new size, the Logical Volume (LV) and filesystem must also be extended to utilize the newly allocated space.

This guide explains how to extend the root logical volume and resize the filesystem on a Proxmox Backup Server without requiring a reboot.

Prerequisites

Before proceeding, ensure that:

  • The virtual disk has already been expanded from your VPS control panel.
  • The partition has been resized to occupy the newly allocated disk space.
  • You have root or sudo access to the PBS server.
  • The server uses the default LVM installation.

Note: This guide assumes the root filesystem is formatted as ext4.

Verify the Current Disk Layout

Before extending the logical volume, verify the current disk and filesystem layout.

Run the following commands:

fdisk -l
lsblk
df -Th

The output should confirm that:

  • The virtual disk reflects the increased size.
  • The root logical volume (pbs-root) is still using the original capacity.
  • The root filesystem has not yet been expanded.

Output:

root@server-backup:~# fdisk -l
Disk /dev/vda: 100 GiB, 107374182400 bytes, 209715200 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: gpt
Disk identifier: 64C627A2-C125-49B1-836F-37478549729C

Device       Start       End   Sectors  Size Type
/dev/vda1       34      2047      2014 1007K BIOS boot
/dev/vda2     2048   1050623   1048576  512M EFI System
/dev/vda3  1050624 209715166 208664543 99.5G Linux LVM

Disk /dev/mapper/pbs-swap: 7.75 GiB, 8325693440 bytes, 16261120 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes

Disk /dev/mapper/pbs-root: 79.37 GiB, 85219868672 bytes, 166445056 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
root@server-backup:~# lsblk
NAME         MAJ:MIN RM  SIZE RO TYPE MOUNTPOINTS
sr0           11:0    1 1024M  0 rom
vda          253:0    0  100G  0 disk
├─vda1       253:1    0 1007K  0 part
├─vda2       253:2    0  512M  0 part
└─vda3       253:3    0 99.5G  0 part
  ├─pbs-swap 252:0    0  7.8G  0 lvm  [SWAP]
  └─pbs-root 252:1    0 79.4G  0 lvm  /
root@server-backup:~# df -Th
Filesystem           Type      Size  Used Avail Use% Mounted on
udev                 devtmpfs  3.3G     0  3.3G   0% /dev
tmpfs                tmpfs     795M  720K  794M   1% /run
/dev/mapper/pbs-root ext4       78G   11G   63G  15% /
tmpfs                tmpfs     3.9G     0  3.9G   0% /dev/shm
tmpfs                tmpfs     5.0M     0  5.0M   0% /run/lock
tmpfs                tmpfs     1.0M     0  1.0M   0% /run/credentials/systemd-journald.service
tmpfs                tmpfs     3.9G  384K  3.9G   1% /run/proxmox-backup
tmpfs                tmpfs     3.9G  984K  3.9G   1% /tmp
tmpfs                tmpfs     1.0M     0  1.0M   0% /run/credentials/[email protected]
tmpfs                tmpfs     795M  4.0K  795M   1% /run/user/0

Verify the Volume Group

Check the available free space within the Volume Group (VG).

Run:

vgs

Output:

root@server-backup:~# vgs
  VG  #PV #LV #SN Attr   VSize   VFree
  pbs   1   2   0 wz--n- <99.50g <12.38g

Extend the Root Logical Volume

Extend the root logical volume to consume all available free space within the Volume Group.

Run:

lvextend -l +100%FREE /dev/pbs/root

This command allocates all remaining free extents in the Volume Group to the root logical volume.

Output:

root@server-backup:~# lvextend -l +100%FREE /dev/pbs/root
  Size of logical volume pbs/root changed from <79.37 GiB (20318 extents) to 91.74 GiB (23486 extents).
  Logical volume pbs/root successfully resized.

Resize the Filesystem

After extending the logical volume, resize the ext4 filesystem so it can use the additional storage.

Run:

resize2fs /dev/mapper/pbs-root

The filesystem will be resized online without requiring a reboot or unmounting the filesystem.

Output:

root@server-backup:~#
resize2fs /dev/mapper/pbs-root
resize2fs 1.47.2 (1-Jan-2025)
Filesystem at /dev/mapper/pbs-root is mounted on /; on-line resizing required
old_desc_blocks = 10, new_desc_blocks = 12
The filesystem on /dev/mapper/pbs-root is now 24049664 (4k) blocks long.

Verify the Expanded Storage

Verify that both the logical volume and filesystem have been successfully expanded.

Run:

lsblk
df -Th /

The output should show the increased capacity for both the root logical volume and the mounted filesystem.

Output:

root@server-backup:~# lsblk
NAME         MAJ:MIN RM  SIZE RO TYPE MOUNTPOINTS
sr0           11:0    1 1024M  0 rom
vda          253:0    0  100G  0 disk
├─vda1       253:1    0 1007K  0 part
├─vda2       253:2    0  512M  0 part
└─vda3       253:3    0 99.5G  0 part
  ├─pbs-swap 252:0    0  7.8G  0 lvm  [SWAP]
  └─pbs-root 252:1    0 91.7G  0 lvm  /
root@server-backup:~# df -Th /
Filesystem           Type  Size  Used Avail Use% Mounted on
/dev/mapper/pbs-root ext4   90G   11G   75G  13% /

Result

After completing the above steps, the root logical volume and filesystem should reflect the expanded disk size.

Component Before After
Root Logical Volume (pbs-root) 79.37 GiB 91.7 GiB
Root Filesystem 78 GB 90 GB
Available Space 63 GB 75 GB

Datastore

If your Proxmox Backup Server datastore is located on the root filesystem (for example, the default location):

/var/lib/proxmox-backup

no additional configuration is required.

The datastore will automatically use the newly expanded root filesystem once the resize operation has completed.

Notes

  • Ensure the partition has already been resized to occupy the additional disk space.
  • lvextend increases the size of the Logical Volume.
  • resize2fs performs an online filesystem resize for ext4 filesystems.
  • No reboot or downtime is required.
  • If your datastore is located on the default root filesystem, it automatically benefits from the additional storage without any further changes.

CrownCloud - Get a SSD powered KVM VPS at $4.5/month!
Use the code WELCOME for 10% off!

1 GB RAM / 25 GB SSD / 1 CPU Core / 1 TB Bandwidth per month

Available Locations: LAX | MIA | ATL | FRA | AMS