zaggynl
February 11, 2022, 12:15pm
1
Hi, I’m trying out Btrfs encryption but run into a few issues:
Following these instructions: https://opensuse.github.io/openSUSE-docs-revamped-temp/zstd/
So far I’ve opted to only try compression for /home.
During manual compression via sudo btrfs filesystem defrag -czstd -rv /home/ I run out of diskspace, not sure what I’m missing.
I’ve also edited the fstab home line: <UUID> /home btrfs subvol=/@/home,compress=zstd:1 0 0
but it doesn’t show the compression options for /home if I run mount.
I must be missing something?
edit:
I have snapshots enabled for /home, this may be causing issues…
zaggynl
February 11, 2022, 2:09pm
2
Trying:
disable snapshots for /home, remove or move /etc/snapper/configs/home
edit fstab
remount with: sudo mount -va -o remount
confirm compression with mount
run manual compression command:
sudo btrfs filesystem defrag -czstd -rv /home/
zaggynl
February 11, 2022, 2:41pm
3
Had some stale snapshots:
# btrfs subvolume show /home
@/home
Name: home
UUID: 26664e77-0fa9-0b41-8e7e-c747e74de402
Parent UUID: -
Received UUID: -
Creation time: 2020-05-02 16:32:38 +0200
Subvolume ID: 263
Generation: 3273600
Gen at creation: 24
Parent ID: 256
Top level ID: 256
Flags: -
Send transid: 0
Send time: 2020-05-02 16:32:38 +0200
Receive transid: 0
Receive time: -
Snapshot(s):
@/home/.snapshots/6468/snapshot
@/home/.snapshots/6469/snapshot
removed with:
btrfs subvolume delete /home/.snapshots/6468/snapshot
Delete subvolume (no-commit): ‘/home/.snapshots/6468/snapshot’
[FONT=monospace]btrfs subvolume delete /home/.snapshots/6469/snapshot
[FONT=monospace]Delete subvolume (no-commit): ‘/home/.snapshots/6469/snapshot’
running defrag command again as previous showed 1 failed
[/FONT][/FONT]
zaggynl
February 11, 2022, 2:58pm
4
sudo zypper install -y compsize
# compsize /home
Processed 1387945 files, 2117019 regular extents (2166408 refs), 727794 inline.
Type Perc Disk Usage Uncompressed Referenced
TOTAL 77% 380G 490G 492G
none 100% 291G 291G 291G
zstd 44% 87G 197G 200G
prealloc 100% 1.6G 1.6G 1.4G
Looks good!