Partition Resize Mistake

sariel1988

Member
Apr 4, 2018
12
0
6
36
So, I've made a mistake. I used the web-GUI to extend storage of one of my VM's, and instead of adding 100GB, I added 1000GB!. The physical disk isn't this big. How can I resize disk and bring the number back down to something reasonable?
 
Hi, shrinking is not supported from the GUI.

As long as you haven't extended the file system inside the VM, I think just putting back a smaller number in the .conf file should work.

If you have already increased the filesystem, what I would recommend (off the top of my head) is:
* reduce the filsystem size to below what you need
* stop the VM
* manually edit the .conf file to set the disk size to a little more than the FS size.
* start the VM and realign the FS to match the disk size.

Caution: If it was me, I would first try this in a separate VM to get confidence when I try it with my "real" VM

HTH,
Shantanu Gadgil
 
Hi Thanks for the reply. I manually edited the .conf file, and set the disk size to original, and it seemed fixed in the GUI, showing 200G. However, I I then ran the command qm resize 113 scsi0 +100G and got a disturbing message, which I've attached. Whenever I do an fdisk, this extra size is not shown. However, whenever I do a cfdisk on the VM, I have the second attached image.
 

Attachments

  • resize_results.png
    resize_results.png
    51.9 KB · Views: 5
  • cfdisk_results.png
    cfdisk_results.png
    21 KB · Views: 5
To add to this, I've also tried to do a qemu-img resize, with results as follows - no error is thrown, but after an info on the image is done, the virtual size hasn't changed!
 

Attachments

  • qemu_result.png
    qemu_result.png
    46.7 KB · Views: 3
Would it be possible to use a GUI based live CD (SystemRescueCD/GParted) to tinker with the partition table and filesystem sizes rather than plain ol' cfdisk.
Maybe that might give a better picture of what is going on. :)
 

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!