[Discuss] On Btrfs raid and odd-count disks

Richard Pieri richard.pieri at gmail.com
Thu Apr 11 18:37:02 EDT 2013


On 4/11/2013 1:55 PM, Joe Polcari wrote:
>    Not me, the person whose explaination I was originally responding
[snip badly formatted message. you should fix that when you get a chance].

To answer the question a third (fourth?) time:

RAID stands for Redundant Array of Inexpensive Disks. Contrast with
JBOD: Just a Bunch Of Disks.

What Btrfs calls "raid" is not RAID. Btrfs does not make disks
redundant. Btrfs raid (notice that Btrfs documentation spells it lower
case; I follow that convention) takes a bunch of disks and makes the
data stored on them redundant across other disks in the bunch. Given a
three-disk bunch (sda, sdb, sdc) configured for raid1 data, any file
written to sda will also be written to either sdb or sdc. Likewise, any
file written to sdb will also be written to either sda or sdc. Every
file will be mirrored on two of the three disks in the set, and the set
can survive a single disk failure without data loss. Raid1 (not RAID1)
with three disks and no single point of failure.

What's the point?

The first point is that Btrfs did not do raid5 when I first set this up
on my testbed at work. I wasn't sure what Btrfs would do when I fed it
three disks in raid1 configuration and I wanted to find out. I learned
useful things in the process.

The second point is performance. RAID5 is slow, especially when using
software RAID. Parity data calculations can put a huge load on the CPU.
Btrfs raid1 does not need to calculate parity data; it just writes data
to two different spindles in parallel.

-- 
Rich P.



More information about the Discuss mailing list