BTRFS and load shedding

bar1

Expert Member
Joined
Sep 15, 2008
Messages
2,584
Hi, I recently changed my server to Unraid with btrfs.
however i came across a few articles that claim that btrfs is a terrible idea without a UPS, and i can corrupt
my file system in the event of a power failure.

Should i be changing to xfs (or get a UPS),i assume it'll be a big job.
For some very very odd reason i still didn't get load shedding in 2020, but of course
we all know it's coming.
 

calypso

Expert Member
Joined
Feb 10, 2009
Messages
1,365
I had a few hard shutdowns on my unraid box and it got upset. Managed to get it going again but i bought a UPS.
Unraid has native APC support, just get the smallest one they have (with USB) and it will allow the box to have a graceful shutdown.
 

Papa Smurf

Honorary Master
Joined
Aug 2, 2016
Messages
16,743
shutting down a computer by yanking the power cord out is like closing the door while your foot is still inside
its gonna hurt sometimes
 

newby_investor

Expert Member
Joined
Aug 8, 2018
Messages
1,983
A bit late to the party, only noticed this thread now.

While @DrJohnZoidberg is correct, it's better overall to have a UPS, the btrfs filesystem only has one specific issue.

If you have your data in raid5/6 mode (metadata should always be raid1), and a drive fails, AND you get an unexpected shutdown before it repairs the array, then you can lose data or the whole array. You'd need a very strong UPS in order to last an entire scrub / rebuild.

Some folks use btrfs on top of an mdadm RAID array though, which wouldn't be susceptible to this particular failure mode. I'm not sure what Unraid does by default.
 

bar1

Expert Member
Joined
Sep 15, 2008
Messages
2,584
A bit late to the party, only noticed this thread now.

While @DrJohnZoidberg is correct, it's better overall to have a UPS, the btrfs filesystem only has one specific issue.

If you have your data in raid5/6 mode (metadata should always be raid1), and a drive fails, AND you get an unexpected shutdown before it repairs the array, then you can lose data or the whole array. You'd need a very strong UPS in order to last an entire scrub / rebuild.

Some folks use btrfs on top of an mdadm RAID array though, which wouldn't be susceptible to this particular failure mode. I'm not sure what Unraid does by default.
I currently don't have any raid, 2 hard drives in jbod config
 

newby_investor

Expert Member
Joined
Aug 8, 2018
Messages
1,983
Thanks will leave it as btrfs for now. Worst case will recover from backup
If you have (known good) backups, then you can afford to play a bit fast and loose, experiment and learn a little. Restoring from backups is inconvenient but not a tragedy.
 

bar1

Expert Member
Joined
Sep 15, 2008
Messages
2,584
I have been running a server at home probably since 2010, never really felt the need for a UPS.
 
Top