by 8fingerlouie · 5y ago · 0 comments
Btrfs raid1 on 4 drives has worked well for me. For media storage i use mergerfs and snapraid.
Staying away from unstable features: Is RAID 5 & 6 really considered unstable still?
“RAID1” in btrfs means “two copies of each file are stored on two disks” - so it’s closer to RAID10 in mdadm terms. It’s pretty nice as you can do things like having 3 x 1TB drives + 1 x 3TB drive and it Just Works to give 3TB of usable space.
> Staying away from unstable features: Is RAID 5 & 6 really considered unstable still?
Yup :(
Also last time I checked (I’d love to be corrected about this) even RAID1 still isn’t ideal (in particular, when a drive fails in a RAID1 array, you only get one chance to mount it r/w and rebalance your data - after that, the array is read-only, and you need to recover by creating a new array on new disks and copy all the data across)
I think you're referring to this (https://www.spinics.net/lists/linux-btrfs/msg63370.html) bug, which was fixed in kernel >= 4.20 and >= 5.0 (according to https://lore.kernel.org/linux-btrfs/CAJCQCtTRseEwoN4cbsAaE_Y...)
That being said, the bug only causes the filesystem to become permanently degraded if the number of devices fall below the required number of devices needed for the raid type, and IIRC was caused by btrfs being unable to write metadata correctly. If you had a 3 drive raid1 pool, and one of the drives failed, it would happily continue working in degraded state.
1. unmount the FS 2. make sure the dead/missing/failing device is disconnected 3. mount using -o degraded option. 4. run btrfs device remove missing <mount point>
It depends on having at least as many good drives as required for mounting the FS (which is 2 for raid1).
https://www.reddit.com/r/btrfs/comments/7os094/removing_a_de...
Don't know if raid5/6 are still considered unstable, but would be very interested as well.
//edit: shish2k was a bit faster and says nope to raid5/6
But TBH, I am fine with some down time in case of a drive failure on my personal server. I try to maintain up-to-date backups anyway, and that's a low-probability event, especially without many drives.