[Discuss] btrfs

Derek Atkins warlord at MIT.EDU
Mon Feb 25 10:53:28 EST 2013


Dan Ritter <dsr at randomstring.org> writes:

>> > "-d raid1" means mirrored data. Metadata is mirrored by default even
>> > on single drive volumes.
>> >
>> > If /dev/sdb faults then you should lose no data since every extent is
>> > replicated on both /dev/sda and /dev/sdb. If a bit error arises on
>> > either sda or sdb then a scrub will detect the error and it should
>> > automatically correct it using the replica on the other device.
>> 
>> I'm sure these are silly questions I could google myself, but: what
>> happens with more than 2 devices?  For example, if I used:
>> 
>>   mkfs.btrfs -d raid1 /dev/sda /dev/sdb /dev/sdc /dev/sdd
>> 
>> It this going to be more like raid10?
>
> No, that's still RAID1: two copies of every file, no striping.
> If you want striping+mirroring, turn on -d RAID10. 

How is it still raid1?  Maybe my definitions and your definitions are
different here.  Let's say that each device is 1TB.  If I have 2, then
obiously I only have 1TB of storage because each extent is duplicated on
both drives.  However if I have 4 drives, you imply I get 2TB of storage
(because still, each extent is mirrored on two drives).  But what I
don't understand is how is this not effectively "raid 10"?  You're
combining storage from multiple drives into a single filesystem larger
than the mirrored drives.

>> Also, can you add new devices "later" to an existing FS?  E.g., let's
>> say we start with 2 devices (sda, sdb) -- can I later add more devices?
>
> Yes, and you can convert between RAID0, 1 and 10 in a
> live-but-slow fashion.

Live conversion is always a good thing..  Of course to migrate from my
existing system I think I need something else, but that's a different
story, and one to solve once I have a few extra thousand dollars sitting
around.

> -dsr-

-derek

-- 
       Derek Atkins, SB '93 MIT EE, SM '95 MIT Media Laboratory
       Member, MIT Student Information Processing Board  (SIPB)
       URL: http://web.mit.edu/warlord/    PP-ASEL-IA     N1NWH
       warlord at MIT.EDU                        PGP key available



More information about the Discuss mailing list