garfieldttt/pve-disk-shrink — explained in plain English
Analysis updated 2026-05-18
Shrink an oversized VM disk on Proxmox VE without booting a live ISO or using GParted.
Reclaim free space after the last partition on a guest disk safely.
Shrink a container's ZFS subvol quota without touching its filesystem.
Preview a shrink plan with a dry run before making any real changes.
| garfieldttt/pve-disk-shrink | soroushyasini/proxysmith | dhruvdubey17/ai-guru | |
|---|---|---|---|
| Stars | 34 | 34 | 35 |
| Language | Shell | Shell | Shell |
| Setup difficulty | moderate | moderate | easy |
| Complexity | 4/5 | 3/5 | 1/5 |
| Audience | ops devops | ops devops | general |
Figures from each repo's GitHub metadata at analysis time.
Must be run as root on a Proxmox VE node with standard PVE utilities, creates no backup so a current backup is required first.
This is a command line tool for people running Proxmox VE, a virtualization platform, who need to shrink the disk of a virtual machine or a container. It replaces the older manual method of booting a live Linux ISO and dragging partitions around in GParted. Instead, everything runs directly on the Proxmox host while the guest is stopped, using a text based dialog menu to walk you through the choices. The tool figures out the volume, the storage backend, and the partition layout on its own. It will never let you shrink a disk smaller than the actual data on it plus a safety margin you choose, which protects you from creating a disk too small to hold what is already there. Depending on the setup, it can check and shrink filesystems like ext2, ext3, ext4, and NTFS, resize partitions while keeping their identity and boot settings intact, and then shrink the underlying storage, whether that is a ZFS volume, a qcow2 image, a raw LVM volume, or Ceph storage. Certain situations are deliberately refused rather than guessed at. XFS filesystems cannot be shrunk directly, though a volume group containing XFS can still be shrunk if there is free space elsewhere in the group. Encrypted volumes like BitLocker are left untouched, and you are told to shrink or disable encryption inside Windows first. Old style MBR partition tables must be converted to GPT before the tool proceeds, and any snapshots on the guest are deleted since they block a shrink from happening at all. Before making real changes, the tool shows a full summary of what it plans to do and asks for confirmation, and it also offers a dry run mode that shows the plan without touching anything. Every step is logged to a file, and the original partition layout is saved before any change so it can be manually restored if something goes wrong. Cleanup on exit or error always removes any temporary devices or mappings it created. This tool must be run as root on a Proxmox VE node and needs standard PVE and Linux utilities already present on most installs, offering to install a few extras like ntfs-3g when required. It creates no backup on its own, so anyone using it should have a current backup ready before starting, since a shrink operation like this always carries some risk to the data.
A dialog based command line tool that safely shrinks a Proxmox VE virtual machine or container disk entirely offline, without GParted.
Mainly Shell. The stack also includes Shell, Proxmox VE, ZFS.
No license information is given in the source material.
Setup difficulty is rated moderate, with roughly 30min to a first successful run.
Mainly ops devops.
This repo across BitVibe Labs
Don't trust strangers blindly. Verify against the repo.