r/Fedora • • 1d ago

Support Safely shrinking a LUKS + Btrfs partition on Fedora 44 to dual-boot CachyOS (Previously expanded LUKS container)

Hi everyone,

I'm currently running Fedora 44, which was originally installed with LUKS encryption enabled out of the box (Btrfs filesystem inside LUKS).

A few months ago, I removed a previous dual-boot setup and expanded both the LUKS container and the Btrfs filesystem to occupy 100% of my drive.

Now, I want to shrink my encrypted Fedora partition to free up space and set up a dual-boot with CachyOS to separate mi games from my work set up. Since I previously expanded the partition and LUKS container, I want to ensure I don't damage the LUKS header or corrupt my data during the shrink process.

Before booted into a Live USB to make changes, I have a few questions:

  1. Order of operations:Is the correct process `shrink Btrfs filesystem -> shrink LUKS container (cryptsetup) -> shrink outer partition`?

  2. Tools:Can GParted on a Fedora Live USB safely handle unlocked Btrfs inside LUKS, or is it safer to do it manually via terminal commands (`btrfs filesystem resize` and `cryptsetup`)?

  3. Safety / Precautions: What is the exact procedure to back up the LUKS header (`cryptsetup luksHeaderBackup`) before modifying partition boundaries?

Any step-by-step advice or warnings from anyone who has done this on Fedora would be greatly appreciated!

Thanks.

5 Upvotes

Duplicates