Btrfs Management

Hi there,
since Fedora uses btrfs as default filesystem, i expect that by default should be implemented a good rollback system or at least a default btrfs healty check but for what i read that is not or at least it was so confusing to find a specific answer.
May I ask you especially the devs one if there a specific reason? maybe its work in progress, especially the second one cause its very important…
Thanks you all

What do you expect a “a default btrfs healty check” to do?

The design of btrfs means that it checksums all its meta data so that any errors are very quickly detected without the need for an off line file system check.

Hi Barry thanks for your reply,
maybe an automatic balance/scrub (or defrag in case of hdd) when needed, something like that im not sure that fedora (workstation) is doing that type of things and if not i would know why.

This was discussed a few months ago. You might find the answers you are after in this long topic Possible Change proposal: automate BTRFS maintenance actions

2 Likes

Rollback is not a simple thing to implement as it depends on what the user’s usecase for using rollback is.

For rolling back from a dnf update I recall there is an issue with the /boot not being in btrfs and therefore not rolling back a kernel/grub etc update.

If you did have a feature to roll back the system you are likely to not want to lose changes you made to /home.

Hi!

The issues you are mentioning hare pretty easy to mitigate. You would start to put /home in a separate subvolume and then / in another. A quick look at my fedora installation and it seems that is already done. That allows you to make a snapshot of the root subvolume, and if you roll that subvolume back your home will not be affected.

The kernel isn’t such a big issue either. The normal fedora configuration keeps a few ( 3 ? ) kernels installed. So if an upgrade fails, you can always fall back to the previous kernel.

You could prototype a solution and then look to get it accepted in to Fedora.

Its realy easy to do it manually, just make a snapshot before using dnf. I myself have no real need for it. I run fedora on my playmachines and actualy ubuntu on my home server, ubuntu uses apt and there is an apt btrfs plugin ready to use there.

But, if this type of solution were to be integrated into fedora, i would just suggest that one can use already existing solutions, such as those in suse.