FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Debian > Debian User

 
 
LinkBack Thread Tools
 
Old 05-04-2012, 11:24 PM
Steven Post
 
Default Installing Wheezy on btrfs only (multi-device)

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).

Unfortunately the Debian installer (daily build for wheezy) is unable to
create multi-device btrfs volumes.

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)
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).

Has anyone attempted such an install before? How should I proceed with
this?

Kind regards,
Steven

[1] http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=538118
 
Old 05-05-2012, 12:33 AM
Tom H
 
Default Installing Wheezy on btrfs only (multi-device)

On Fri, May 4, 2012 at 7:24 PM, Steven Post
<redalert.commander@gmail.com> wrote:
>
> 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).
>
> Unfortunately the Debian installer (daily build for wheezy) is unable to
> create multi-device btrfs volumes.
>
> 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)
> 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).
>
> Has anyone attempted such an install before? How should I proceed with
> this?
>
> [1] http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=538118

I don't think that this bug corresponds to your problem because you're
bind-mounting "/dev".

Does grub-probe work inside the chroot?

grub-probe --target=abstraction /
grub-probe --target=drive /
grub-probe --target=fs /
grub-probe --target=fs_uuid /
grub-probe --target=partmap /


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: CAOdo=SyKQ9WhL_iOr1q+psQ4+icAwYOq-xVxf1jue9gCbE37RA@mail.gmail.com">http://lists.debian.org/CAOdo=SyKQ9WhL_iOr1q+psQ4+icAwYOq-xVxf1jue9gCbE37RA@mail.gmail.com
 
Old 05-06-2012, 04:51 AM
Osamu Aoki
 
Default Installing Wheezy on btrfs only (multi-device)

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

> 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 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?

> 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.

> Has anyone attempted such an install before? How should I proceed with
> this?

Good luck.

> Kind regards,
> Steven
>
> [1] http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=538118



--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: 20120506045149.GA6661@localhost">http://lists.debian.org/20120506045149.GA6661@localhost
 
Old 05-06-2012, 12:11 PM
Steven Post
 
Default Installing Wheezy on btrfs only (multi-device)

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).

>
> > 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.

>
> > 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.

>
> > 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,
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?

Kind regards,
Steven
 
Old 05-06-2012, 01:30 PM
Osamu Aoki
 
Default 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


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: 20120506133012.GA15043@localhost">http://lists.debian.org/20120506133012.GA15043@localhost
 
Old 05-07-2012, 12:26 AM
Steven Post
 
Default Installing Wheezy on btrfs only (multi-device)

On Fri, 2012-05-04 at 20:33 -0400, Tom H wrote:
[...]
> >
> > [1] http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=538118
>
> I don't think that this bug corresponds to your problem because you're
> bind-mounting "/dev".
>
> Does grub-probe work inside the chroot?
>
> grub-probe --target=abstraction /
> grub-probe --target=drive /
> grub-probe --target=fs /
> grub-probe --target=fs_uuid /
> grub-probe --target=partmap /
>
>

I'm guessing it doesn't, unfortunately I can't verify anymore due to
some other experimentation.

Kind regards,
Steven
 
Old 05-07-2012, 01:11 AM
Steven Post
 
Default Installing Wheezy on btrfs only (multi-device)

On Sun, 2012-05-06 at 22:30 +0900, Osamu Aoki wrote:
[...]
>
> > > > 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.

Another attempt, mixed success.
I created the btrfs filesystem using the ubuntu live cd (2 subvolumes, 1
for the root fs, 1 for /home, and set rootfs as the default subvolume),
then started the Debian installation again from the daily netinstall
iso.
Although the btrfs command isn't available from a shell, the btrfsctl
command is, so I was able to issue a "btrfsctl -a" command, equivalent
to btrfs device scan. Then in the partitioner I can select a single
partition that is part of the btrfs file system and mark it to be used
as the root fs /. The Debian-installer will then correctly mount the
btrfs file system (all 6 drives) and use it to install.

The installer only fails to install the grub bootloader, I think because
it cannot detect the multi-device btrfs file system.
I then opted for skipping installing a bootloader, figuring I could do
it afterwards in rescue mode. Installer finishes up without any further
problems.

Installing grub from rescue mode (after manually issuing a btrfsctl -a
command again) using the array as root fails with
'grub-install /dev/sda' telling me "Auto-detection of a filesystem
of /dev/sda2 failed."
Every disk has 2 partitions, a 20 MB BIOS boot partition (I thought this
might be needed because of the use of GPT partitions, not sure), the
rest is allocated to a partition used for the btrfs filesystem.

Currently I'm stuck there. I'll have a look at it again tomorrow.

>
> 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

btrfs-tools-udeb isn't available from the expert install, it is loaded
anyway as part of 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.

Good idea.

>
> > Kind regards,
> > Steven
>
> Osamu
>
 
Old 05-07-2012, 01:51 PM
Osamu Aoki
 
Default Installing Wheezy on btrfs only (multi-device)

Hi,

On Mon, May 07, 2012 at 03:11:36AM +0200, Steven Post wrote:
...
> > 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.
>
> Good idea.

If you have specific issues with grun, grub maintainer/BTS may be
another option.

Anyway, with your skill, you my get better reply from
debian-boot@lists.debian.org .

Good luck.

Osamu


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: 20120507135137.GA5328@localhost">http://lists.debian.org/20120507135137.GA5328@localhost
 

Thread Tools




All times are GMT. The time now is 08:06 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org