I have an existing btrfs raid1 volume consisting of 4 disks. This already contains a few subvolumes of which I'm looking to install Ubuntu to one of. I've done the following:
mount -o subvolid=0 /dev/sda1 /btrfsroot btrfs subvol create rootsfs /btrfsroot btrfs subvol set-default 376 /btrfsroot mount /dev/sda1 /rootfs (to ensure I've set the correct id)
The installer crashes out after the partitioner though (saying it can't remove needed files from
/target/). I've set it to use partition
/ without formatting.
I've done a fair bit of research but at first glance it's hard to tell what the best practice is with regards installing Ubuntu into an existing
btrfs subvolume. I've also tried:
- Not partitioning
/dev/sd[a-d]at all and adding those to the
btrfsvolume. When I install in this manner it kind of works (I have to manually mount
/target/) but then I get stuck at a
grubdebug shell on reboot
- Partitioning off 100 meg off (as
/dev/sda1) each disk and creating an
mdadmarray to use as
/dev/s[a-d]2). Again the installer crashes after partitioning saying it could not delete needed files from
/target/though nothing is there.
I've read the info on an Ubuntu wiki article and I'm guessing I'm running into the problems they mention there about set-default breaking Ubuntu's layout. Though my interpretation was that that is only an issue after install - I can't even get that far.
What is the best practice here? My reason for wanting to install onto a separate subvolume is to keep my Ubuntu install distinct from everything else on the drives. Is it safe to do an install into the root-subvolume without risking nuking my data?