I recently installed Manjaro 21.2.3 on a workstation. I had a look on the default options in /etc/fstab right after the installation.
My root partition is BTRFS, so i have the following :
Autodefrag is good for some cases, but bad for others. So it is off by default
SSD this option is outdated. Btrfs will autodetect your ssd.
space_cache is best handled automatically by btrfs
The last column is 0 – This is the correct way to do it with btrfs, because btrfs itself does check the filesystem every time before mounting it. To set this to 1 will do nothing
If i understand well, what you mean is if i want to do btrfs filesystem defragment -r -c ...., i have to pay attention to the free space but why concretely ?
In theory, it will require less space
Recompressing everything will break all reflinks to existing snapshots.
So while the actual subvolume @ will shrink, it will have nothing in common with the snapshots you made.
You may need double space until the snapshots are deleted.
And please do not try to compress /run /proc /sys ...
(This may be ignored, or lead to an error, or segfault )
Oh oh, that’s a good point.
Currently, i have 3 snapshots of @/, they are located in
/run/timeshift/backup/timeshift-btrfs/snapshots/
Do you mean i MUST NOT defragment/compress them ?
That’s also a good point because in the Wiki link to gave me above, what i read is the following :
Subvolume@snapshots, @home.snapshots
It is wise to “store” snapshots NOT inside the subvolume they where taken from. So this may be the right place to store your snapshots of @ or @home.
→ This is fine, but on my installation (a default btrfs installation), there is no subvolume for snapshots, so they are stored in the @/ subvolume. So, i do not get why there was no @snaphot subvolume created during installation. My installation is recent, i made it last week though.
The layout from the wiki is especially easy if you manually work with btrfs.
Timeline, snapper and other programs do differ in subvolume-layout at the time being. Even on btrfs@kernel.org they say different layouts are possible, and they do not prefer one over the other.
No, You should not compress /run
This sentence speaks about the layout inside the btrfs-volume. You do not see this unless you mount the volume-root of btrfs (which is not mounted in production)