How to shrink raw disk image on Ceph RBD storage?

apfaffman

Member
Jan 23, 2020
9
0
6
39
Hi, everyone.

I've got a 4-node Proxmox cluster on 6.1-7 with Ceph. No problems so far with the cluster or my test VMs, except I would like to shrink the virtual disks a VM on RBD storage. I am new to Linux, but so far I understand shrinking an image means shrinking relevant partitions within the VM first. However Gparted will not allow me to resize my partitions within the VM at all; the maximum and minimum sizes allowed are the current size of the partition. This is after live booting my VM into SystemRescueCD as suggested by the Proxmox documentation on resizing disks.

My guess is having to go in with fdisk, but wanted to ask if I'm on the right track? Has anyone any experience doing this before?
 
Hi,

the exact procedure depends on your setup.
How does your VM disk stack look like?
 
Hi, wolfgang. Thanks for checking in. VM file system is ZFS. I now understand this is not shrinkable!

But to answer your question, the VM disk stack is 1 scsi disk, default cache.
 
Yes, it is correct. ZFS is not designed to shrink.
 

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!