I recently started using Fedora with btrfs, which I think was the default on install. So far all I’ve noticed is that backups and restores are really fast and easy.
Are there any important things to be aware of, like speed, drive lifespan or energy efficiency?
The pros are that it’s hip and trendy and almost complete (and has been for the past 15 years).
The cons are it doesn’t work & has insane failure modes that maximise downtime.
Btrfs is a copy on write (COW) filesystem. Which means that whenever you modify a file it can’t be modified in place. Instead a new block is written and then a single atomic operation is done to flip that new block to be the location of that data.
This is a really good thing for protecting your data from things like power outages or system crashes because the data is always in a good state on disk. Either the update happened or it didn’t there is never any in-between.
While COW is good for data integrity it isn’t always good for speed. If you were doing lots of updates that are smaller than a block you first have to read the rest of the block and then seek to the new location and write out the new block. On ssds this isn’t a issue but on HDDs it can slow things down and fragment your filesystem considerably.
Btrfs has a defragmentation utility though so fragmentation is a fixable problem. If you were using ZFS there would be no way to reverse that fragmentation.
Other filesystems like ext4/xfs are “journaling” filesystems. Instead of writing new blocks or updating each block immediately they keep the changes in memory and write them to a “journal” on the disk. When there is time those changes from the journal are flushed to the disk to make the actual changes happen. Writing the journal to disk is a sequential operation making it more efficient on HDDs. In the event that the system crashes the filesystem replays the journal to get back to the latest state.
ZFS has a journal equivalent called the ZFS Intent Log (ZIL). You put the ZIL on fast SSDs while the data itself is on your HDDs. This also helps with the fragmentation issues for ZFS because ZFS will write incoming writes to the ZIL and then flush them to disk every few seconds. This means fewer larger writes to the HDDs.
Another downside of COW is that because the filesystem is assumed to be so good at preventing corruption, in some extremely rare cases if corruption gets written to disk you might lose the entire filesystem. There are lots of checks in software to prevent that from happening but occasionally hardware issues may let the corruption past.
This is why anyone running ZFS/btrfs for their NAS is recommended to run ECC memory. A random bit flipping in ram might mean the wrong data gets written out and if that data is part of the metadata of the filesystem itself the entire filesystem may be unrecoverable. This is exceedingly rare, but a risk.
Most traditional filesystems on the other hand were built assuming that they had to cleanup corruption from system crashes, etc. So they have fsck tools that can go through and recover as much as possible when that happens.
Lots of other posts here talking about other features that make btrfs a great choice. If you were running a high performance database a journaling filesystem would likely be faster but maybe not by much especially on SSD. But for a end user system the snapshots/file checksumming/etc are far more important than a tiny bit of performance. For the potential corruption issues if you are lacking ECC backups are the proper mitigation (as of DDR5 ECC is in all ram sticks).
DDR5 ECC isn’t as powerful as real ECC. It only requires 8 extra bits for every 64 bits of data, real ECC requires 16 bits: https://www.faceofit.com/ddr5-ecc-vs-regular-ecc-ram/
Pros: it has tools associated with it like snapper that help with keeping system functional
Cons: will eat space of your root drive, and you shouldn’t use it for your /home
shouldn’t use it for your /home
Why?
will eat the space of your home drive even more because you constantly change your home drive and btrfs snapshots grow to be gigabytes in size as a result
To be more precise, you don’t really want to use the snapshotting in the home-directory. You can still use btrfs itself and for example, openSUSE sets it up so the home-directory is in a btrfs subvolume that’s excluded from snapshots.
At the very least, you’d want the snapshots in the home-directory to be independent from the rest of the OS, so that you don’t end up rolling back what you’ve worked on when you want to roll back a faulty OS update.Well, and you also just want proper backups of your home-directory, so the snapshots are not as useful…
This is how I understand subvolumes, that unless specified otherwise, they’re excluded from snapshots taken of parent folders, so by making /home a subvolume is less about taking snapshots of that folder, and more about ensuring that taking snapshots of / doesn’t include /home.
pros: It’s perfect and does everything
cons: It doesnt work
same is true for other fedora stuff like Wayland and Flatpak
One thing not mentioned, BTRFS supports transparent compression which hypothetically can increase the longevity of SSD media by reducing the amount of writes to the drive.
I say hypothetically because further information on use case (potential write amplification from CoW) could nullify those gains — but frankly, SSD write longevity has improved so much that it is not a huge issue at this point.
backups and restores are really fast and easy.
snapshots are not backups. for your own good.
They’re a kind of backup…
On a rolling release like Arch the benefits are pretty clutch. I was messing with my DE the other week and broke something so I couldn’t get in. With GRUB and btrfs, I loaded a snapshot on reboot, typed a command to set it as my active, and restarted. Everything worked perfectly.
It’s great for single drive, raid 0, and raid 1. Don’t use it for more raid, it is not acceptable for that (raid 10 obv ok). It still can lose data for raid 5/6 still.
I’m not sure of the tools that Fedora includes to manage BTRFS but these scripts are great https://github.com/kdave/btrfsmaintenance you use them to scrub and balance. Balance is for redistributing blocks and scrub checks if bits have unexpectedly changed due to bit rot (hardware issue or cosmic ray). Scrub weekly for essential photos, important docs, and the like. Monthly for everything else. Balance monthly, or on demand if free drive space is tight and you want a bit more bits.
RAID 1 will give you bit rot detection with scrub and self-recover said bit rot detection (assuming both drives don’t mystically have the same bit flip, which is very unlikely). Single drive will just detect.
BTRFS snapshot then send/receive is excellent for a quick backup.
Remember that a BTRFS snapshot will keep all files in the snapshot, even if you delete them off the live drive. Delete 500 GB of stuff, but the space didn’t reduce? Probably a snapshot is remembering that 500 GB. Delete the snapshot and your space is back.
You can make sub volumes inside a BTRFS volume, which are basically folders but you can snapshot just them. Useful for scrubbing your essential docs folder more often than everything else, or snapshotting more often too.
Lastly, you can disable copy-on-write (cow) for volumes. Reduces their safety but increases write speed, good for caches and I’ve read VM drive images need it for performance.
Overall, great. Built-in and no need to muck with ZFS’s extra install steps, but you get the benefits ZFS has (as long as you’re ok to be limited to RAID 1)
Can’t make a claim for Fedora, but I know on OpenSUSE the maintenance,Scrub etc is already built In as cron/scripts. There’s no need to run additional scripts.
I was hoping the distros would just do the scrub/balance work for you - makes it no effort then! Good to know OpenSUSE does it for ya. Searching it looks like Fedora doesn’t have anything built in sadly, but the posts are +1 yr old so maaaybe they’ve done something.
openSuSE expects you to be on btrfs + xfs for root and home, so it’s quite well integrated, and if you learn the admin software you don’t even need to memorise any cli
openSUSE is now one big btrfs partition. They dropped the separate xfs for the home partition maybe two years ago or so. It makes it less likely to run into a situation where the snapshots fill up the root partition (which is really ugly to recover from, because users will try to uninstall packages, which doesn’t help, since the files are still contained in a previous snapshot)…
ext4 stands for “Fourth extended file system”
btrfs stands for "better filesystem "
btrfs stands for “b-tree file system” because it uses b-trees for its structure.
I refuse t believe it stands for anything other than butter filesystem.
Regular btrfs scrubs is a good idea to detect data loss/drive failure early. I have a monthly sytemd timer run it automatically.
Btrfs balance can also free up space but I don’t run it regularly.
I personally couldn’t live without the bootable snapshots that you can use to restore your system. If something goes wrong they’ll save your ass
They’re great.
Extensive data management capabilities at the expense of stability and speed is the TLDR.
What stability problems are you having with btrfs in 2025? I haven’t had any issues with it since 2019ish
I haven’t had any personally, that’s just the general sentiment. When you compare it to something like ext4, it’s generally just considered to be “less stable” 🤷
I’m also not running anything that would push it to its potential strain or max, like disk clusters or SAN systems, which may be where it’s flaws would come out more than just using it for desktop workloads.