Shrink / Reduce a volume with an LVM-XFS partition

rcd

Active Member
Jul 12, 2019
245
23
38
62
I need to shrink a Proxmox-KVM raw volume with LVM and XFS.

Now, XFS doesn't support shrinking as such. It's possible to hack around this with xfsdump and xfsrestore, but this would require 250G data to be copied offline, and that's more downtime than I like.

Whats the alternative? I was wondering if it is possible to restore a snapshot to a smaller volume? I had a look at qmrestore, but it does't appear to have an option for this?
 
Well, the normal process would be to shrink everything inside the VM like FS and partition and once that is done, shrink the block device on which the VM disk is placed, in that case the LV.

I was wondering if it is possible to restore a snapshot to a smaller volume?
The XFS FS inside the VM still is the same large size, isn't it? So that idea would only work on a storage that supports thin provisioning.
 
Ok, thanks. Unfortunately xfs is the default FS for RHEL/Centos. So I suppose the only solution is the xfsdump | xfsrestore route. :confused:
 

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!