Sorry if this was already answered. After many years with Ext4 I made the switch to BTRFS when re-installing EOS, and I must say that I could not find a clear answer to what seems (to me) a simple question: Do I need to actively manage my BTRFS installation with some periodic commands… or just leave it as it is ? (And if I need to… then WHAT to do ?)
My configuration is the one made by Calamares, with the addition of LUKS encryption.
I have one unique SSD drive with 2 partitions. A fat one for the boot, and the btrfs one for all the rest.
Now, the system is running without issue since about 10 days, so I have nothing to “repair” (apart a warning when I shutdown, see below…). I just need to understand what is the best way to maintain the actual state.
I also have Timeshift performing snapshots at every boot, and they appear in my grub (with grub-btrfs)
My specific questions are those:
Do I need to change, add or modify some parameters (as compress, ssd, etc…) or leave it as it is ?
Do I need to perform some commands as : scrub, balance, (others?) and if yes, when is it advised to do so ?
Is it recommended to modify my sub-volumes ?
Last one: each time I shutdown or reboot I have the message “Warning: failed unmounting /home” appearing for 1 sec. It does not seems to affect the system, but… well… anything to do here ? (I have find data about issues related to mount a volume but not to unmount it).
And of course… anything other advice I didn’t think to ask about… Thanks in advance.
It depends. ssd is for SSDs, compress is to compress files. If you have or want those things, then yes.
Apart from scrub, it depends. scrub should be done periodically to check the consistency of the filesystem. balance will need to be done regularly if you frequently create/delete snapshots, and otherwise can be mostly ignored unless you’re finding otherwise-unexplainable disk performance issues. Also keep in mind that a full balance is not normally required and that filtering on metadata and disk usage is a better default, e.g.:
In what way? Subvolumes are essentially equivalent to partitions, so why would you change your partition layout?
Check the journal. Possibly a process is not exiting cleanly or within a sensible timeframe and is being killed or makes systemd think that unmounting has “failed”.
I would definitely keep @cache and @log. It should be transparent to most end users and there are benefits to both. Having a separate /var/cache has two benefits.
It keeps the cache out of your snapshots which is good because the cache has both no value and a high rate of change. In other words, it makes your snapshots use less disk space.
The second benefit is that if you boot off a read-only snapshot, it makes your system more functional since /var/cache will still be writable.
The reason for /var/log is both to keep the logs out of snapshots and allow you to be able to view the logs to see what went wrong after you restore a snapshot.
The /var/cache doesn’t need to be included in a snapshot.
The /var/log in it’s own subvolume can also be excluded from an snapshot of / thus it will not get overwritten when you restore from an snaphot.
I guess these are the reasons for the default setup.
I see so we should leave it like it is for the subvols, with a piece of brief information on why and some tutorial on how to setup snapshot usage and recovery solutions.
I do only some testing installs but personally not using BTRFS.
So any help to create the wiki is appreciated