Boston Linux & Unix (BLU) Home | Calendar | Mail Lists | List Archives | Desktop SIG | Hardware Hacking SIG
Wiki | Flickr | PicasaWeb | Video | Maps & Directions | Installfests | Keysignings
Linux Cafe | Meeting Notes | Blog | Linux Links | Bling | About BLU

BLU Discuss list archive


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Discuss] btrfs



On 02/22/2013 11:45 AM, Rich Pieri wrote:
> On Fri, 22 Feb 2013 11:29:42 -0500
> Jerry Feldman <gaf at blu.org> wrote:
>
>> So, assume I have 2 physical volumes, /dev/sda and /dev/sdb.
>> mkfs.btrfs -d raid1 /dev/sda /dev/sdb
>> What happens if I get a failure on /dev/sdb.
>> Assume no snapshots.
> "-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.
>
> If instead you used "-d raid0" (striped data) then the failure
> of /dev/sdb would result in the unrecoverable loss of half of your file
> extents. A bit error on sdb will be detected by a scrub but since the
> data is not replicated it is not possible to automatically correct the
> error.
>
Ok, question answered.
So if I currently had a RAID1(/dev/mdn == /dev/sdxn + /dev/sdyn)
ThenI would achieve roughly the same benefits with btrfs -d raid1.


Also, most of the examples in the Wiki and associated documents use 3
physical drives.

mkfs.btrfs -d raid1 /dev/sdb /dev/sdc /dev/sdd

In RAID, the third drive would effectively be a hot spare. What would btrfs do with the third drive. In the default, 
mkfs.btrfs  /dev/sdb /dev/sdc /dev/sdd
(ie data is RAID0 non redundant, metadata is redundant), I assume that if any one of the volumes died I would lose data. 



-- 
Jerry Feldman <gaf at blu.org>
Boston Linux and Unix
PGP key id:3BC1EB90 
PGP Key fingerprint: 49E2 C52A FC5A A31F 8D66  C0AF 7CEA 30FC 3BC1 EB90





BLU is a member of BostonUserGroups
BLU is a member of BostonUserGroups
We also thank MIT for the use of their facilities.

Valid HTML 4.01! Valid CSS!



Boston Linux & Unix / webmaster@blu.org