Need to reduce size of disk

T313C0mun1s7

New Member
Nov 6, 2024
6
0
1
I accidentally added a zero and resized a disk to be waaaaaay too large. The VM is offline, and the partition had not been extended to fill the rest of the disk. However, I can't seem to find how to resize the disk to reduce it, only to grow it. I used the GUI option to make it larger, and gparted live shows the 96.68 TiB unallocated space on the drive.

So how can I either reset the disk to what it was to try again, or reduce it to what I need? Thank you.
 
Using qm config command from the shell gives me this for the disk:

scsi0: pmpool01:vm-120-disk-0,aio=native,backup=0,cache=writeback,iothread=1,size=100000G

One too many zeros on the size. I was trying to grow from 1TB to 10TB and I didn't pay enough attention. Again, the actual partition in the disk have not been touched yet, so the data is still not changed. The attached screenshot shows that.

The Installed OS is Ubuntu Server Pro, so Linux. I can rebuild from scratch if I had to, but I would really like to avoid that if I could just shrink the disk since the partition on the disk have not yet been touched.
 

Attachments

  • screenshot.png
    screenshot.png
    136.8 KB · Views: 4
Well, I guess that is harder than I hoped it would be. Maybe I will just image the disk with clonezilla. That way I can create a new VM and get it back to what it was pretty quick. Thanks for the help.
 
Well, I guess that is harder than I hoped it would be. Maybe I will just image the disk with clonezilla. That way I can create a new VM and get it back to what it was pretty quick. Thanks for the help.
You could tell us more about pmpool01 (what storage type, what drive, what /etc/pve/storage.cfg looks like) and maybe people here can tell you how to reduce the size.
 
You could tell us more about pmpool01 (what storage type, what drive, what /etc/pve/storage.cfg looks like) and maybe people here can tell you how to reduce the size.
Thank you, but I don't think I want to mess with that. It is a 3 node HA cluster with each node having 10 disks/OSDs in a CEPH cluster. This is not a production server, but there is stuff on the cluster I don't wanna take any chances with. Mounting a second volume of the correct size to the VM, and then booting from Clonezilla Live and cloning disk to disk feels like a safer option. I was just kinda hoping there was an easy way to reset the size or undo my mistake since I had not yet followed through with resizing the partitions to fill the disk.
 
Ultimately creating a new volume and then cloning from the too large drive to the correctly sized one with the -icds option, and then booting to gparted live to resize the partition to fill the remainder of the drive worked for me. Thank you for your help.
 

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!