Hi, Sebastian Wiesner wrote on 28/12/2021 00:04:
Hello, I've experimented with homectl today, and noticed two issues when creating LUKS-lookback-backed home areas on top of a btrfs filesystem: 1) homectl resize doesn't work reliably on btrfs: It looks as if on btrfs resizing a home area requires more free space on the underlying btrfs filesystem than I expected. I assumed that resizing from X to Y only requires Y-X extra free space on the underlying device, but on btrfs it seems to require Y free space, i.e. it looks as if homectl attempts to allocate the entire home area anew. I've found https://github.com/systemd/systemd/issues/19398 which looks like the problem, but went nowhere. 2) homectl creates loopback files which have COW-enabled. As far as I understand btrfs it's not recommended to enable COW for large files which frequently get updated in-place which as far as I see it would include the backing loopback files for LUKS home areas. Shouldn't homectl explicitly disable COW for new home areas if the underlying file system is btrfs? I can work around 2) by setting -C on /home/ but I haven't figured out a solution for 1) Is LUKS on btrfs supported by homectl? Or should I rather use e.g. ext4 as underlying file system for /home/?
I'm migrating to a similar setup with a new laptop so would be interested in guidance/recommendations on this too if it's available. Reddit/other google results seem a little dated.
Managed to get it working on Fedora 35 install with a little PAM fighting and selinux tweaks.
Col