Recently I checked my fstab. It was needed for my disk operations. rw,noatime,compress=zstd:2,ssd,space_cache,commit=120,subvol=@ 0 0
If I remember correctly it was generated during system installation (architect)
Yesterday I read Manpage for btrfs. I can’f find there anything about rw option. I’m pretty sure that it is for enabling read write but is this option necessary? Aren’t read write enabled by default?
space_cache - it’s without any options. So I assume that it’s default v1. Is this ok?
I’ve found [HowTo] Btrfs and Snapper
I don’t use snapper. Mount options written by @visone are: noatime,sdd,clear_cache,commit=120,compress=zstd
No space cache option. Is it off or v1 by default?
Is there a reason to add clear_cache in my config?
My hardware is old laptop with ssd drive. No fancy purpose. Internet, virtualbox, a little bit of everything.
Most interesting for me are rw and clear_cache
rw because I didn’t find it in manual
and clear_cache because of whats manual says:
Force clearing and rebuilding of the disk space cache if something has gone wrong.
So not very useful if you don’t know what can go wrong
Personally, I use compress=zstd without a compression level. This defaults to level 3 compression.
I also don’t have the commit=120 option in there. The default value is 30.
Yes, read/write is the default, so you don’t need to explicitly include that. But it doesn’t hurt anything if it’s there.
Yes, v1 is the default, and unless you have a multi-TeraByte SSD, you should just leave that “as is”. v2 is only really useful on very large drives.
No. It is needed only if you have been using v2 and you are switching to a kernel that doesn’t support v2, which means that the filesystem will be mounted read-only. clear_cache then allows you to mount it read/write again.
It wasn’t when I installed mine, back in April 2019. You would have to ask @philm why he chose that as the default. Maybe he took that over from Arch ─ I don’t know.
Either way, when all else fails, consult the manual.
I don’t think it really matters much, other than that it could be a performance issue.
Mind you, just because the installer applies certain defaults doesn’t mean that those are necessarily the best values. I had to change quite a bit on my own system.
For instance…
My /etc/stab still had discard as a mount option for the partitions on my SSD, while it is recommended to use the fstrim.timer instead.
The initramfs did not support a separate /usr, plus that the initramfs still uses the less-than-optimal configuration of the hooks based upon udev, rather than letting systemd gather all the required information when building the initramfs.
The default setup of sudo requires the user to enter their own password in order to have full root privileges, which is unsafe.
Did a fresh install of Manjaro (XFCE) with Btrfs and the Manjaro Installer (Calamares) did not put the commit option in fstab… (I manually put it to 60).
I also note that there is no mention of an ‘autodefrag’ option.