cannot use btrfs subvolumes with alternate installer

Amedee Van Gasse amedee-ubuntu at amedee.be
Tue Jun 21 09:24:04 UTC 2011


I have a question about btrfs and the alternate installer, but first I
have to explain a few things about btrfs, to be sure that everyone is on
the same level.


This is my current partition layout:

/dev/sda1    250MB    ext2
/dev/sda2    600GB    btrfs
/dev/sda3    200GB    ntfs
/dev/sda4     10GB    swap


The btrfs partition currently has two subvolumes:
/dev/sda2/root
/dev/sda2/home

The two btrfs subvolumes contain files that I rsynced from an existing
LVM-based Ubuntu install. I want to nuke the root subvolume and reinstall
Ubuntu 11.04 from scratch, but I want to keep the home subvolume.


I want to mount the filesystems like this:
/dev/sda1        -->   /boot
/dev/sda2        -->   /media/btrfs
/dev/sda2/root   -->   /
/dev/sda2/home   -->   /home
/dev/sda4        -->   swap


I do not want to use the btrfs "default" (top level) volume (/dev/sda2)
for anything other than easy access to subvolumes, snapshots,... I only
want to use the two named subvolumes "root" (/dev/sda2/root) and "home"
(/dev/sda2/home). This is actually what is recommended by the Btrfs
SysAdmin Guide:
https://btrfs.wiki.kernel.org/index.php/SysadminGuide#Managing_snapshots



Now comes my question.

With the alternate installer it is easy to say how my prepartitioned disk
has to be monted. /boot is not a problem, neither is swap, and at this
pount I don't care about the ntfs partition.

The problem is with the btrfs partition.
* If I tell the installer to mount as / (the most obvious), then the
installer will install everything in the top level volume, but I don't
want that. I want an empty top level volume. /home, on the other hand,
will probably be exactly as I want it.
* If I use the `btrfs subvolume set-default` command to change the default
volume from /dev/sda2 to /dev/sda2/root (as recommended by the Btrfs
SysAdmin Guide), then my top level volume will be empty (yay) and my root
subvolume will be used (yay²). However I have no option in the installer
to tell it that it should also use the home subvolume and mount that as
/home (not so yay). I can probably tweak that after installation, but
there is no way to do this during the install.
* I dug a bit into this, and I my conclusion (for now) is that the
alternate installer is totally unaware of btrfs subvolumes.


Is anyone else using a similar btrfs setup?
What are your experiences?
Do you think that the Ubuntu installer should be modified because of btrfs
subvolumes?
Should this be reported as a bug? Or perhaps a feature request?


For now I think that I'm going to use the second option, but it feels a
little dirty...

-- 
Amedee





More information about the ubuntu-users mailing list