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.
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!