On Tue, Apr 28, 2015 at 11:24 AM, Neil Bothwick <[email protected]> wrote:
> The same is also  possible with BTRFS, including built in RAID. RAID5 in
> btrfs is expermiental, but its RAID1 is like RAID5 in some ways, such as
> giving the capacity of n-1 disks and tolerating a single disk failure.
>

btrfs raid5 is still fairly experimental (though now it supports
recovery) and works more-or-less how you'd expect raid5 to work.
Raid1 on btrfs gives you the capacity of n/2 and not n-1 disks, as you
would expect.  It does allow disks to be of different size, in which
case it gives you up to n/2 capacity (and usually more than you'd get
with traditional raid1 - it tries to fill the largest disks first so
3+1+1+1 TB will give you 3TB of storage, not 2TB as you'd get with
mdadm raid1).

Here is a btrfs raid1:
df -h
Filesystem                   Size  Used Avail Use% Mounted on
/dev/sdh2                    3.2T  2.7T  477G  86% /data

btrfs fi df /data
Data, RAID1: total=2.93TiB, used=2.65TiB
System, RAID1: total=32.00MiB, used=472.00KiB
Metadata, RAID1: total=16.00GiB, used=14.08GiB
GlobalReserve, single: total=512.00MiB, used=0.00B

btrfs fi sho /data
Label: 'datafs'  uuid: cd074207-9bc3-402d-bee8-6a8c77d56959
        Total devices 5 FS bytes used 2.67TiB
        devid    1 size 2.73TiB used 2.63TiB path /dev/sdh2
        devid    2 size 931.32GiB used 832.03GiB path /dev/sda2
        devid    3 size 931.32GiB used 834.00GiB path /dev/sde2
        devid    4 size 931.32GiB used 832.00GiB path /dev/sdd2
        devid    5 size 931.32GiB used 833.00GiB path /dev/sdb2


2.7TiB of data is stored on the array, which has nearly exhausted the
space of 6.4TiB of drives (or 7TB).  There are ~500GiB free, which
would let me store ~250GiB of data.

-- 
Rich

Reply via email to