Technical

Accidentally Increased the Proxmox Host sda3 to Max: How to Shrink It Without Reinstalling

Accidentally Increased the Proxmox Host sda3 to Max: How to Shrink It Without Reinstalling

Accidentally increased the Proxmox host sda3 to max? Yeah, that’s annoying. But don’t panic—you can fix it without reinstalling. The key is knowing that sda3 is an LVM physical volume, not the root filesystem. So the usual shrink steps for ext4 don’t apply.

Close-up of an open vintage hard disk drive showcasing its internal components.

First, understand what you’re working with

On a default Proxmox install, the disk is partitioned like this: sda1 is BIOS boot, sda2 is EFI, and sda3 is an LVM physical volume. That PV is part of the pve volume group, which contains your root, swap, and data logical volumes. So when you expanded sda3 to max, you gave all that extra space to LVM, not directly to a filesystem.

Check your current layout with lsblk and pvs. You’ll see sda3 is huge, and the PV is using all of it. That’s the problem.

Can you shrink sda3 directly? No.

You can’t just shrink the partition while LVM is using it. LVM sees the whole partition as a PV, and it won’t let you reduce that without first moving data off. The safe way is to shrink from the inside out: reduce the logical volumes, then reduce the PV, then shrink the partition.

But here’s the catch: your root filesystem is likely ext4 or xfs on an LV. You can shrink ext4 offline, but xfs cannot be shrunk at all. If you’re on xfs, you’re stuck—you’d have to back up and recreate. For ext4, you can do it, but it’s risky and requires booting from a live CD because you can’t shrink a mounted root filesystem.

Detailed view of an open hard drive showing the internal discs and cover plate.

The practical fix: shrink the LVs, then the PV

Assuming you have ext4 and you’re willing to boot from a live USB, here’s the order:

  1. Boot from a live Linux USB (like SystemRescue or Ubuntu).
  2. Activate the LVM volume group: vgchange -ay pve
  3. Check filesystem: e2fsck -f /dev/pve/root
  4. Resize the filesystem first: resize2fs /dev/pve/root 20G (or whatever size you want).
  5. Shrink the LV to match: lvreduce -L 20G /dev/pve/root
  6. Now shrink the PV: pvresize --setphysicalvolumesize 25G /dev/sda3 (leave some slack).
  7. Finally, shrink the partition with parted or fdisk to just above the new PV size.

That’s the only clean way. It’s a pain, and if you mess up the order you’ll corrupt data. So back up first.

Or just leave it and use the space

Honestly, if you don’t need to reclaim the space for another OS or partition, just leave it. The extra space is already in your LVM pool—you can allocate it to any LV you want. Create a new LV for VMs or backups. It’s not wasted; it’s just sitting there waiting for you to use it.

I’d only go through the shrink dance if you really need that space outside of Proxmox. Otherwise, it’s not worth the risk.

If you’re dealing with LVM-thin storage, check out how to move a raw disk image from LVM-thin storage in Proxmox for related tips.

Leave a comment

Comments are reviewed before they appear. Your email is never published.