Increase LV size
lvresize /dev/rl/root /dev/xvda3 -L+204G
Unfortunately, the XFS filesystem can't be shrunk, only enlarged. However, the data on the fs can be dumped and restored onto a rebuilt XFS LV - this is how.
For context, I have a Rocky 9 machine with the following LVs:
/dev/rl/swap
/dev/rl/root
/dev/rl/home
Dump the XFS fs to a different partition/fs on the system
xfsdump -f /root/home-contents.dump /home
Unmount the partition that will be resized/rebuilt
umount /home
Remove the /home
LV. (I tried reducing the LV, but LVM didn't like that and refused)
lvremove /dev/rl/home
Recreate the LV with a small size
lvcreate -n home -L 8G rl
Mount the partition again (assuming everything got renamed the same, fstab
should still be accurate. If not, check fstab
)
mount /home
Restore the dump from earlier
xfsrestore -f home-contents.dump /home
Inspect the restored location to ensure all data was replaced properly
ls -l /home