Always have a backup (not just a snapshot) before making changes. I'm starting to see more "how can I shrink" posts and it is a PITA unless it's LXC. Much easier to just restore from before the bad resize.
Especially if the instance was installed with lvm in-vm, then you're pretty much reduced to doing things blind at the console and using rote instructions that you may not understand. And if it's a Red Hat based install, it likely used XFS by default which cannot be shrunk.
Hey,
I'm still new to proxmox and I wanted to know how I could decrease the size of a VM's Disk.
This is the specs of the VM
Within the Linux Ubuntu Server, it shows the following:
Any help would be greatly appreciated.
Thank you!!
PROTIP: Look into systemrescuecd, super grub disc and
fsarchiver, which can restore the filesystem from backup on the fly and change it from e.g. XFS to ext4, then you just update VM's fstab and possibly reinstall grub.
https://github.com/nchevsky/systemrescue-zfs/releases
https://distrowatch.com/table.php?distribution=supergrub
https://distrowatch.com/table.php?distribution=Rescatux
https://www.fsarchiver.org/
[[
FSArchiver can extract an archive to a partition which is
smaller that the original one as long as there is enough space to store the data. It can also
restore the data on a different file-system, so it can use it when you want to
convert your file-system: you can backup an ext3 file-system, and restore it as a reiserfs.
]]
Clonezilla can also reportedly resize / copy to smaller on the fly, but I have limited experience with it; might need to look into it further.
I have a mind to write up a whole HOWTO on taking apart an LVM-based VM and restore it to separate vdisks for easy resizing in the future. If you were stuck with a lift-and-shift, could make your life easier.