
On Sun, 17 Jun 2012, Avi Miller <avi.miller@gmail.com> wrote:
On 17/06/2012, at 8:21 PM, Russell Coker wrote:
My plan is to break the RAID, convert one of the constituent devices with the btrfs-convert program, and then add the other one via "btrfs device add".
How do I get the new BTRFS device to use RAID-1 for data and metadata? Avi, from your talk I got the impression that this was already possible but the man page doesn't reveal how.
# mkfs.btrfs -m raid1 -d raid1 /dev/sdX
That works if you have empty disk space. But if you are converting from ext3/4 then mkfs isn't the option. The only way I can do this without some variant of backup/format/restore which involves backing up 260G of data at a time is to convert one half of the RAID to BTRFS and then add the other back in. With Linux Software RAID-1 it's a standard installation process to install on a degraded RAID array and then insert a second disk to complete the array afterwards. I'd like to do something similar with BTRFS but starting with btrfs-convert.
I'm using btrfs-tools version 0.19+20120328-3 and kernel 3.2.0-2-amd64 from Debian/Unstable. Do I need to get a newer version of the kernel or the tools?
Nope, that'll work. Though, I do recommend a 3.4 kernel for the latest btrfs set.
Debian won't be supporting 3.4 for ages, we are in the middle of finalising a release with 3.2 and I think it's safe to predict that the kernel team will get that well out of the way before even thinking about 3.4. So the question is, is it worth the pain of running an Oracle kernel with Debian for the newer BTRFS code? Also I'll probably install some systems with Oracle Dom0 and Debian DomUs, that should be easy to setup and manage. -- My Main Blog http://etbe.coker.com.au/ My Documents Blog http://doc.coker.com.au/