Linux

Resize Btrfs filesystem inside LUKS encrypted LVM volume

  1. Resize Btrfs volume:

    btrfs filesystem resize /mnt -60G
  2. Force check and resive logical volume:

    e2fsck -f /dev/vg/
    lvreduce --resizefs -L -60G /dev/vg/lv
  3. Resize physical volume:

    pvresize --setphysicalvolumesize 320G /dev/sda5
  4. Grow back logical volume:

    resize2fs /dev/vg/lv

Various links

https://jakemccrary.com/blog/2018/12/27/a-more-helpful-makefile/

Make your makefiles more useful with this helpful target.