cross-posted from: https://lemm.ee/post/4274796
Just wanted to share some love for this filesystem.
I’ve been running a btrfs raid1 continuously for over ten years, on a motley assortment of near-garbage hard drives of all different shapes and sizes. None of the original drives are still in it, and that server is now on its fourth motherboard. The data has survived it all!
It’s grown to 6 drives now, and most recently survived the runtime failure of a SATA controller card that four of them were attached to. After replacing it, I was stunned to discover that the volume was uncorrupted and didn’t even require repair.
So knock on wood — I’m not trying to tempt fate here. I just want to say thank you to all the devs for their hard work, and add some positive feedback to the heap since btrfs gets way more than it’s fair share of flak, which I personally find to be undeserved. Cheers!
Anything specific advice you would give to others to prevent corruption? Or keep drives healthy?
Schedule a monthly scrub (with the foreground option), and make sure you get notified if the exit code is non-zero
https://btrfs.readthedocs.io/en/latest/btrfs-scrub.html
I also have a weekly balance scheduled to keep block groups compact, although if you don’t frequently delete files this may not be necessary IMO
I’m not sure I know enough to be giving out advice, but I can tell you what I do. I do have a cron job to run scrub, to keep the bitrot away. I also tend to replace my drives proactively when they get REALLY old — the flexibility of btrfs raid1 lets me do that one drive at a time instead of two, making it much more affordable. You can plan out your storage with the btrfs calculator.