My State:
$: lvs
LV VG Attr LSize Pool Origin Data% Meta% Move Log Cpy%Sync Convert
home myvg -wi-ao---- 100.00g
$: btrfs filesystem resize -20g /home
$: lvreduce -L-20G /dev/myvg/home
WARNING: Reducing active and open logical volume to 80.00 GiB.
THIS MAY DESTROY YOUR DATA (filesystem etc.)
Do you really want to reduce m2ssd/home? [y/n]:
Questions:
- Will this break my filesystem
- If it wouldn't break my filesystem, howcome not?
- Does
lvreduce
/lvresize
know to move the filesystem or the filesystem know in which direction to shrink? - Where could I find relevant documentation?
- Would other filesystems work better with lvm for live resizing
First, verify your backups and run a similar command in a test environment. Take responsibility for your data.
Documentation is the man pages for each of those commands.
LVM just provides a block device, and cannot be sure of what is on your volumes. It will remove space from the end of the volume, but without knowing if that space is still used.
lvreduce --resizefs
will do it for you in one command, but is limited to what is supported byfsadm
, not btrfs. You decide whether the safety and convenience is worth not having btrfs features.