Subject: Bug#686097: Can't make btrfs raid1 from installer

From: Daniel Pocock <[email-masked]>
Date: Tue, 28 Aug 2012 16:08:58 +0200

Package: installation-reports

Image version: beta1 DVD amd64
http://cdimage.debian.org/cdimage/wheezy_di_beta1/amd64/iso-dvd/debian-wheezy-DI-b1-amd64-DVD-1.iso
Date: 28 August 2012

I successfully proceed through all steps up to partitioning

In the partitioning system, I create two logical volumes:

/dev/vg00/lv0
/dev/vg00/lv1

I then exit the LVM tool and in the main partitioning tool, I highlight
each of them, and designate both of them as btrfs and mount pount = /

I was expecting to create a RAID1, e.g. for the installer to run the
following command:

mkfs.btrfs \
    -m raid1 \
    -d raid1 \
  /dev/vg00/lv0 /dev/vg00/lv1

When I select `Finish...write to disk' I see the error "Identical mount
points for two file systems"

If I try to use the menu option "Configure software RAID", it only
offers the `md' RAID1 and not btrfs RAID1

There are probably several valid ways to handle this:

a) if user selects "Configure software RAID", they could be offered an
option to choose either md or btrfs style RAID

b) if user tries to assign several devices to the same mount point,
maybe they should see a prompt asking them if they want RAID1, RAID0,
etc (or if they just made a mistake and want to go back)

c) hack: maybe just ask the user if they want to drop into a shell and
create the filesystem using their own mkfs command?

This is likely to be a pain because the user can't easily RAID their
btrfs filesystem after it has been created (needs a 3.3 or later kernel
and new tools).  Therefore, it must be done from the installer, or from
a command line during the install phase.
https://btrfs.wiki.kernel.org/index.php/Balance_Filters