reduce virtual machine disk size

shaulyn

Member
Oct 17, 2019
2
0
21
38
Greetings, who has experience in proxmox to reduce the virtual drive? tell me trying to reduce the disk of the virtual machine, the disk itself in lvm-thin, turn off the virtual machine I do on the hypervisor fdisk / dev / mapper / pve-vm - 100 - disk - 00
There I will delete the partition, create a new one with the desired size, then do resize2fs / dev / mapper / pve-vm - disk --- 00 new_size, and there will be errors about the superblock

E2fsck -b does not help

How to reduce disk size properly virtual machines on lvm-thin
 
Hi
Personnaly the lone way i succeed to shrink vm disk was to create new HD with the right size the use clonezilla to clone old hd to new hd.

KR
 
thanks, as an option you can use. but should there be another way? Is it possible to reduce the backup of a virtual machine and install it in a new virtual machine with the desired hard disk size?
 
thanks, as an option you can use. but should there be another way? Is it possible to reduce the backup of a virtual machine and install it in a new virtual machine with the desired hard disk size?
One option that was possible was backup the VM/LXC. Then to edit the config file for the backup, for example 10G drive to 5G drive. Then restore the backup. When it restored it had the size of the drive you edited the config to.