I'm curious if an mdadm RAID array functions differently than a native RAID array. For instance, I've noticed that BTRFS has a write-hole issue with its RAID5/6 capability. If I were to create an mdadm array and then format the block device with BTRFS, would that present a problem? It seems that mdadm creates a filesystem-agnostic block device for the RAID array, suggesting that any quirks related to filesystem-specific RAID wouldn't be a factor. However, I'm not entirely sure. If they are indeed different, would using mdadm come with any performance downsides compared to a native array?
4 Answers
Essentially, both are types of software RAID unless you're using dedicated hardware for RAID. The main difference lies in how they are implemented. Native RAID setups from your motherboard often come with proprietary features, which can complicate recovery in case of hardware failure.
I can see where you're coming from. My problem with using ‘native’ RAID is the issues with BTRFS still being a bit half-baked in terms of RAID recovery. If you aim to utilize bcachefs for better performance, you might run into limitations since native RAID can't fully rebuild if a drive fails, even if the data is still intact. And yeah, BTRFS’s write-hole issue is another reason to be cautious with its native RAID.
Using mdadm is pretty reliable, but BTRFS can sometimes be finicky. If you want consistent performance and reliability, stick with mdadm and choose your filesystem accordingly.
A little clarity here: using BTRFS’s built-in RAID features alongside mdadm is typically not recommended. mdadm gives you a virtual block device that any filesystem can use, but some filesystems like BTRFS and ZFS have their own RAID functionalities. It’s often more efficient to use those rather than layering them on top of mdadm. They each handle metadata differently, which makes them inherently different.

Related Questions
Can't Load PhpMyadmin On After Server Update
Redirect www to non-www in Apache Conf
How To Check If Your SSL Cert Is SHA 1
Windows TrackPad Gestures