Hi,
today, I’ve converted my separate home partition from ext4
to btrfs
. The main reason is that it brings compression, CoW, and maybe snapshots in the future. Also, I’m eager to spice things up a bit after a few months of a perfectly running system.
For formatting, I used
mkfs.btrfs -f --label home --checksum blake2 --data single /dev/mapper/crypthome
inside a new luks2-container encrypted by a keyfile from the encrypted root partition.
There are no subvolumes because why would I need one?
Now, in the /etc/fstab
, I’ve used the following options:
UUID=... /home btrfs defaults,noatime,compress=zstd,autodefrag 0 2
After changing all the UUIDs in fstab and crypttab, everything worked right away (weird flex, but hey).
So now to my actual question. I’ve setup zstd with the default compression level 3 (as you see above). After a few tests on a subset of my home directory before, level 3 seems to be good enough. I’ve tried 8 and 12 but the compression ratio was negligible whereas the speed was halved or less.
For all my finished projects, I have a special folder where I put in a <project>.tar.zst
of each project to have it not pollute my system with a few thousand files and also regain disk space by compressing it.
From time to time, I want to go back to the project and check a few files. Usually, I use fuse-archive
(a package from the AUR) to mount the zst-file so that I don’t have to extract it.
But now, the underlying filesystem does the compression already. So, would it be enough to simply store the .tar
file without compressing it myself? This would speed up creating and accessing immensely.
I don’t care that I maybe could save a few MB or even a few GBs when compressing the project myself with a “ultra” level, I want convenience.
The backups are done with restic
which also compresses the files, so the backup storage is not overloaded.
Did I understand this correctly?