[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Installing Wheezy on btrfs only (multi-device)



Hi,

On Sun, May 06, 2012 at 02:11:58PM +0200, Steven Post wrote:
> On Sun, 2012-05-06 at 13:51 +0900, Osamu Aoki wrote:
> > Hi,
> > 
> > On Sat, May 05, 2012 at 01:24:59AM +0200, Steven Post wrote:
> > > Hello list,
> > > 
> > > I'm testing out a new system, the idea is to combine 6 hard drives into
> > > a single btrfs volume (raid10) (using subvolumes for /, /home, etc). I
> > > understand that it is now possible to also have /boot on btrfs
> > > (previously impossible because of GRUB).
> > 
> > I tried to install sysyem with much simpler configuration:
> >  / :  a single btrfs on a partition          /dev/sda1
> > swap: a single swap on a separate partition  /dev/sda2
> > 
> > It did not work due to missing fsck.btrfs in btrfs-tools.
> >  http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=668832
> >  http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=567681
> 
> I've had the same problem, but I was aware of it from an earlier attempt
> using virtualbox and a separate ext4 /boot partition. This can be solved
> by changing /etc/fstab (booting from a live cd), look for the line with
> the btrfs system, then change last number on that line to a '0' (the
> 'pass' column).

Yah, that's one way.  My bug report cited another work around.

> > > Unfortunately the Debian installer (daily build for wheezy) is unable to
> > > create multi-device btrfs volumes.
> > 
> > Yah.. but you probably can do this via shell screen.
> 
> I don't think I'm able to do that from the rescue mode shell without
> using an existing installation, without the existing installation I get
> a 'Command not found' error on 'btrfs device scan', I assume this
> includes the whole btrfs command.

It is easiest to do it using an existing installation.

Well... I see btrfs-tools-udeb package.  If you install via expermode,
you may be able to chose to install btrfs-tools-udeb via menu.
Otherwise, install such packages via wget and dpkg to rescue system
provided you have enough memory

> > > I tried the a normal install and then copy it over to a multi-device
> > > btrfs system, afterwards adding the remaining disk:
> > > 1) using a single drive to install using ext4 for /boot and btrfs for /
> > > 2) after (successful) installation boot from a live cd (ubuntu 12.04 in
> > > this case, but it shouldn't really matter)
> > 
> > How successful?  Did it boot?
> 
> It boots, yes, but you still need to change /etc/fstab using a live cd
> because of the missing fsck tool.

Yes that is a start.  I usually do this while installing with d-i CD in
advance (or in rescure mode later which is essentially a live cd)

> > > 3) create partitions for btrfs on the other 5 drives using gdisk
> > > 4) create a multi-device btrfs filesystem with those partitions, with a
> > > subvolume for the root filesystem and for /home
> > > 5) copy all the data from the first disk to the new btrfs volume
> > > 6) chroot into the rootfs of the new volume, after mounting (-o
> > > bind) /dev, /proc and /sys into the mounted system
> > > 7) change fstab for the new drives and modify /etc/default/grub
> > > 8) run update-grub: this is where things start falling down, I get an
> > > error about / not being mounted so grub fails.
> > > 
> > > This is apparently caused by a regression in GRUB [1] (Debian bug
> > > #538118).
> > 
> > Well this is possibly another problem you are facing.  Basically, you
> > should know what file to change imanually when copying files from one
> > partition to another.  So this is really an expert trick which d-i
> > currently does not support for ordinry uses.  But as I mention in the
> > above, most simple installation suffer major breakage for btrfs on
> > wheezy even if you manually adjust configuration files.
> > 
> 
> I'll have another look if my other attempts from within the d-i fails.
> 
> Another thing I noticed during my tests is that the installer will
> recognize existing btrfs partitions and is able to use them, except when
> dealing with a multi-device file system. Using rescue mode you can trick
> d-i into using them properly by executing a shel in an existing
> installation, then issuing a btrfs device scan. Once the scan is done,

This is my wild guess.  btrfs support of d-i is not so mature yet.

> you can exit the shell and go back to the partitioner. There I could
> select a device (partition) from the btrfs system and use it as /, now
> the mount works with the multi-device partition.
> Perhaps d-i should issue the 'btrfs device scan' command when starting
> the partitioner?

I think with skill and knowledge you presented, if you are successful
doing this with help of shell etc., you should present specific
procedure needed to do this to d-i BTS as wishlist bug.  That should get
it supported smoothly for upcoming release.

> Kind regards,
> Steven

Osamu


Reply to: