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.
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.
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.