Hi, I got a tiny Lenovo M720Q (i5-8400T / 8RAM / 128NVME / 1Tb 2,5" HDD) that I want to set as my home server with the ability to add 2 more drives (for RAID5 if possible) later using its two USB 3.1 Gen 2 (10gbps).

  • The OS (debian 12 + docker) will be exclusive to the nvme, I will mostly use 40/128GB of its capacity with no idea how to make use of the rest.

  • My data (medias, documents and ISO files) will resides on the HDD pool, while keeping a copy of my docs on my home pc.

I read a bit about BTRFS RAID I even experimented with it in a VM and it really got me interested in using it because of its flexibility of balancing between raid levels and the hot swapping of unequally sized drives in both stripped and mirrored arrays. However, most of what I read online predate kernel 6,2 (which improved BTRFS RAID56 reliability). So, Here I am asking if anyone here is using BTRFS RAID and if it is stable enough to use on a mostly idle server or should I stick with LVM instead. What good practices to do or bad ones to avoid?

Thank you.

  • Atemu@lemmy.ml
    link
    fedilink
    English
    arrow-up
    1
    ·
    1 year ago

    The problem is on the logic level. What happens when a drive drops out but the other does not? Well, it will continue to receive writes because a setup like this is tolerant to such a fault.

    Now imagine both connections are flakey and the currently available drive drops out aswell. Our setup isn’t that fault tolerant, so FS goes read-only and throws IO errors on read.
    But, as the sysadmin takes a look, the drive that first dropped out re-appears, so they mount the filesystem again from the other drive and continue the workload.

    Now we have a split brain. The drive that dropped out first missed the changes that happened to the other drive. When the other drive comes back, they’ll have diverged states. Btrfs can’t merge these.

    That’s just one possible way this can go wrong. A simpler one I allured to is a lost write where a drive will claim to have permanently written something but if power was cut at that moment and the same sector read upon restart, it will not actually be the new data. If that happens to all copies of a metadata chunk, good bye btrfs.