[Discuss] btrfs

Rich Pieri richard.pieri at gmail.com
Fri Feb 22 11:45:25 EST 2013


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.

-- 
Rich P.



More information about the Discuss mailing list