Did "resize" to shrink VM disk actually work? How to tell?

unleeshop

Member
Jul 21, 2009
38
0
6
I'll try to be brief - after lots of forum reading I realized that though I was able to use the Proxmox web management client to increase the size of the drive on a Linux KVM, I probably wasn't going to have a quick way to let my Linux OS expand the partition to include the space. It'd be easier for me to just create a second virtual disk for the KVM and mount that. Did that, and it works fine.

Since I didn't expand my original Linux partition on ide0, I wanted to shrink it back down to 32Gb . The web management client reported that I had resized ide0 to 96Gb. Since the web client doesn't want to let me enter negative values to shrink the disk back down to 32 Gb, I shut down the VM and used a command line to do it: qemu-img resize /var/lib/vz/images/203/vm-203-disk-1.raw -- -64GB The command reported it was successful.

Thing is, the web client still reports ide0 as being 96 Gb. Not surprisingly, the 203.conf file also still lists it as "size=96Gb". I'm wondering
1) how I can tell if it "really" shrank, and
2) If I can just go ahead and change the "96" my 203.conf file to "32" and restart the VM.

I don't think it matters a whole lot since I didn't end up partitioning/formatting/using that extra space, but I'd like for everything to indicate how things "really" are.
 
Hi,
In my experience I had to shutdown and start the machine to make the changes.
In Linux you can see the difference with fdisk and Windows there's a disk manager.
I've done this successfully on both.

Best Regards,
 
Thanks for input - I did reboot the Linux OS and also stop/start the KVM, but the Proxmox GUI setting still said the larger number. But because I didn't every succeed in actually expanding Linux into the additional space before shrinking it back down, as far as Linux is concerned nothing has changed and nothing is wrong, so I'll just go with katakomputer's advice - I don't see how it can hurt anything.
 

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!