
On Wed, 8 Jul 2015 03:40:29 PM Brian May wrote:
So it seems the best way of getting Raid1, for the purpose of protecting your data if one hard disk fails, is to use Software Raid, and then put bttrfs on top? Is this correct?
No. A scrub of Linux software RAID-1 will result in both disks having identical contents, it can copy bad data to the good disk to make it so. A scrub of BTRFS (only one T) will determine which data is correct based on checksums and copy good data over bad.
Is it ok to run bttrfs in a VM using virtualized disk? I have heard people say you shouldn't do this, because there is no guarantee that data has been written to physical disk when requested by the VM. Is this correct? Overly paranoid?
I am not aware of any reason why BTRFS might handle that case any worse than other filesystems. One thing that BTRFS doesn't handle well is snapshots of devices. For example if you use LVM to snapshot devices you don't want to use BTRFS in that situation. So if your VMs use LVM volumes for storage then BTRFS isn't a good choice. For some of my virtual servers I create a BTRFS subvolume named /xenstore (or whatever seems suitable) and then use files in that for block devices in virtual machines (both Xen and KVM handle files as virtual block devices). Then I can use BTRFS snapshots of /xenstore to back it up. In that case I COULD use BTRFS for the virtual machines and only make a loopback device of one of those files at a time, but I haven't felt the need to. I think that using BTRFS to manage the storage in Dom0 gives adequate data protection and snapshot features and Ext3/4 is sufficient for running in the DomU. On Thu, 9 Jul 2015 11:35:40 AM Brian May wrote:
So in other words, using BTRFS RAID-1 is fine if you have exactly two disks?
BTRFS RAID-1 is fine if you have more than 1 disk. But if you have more than 2 disks then it operates like the Linux Software RAID-10. The difference is that if you have disks that are 1TB, 2TB, and 3TB running BTRFS "RAID-1" you will get 2TB of mirrored storage. Then if you add another 1TB disk and do a balance you will get another 500G of free space. If you lose a single disk then it's no big deal. If you lose 2 disks then you have a problem. The more disks there are in the array the greater the probability of losing 2 of them. RAID-6 is a good option to solve such problems, but I don't think the BTRFS implementation is ready for important data. The ZFS RAID-6 (AKA RAID-Z2) is very solid, but you need all disks to be the same size. -- My Main Blog http://etbe.coker.com.au/ My Documents Blog http://doc.coker.com.au/