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

Re: btrfs: mixing raid0 and raid1 - How?



On sábado, 16 de abril de 2016 9:00:00 (CEST) Matthias Bodenbinder wrote:
> Hello,
> 
> I have 3 hard drive with 750 GB, 500 GB and 250 GB. I want to use btrfs as
> filesystem. This will be my first test installation of btrfs.
> 
> My target is to get redundancy as well as a 750 GB data capacity. So I was
> thinking to create a raid0 with the 500 and 250 GB drive. This would result
> in a raid0 with 750 GB capacity. I want to add this raid0 as a mirror in a
> raid1 with the other 750 GB drive.
> 
> But how do I do that?
> 
> Thanks
> Matthias

Disclaimer: I have necer made anything further than a btrfs raid1 with two 
equally sized devices.


If you create a raid1 with the three devices you will get 750GB with 
redundancy. Current Btrfs raid1 means "data and metadata is copied twice in 
different devices". And btrfs is smart enough to not copy the data in the two 
smaller disks. I am not sure if this web page is accurate http://
carfax.org.uk/btrfs-usage/ but you can take a look.

You can also create a single virtual device from the 250 and 500 devices using 
mdadm or lvm and then create a btrfs raid1 out of the 750GB device and the 
virtual device.

With the "pure" btrfs setup, if you lose a single device you will be able to 
mount the device as "degraded".

With the mixed setting, you can lose a single device and read the data. 
Moreover, you can lose the two small devices and still be able to mount the 
volume.

luis



Reply to: