Shrink / Reduce a volume with an LVM-XFS partition

rcd

Well-Known Member
Jul 12, 2019
246
25
58
63
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: