Expand a Fedora Server Disk (XCP-ng)

Servers & Storage

3 min readIntermediateLast updated Oct 29, 2026

How to give a Fedora Server VM on XCP-ng more disk space. XCP-ng VMs use Xen's paravirtual disk driver, so the disk is /dev/xvda, not /dev/sda. Fedora Server keeps the root filesystem (XFS) on LVM: xvda → partition xvda3 → volume group fedora → logical volume root.

1

Check the current layout

lsblk
sudo vgs
sudo lvs
df -h /

A typical UEFI install looks like this:

NAME              MAJ:MIN RM  SIZE RO TYPE MOUNTPOINTS
xvda              202:0    0   50G  0 disk
├─xvda1           202:1    0  600M  0 part /boot/efi
├─xvda2           202:2    0    1G  0 part /boot
└─xvda3           202:3    0 48.4G  0 part
  └─fedora-root   253:0    0   15G  0 lvm  /

Note the LVM partition number (here 3) and the volume group name (fedora on current releases; older installs may use fedora_<hostname>).

2

Grow the virtual disk in XCP-ng

XCP-ng can't resize the disk of a running VM, so shut the VM down first.

In Xen Orchestra

  1. Shut down the VM.
  2. Open the VM → Disks tab.
  3. Click the disk's size, enter the new size (e.g. 100 GiB) and confirm.
  4. Start the VM.

Or from the XCP-ng host console

xe vm-shutdown vm="fedora-server"
xe vm-disk-list vm="fedora-server"          # copy the VDI uuid of the disk
xe vdi-resize uuid=<vdi-uuid> disk-size=100GiB
xe vm-start vm="fedora-server"
3

Grow the partition

sudo dnf install -y cloud-utils-growpart
sudo growpart /dev/xvda 3

Note the space between the disk and the partition number. CHANGED: partition=3 … means it worked.

Without growpart you can use parted instead: sudo parted /dev/xvda resizepart 3 100%

4

Grow the physical volume

sudo pvresize /dev/xvda3
sudo vgs        # VFree should now show the new space
5

Grow the root volume and filesystem

sudo lvextend -r -l +100%FREE /dev/fedora/root

-r also grows the XFS filesystem while it's mounted, so no reboot is needed. If you'd rather keep some free space in the volume group (for LVM snapshots or another volume later), give a size instead, e.g. -L +40G.

6

Confirm

df -h /

Troubleshooting

  • lsblk still shows the old disk size – the VM was running during the resize, or it hasn't been restarted. Shut it down completely (not just reboot) and start it again.
  • growpart says NOCHANGE – the partition already fills the disk. Check lsblk; the space may already be in the volume group (see the box at the top).
  • "Volume group not found" – use the exact name shown by sudo vgs in the lvextend path, e.g. /dev/fedora_myhost/root.
  • The disk is /dev/sda or /dev/vda – the VM isn't using Xen's paravirtual disk driver (or isn't on XCP-ng). The steps are the same; just swap the device name.

See also: Expand an LVM Disk (Ubuntu).

Article information

Category
Servers & Storage
Read time
3 minutes
Difficulty
Intermediate
Last updated
Oct 29, 2026