Debian Bug report logs - #483971
support for device-mapper multipath

version graph

Package: grub-common; Maintainer for grub-common is GRUB Maintainers <pkg-grub-devel@lists.alioth.debian.org>; Source for grub-common is src:grub2.

Reported by: Frans Pop <elendil@planet.nl>

Date: Sun, 20 Apr 2008 21:13:21 UTC

Severity: wishlist

Tags: fixed-upstream

Merged with 442382, 557359

Found in versions grub2/1.98+20100804-14, grub2/1.97+20091115-1, grub2/1.97~beta3-1

Fixed in version grub2/1.99-12

Reply or subscribe to this bug.

Toggle useless messages

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to debian-bugs-dist@lists.debian.org, Debian Install System Team <debian-boot@lists.debian.org>:
Bug#477090; Package grub-installer. Full text and rfc822 format available.

Acknowledgement sent to Frans Pop <elendil@planet.nl>:
New Bug report received and forwarded. Copy sent to Debian Install System Team <debian-boot@lists.debian.org>. Full text and rfc822 format available.

Message #5 received at submit@bugs.debian.org (full text, mbox):

From: Frans Pop <elendil@planet.nl>
To: Debian BTS Submit <submit@bugs.debian.org>
Subject: grub-installer: no support for dmraid and multipath for grub2
Date: Sun, 20 Apr 2008 23:09:28 +0200
Package: grub-installer
Version: 1.30
Severity: wishlist

grub-installer should also support setting up dmraid and multipath when 
grub2 is selected.




Blocking bugs of 477094 added: 470894, 473401, 477083, 477090, and 477092 Request was from Frans Pop <elendil@planet.nl> to control@bugs.debian.org. (Sun, 20 Apr 2008 22:12:11 GMT) Full text and rfc822 format available.

Information forwarded to debian-bugs-dist@lists.debian.org, Debian Install System Team <debian-boot@lists.debian.org>:
Bug#477090; Package grub-installer. Full text and rfc822 format available.

Message #10 received at 477090@bugs.debian.org (full text, mbox):

From: Robert Millan <rmh@aybabtu.com>
To: Frans Pop <elendil@planet.nl>
Cc: 477090@bugs.debian.org
Subject: Re: grub-installer: no support for dmraid and multipath for grub2
Date: Sun, 1 Jun 2008 16:49:28 +0200
[Message part 1 (text/plain, inline)]
clone 477090 -1
retitle -1 support for multipath
reassign -1 grub2
thanks

On Sun, Apr 20, 2008 at 11:09:28PM +0200, Frans Pop wrote:
> 
> grub-installer should also support setting up dmraid and multipath when 
> grub2 is selected.

The attached patch should add support for multipath.  However, I can't
test it myself.

If someone can confirm it works, I'll get it applied in upstream.

-- 
Robert Millan

<GPLv2> I know my rights; I want my phone call!
<DRM> What good is a phone call… if you are unable to speak?
(as seen on /.)
[multipath.diff (text/x-diff, attachment)]

Bug 477090 cloned as bug 483971. Request was from Robert Millan <rmh@aybabtu.com> to control@bugs.debian.org. (Sun, 01 Jun 2008 14:51:02 GMT) Full text and rfc822 format available.

Changed Bug title to `support for multipath' from `grub-installer: no support for dmraid and multipath for grub2'. Request was from Robert Millan <rmh@aybabtu.com> to control@bugs.debian.org. (Sun, 01 Jun 2008 14:51:06 GMT) Full text and rfc822 format available.

Bug reassigned from package `grub-installer' to `grub2'. Request was from Robert Millan <rmh@aybabtu.com> to control@bugs.debian.org. (Sun, 01 Jun 2008 14:51:07 GMT) Full text and rfc822 format available.

Tags added: moreinfo Request was from Robert Millan <rmh@aybabtu.com> to control@bugs.debian.org. (Sun, 01 Jun 2008 20:24:07 GMT) Full text and rfc822 format available.

Blocking bugs of 473401 added: 483971 Request was from Robert Millan <rmh@aybabtu.com> to control@bugs.debian.org. (Mon, 02 Jun 2008 09:39:31 GMT) Full text and rfc822 format available.

Information forwarded to debian-bugs-dist@lists.debian.org, GRUB Maintainers <pkg-grub-devel@lists.alioth.debian.org>:
Bug#483971; Package grub2. Full text and rfc822 format available.

Acknowledgement sent to Guido Günther <agx@sigxcpu.org>:
Extra info received and forwarded to list. Copy sent to GRUB Maintainers <pkg-grub-devel@lists.alioth.debian.org>. Full text and rfc822 format available.

Message #25 received at 483971@bugs.debian.org (full text, mbox):

From: Guido Günther <agx@sigxcpu.org>
To: 483971@bugs.debian.org
Cc: Frans Pop <elendil@planet.nl>
Subject: Re: Fwd: Re: grub-installer: no support for dmraid and multipath for grub2
Date: Wed, 11 Jun 2008 20:04:37 +0200
On Sun, Jun 01, 2008 at 05:13:27PM +0200, Frans Pop wrote:
> Hi Guido,
> 
> Could you take a look at this please?
> 
> The new bug number to reply to is #483971.
Calling grub-mkdevicemap detects the mp devices and adds them to
/boot/grub/device.map - in this case /dev/mapper/mpath0 is added as
(hd4). However doing a:
grub-install --no-floppy --grub-setup=/bin/true "(hd4)"
(similar to what the postinst does) gives:

grub-probe: unknown device

The reason is that grub_util_get_grub_dev treats mp as LVM. I'll fix
this up but I'm unsure what grub_util_get_grub_dev is supposed to
return?
Cheers,
 -- Guido




Information forwarded to debian-bugs-dist@lists.debian.org, GRUB Maintainers <pkg-grub-devel@lists.alioth.debian.org>:
Bug#483971; Package grub2. Full text and rfc822 format available.

Message #28 received at 483971@bugs.debian.org (full text, mbox):

From: Robert Millan <rmh@aybabtu.com>
To: Guido Günther <agx@sigxcpu.org>, 483971@bugs.debian.org
Subject: Re: Bug#483971: Fwd: Re: grub-installer: no support for dmraid and multipath for grub2
Date: Wed, 11 Jun 2008 22:53:36 +0200
On Wed, Jun 11, 2008 at 08:04:37PM +0200, Guido Günther wrote:
> 
> The reason is that grub_util_get_grub_dev treats mp as LVM. I'll fix
> this up but I'm unsure what grub_util_get_grub_dev is supposed to
> return?

grub_util_get_grub_dev() returns the corresponding GRUB drive for a given
Linux device.  This can be (hdX), (mdX) or (some-lvm-name).

The question here is how GRUB should treat your multipath device.  If it
is like any normal device, in that the BIOS will report it to GRUB as a
disk, you should arrange grub_util_get_dev_abstraction() to return
GRUB_DEV_ABSTRACTION_NONE.

If it's just an alias for an existing device, we'll probably have to
think this through.

And if it's something fancier like RAID or LVM, it'll take some work to
implement.

-- 
Robert Millan

<GPLv2> I know my rights; I want my phone call!
<DRM> What good is a phone call… if you are unable to speak?
(as seen on /.)




Information forwarded to debian-bugs-dist@lists.debian.org, GRUB Maintainers <pkg-grub-devel@lists.alioth.debian.org>:
Bug#483971; Package grub2. Full text and rfc822 format available.

Acknowledgement sent to Guido Günther <agx@sigxcpu.org>:
Extra info received and forwarded to list. Copy sent to GRUB Maintainers <pkg-grub-devel@lists.alioth.debian.org>. Full text and rfc822 format available.

Message #33 received at 483971@bugs.debian.org (full text, mbox):

From: Guido Günther <agx@sigxcpu.org>
To: Robert Millan <rmh@aybabtu.com>
Cc: 483971@bugs.debian.org
Subject: Re: Bug#483971: Fwd: Re: grub-installer: no support for dmraid and multipath for grub2
Date: Thu, 12 Jun 2008 09:04:20 +0200
On Wed, Jun 11, 2008 at 10:53:36PM +0200, Robert Millan wrote:
> grub_util_get_grub_dev() returns the corresponding GRUB drive for a given
> Linux device.  This can be (hdX), (mdX) or (some-lvm-name).
Ah, o.k. that's why there's LVM names and hdX mixed - I see now. So if
my device.map is:

(hd0) /dev/sda
(hd1) /dev/sdb
(hd2) /dev/mapper/mpath0

this should simply return (hd2)?

> The question here is how GRUB should treat your multipath device.  If it
> is like any normal device, in that the BIOS will report it to GRUB as a
> disk, you should arrange grub_util_get_dev_abstraction() to return
> GRUB_DEV_ABSTRACTION_NONE.
No. The bios doesn't now anything about the multipathing. It sees a
number of identical scsi devices sda[a-d] while Linux multipaths this to
/dev/mapper/mpath0.

> If it's just an alias for an existing device, we'll probably have to
> think this through.
/dev/mapper/mpath0 is kind of an alias for the underlying paths (e.g.
/dev/sda[a-d]). So whenever grub wants to access /dev/sd? it should
access the /dev/mapper/mpathX instead. Does this qualify as an alias?
There are two ways to find out which /dev/sd? build up the multipath
device: Looking at the multipath -l output or looking at the dm map
(like I've implemented it in parted).

> And if it's something fancier like RAID or LVM, it'll take some work to
> implement.
Looking at the LVM code that's probably not necessary. I'll have another
stab at the code when I'm near some test hardware again next week.
Cheers,
 -- Guido




Information forwarded to debian-bugs-dist@lists.debian.org, GRUB Maintainers <pkg-grub-devel@lists.alioth.debian.org>:
Bug#483971; Package grub2. Full text and rfc822 format available.

Message #36 received at 483971@bugs.debian.org (full text, mbox):

From: Robert Millan <rmh@aybabtu.com>
To: Guido Günther <agx@sigxcpu.org>
Cc: 483971@bugs.debian.org
Subject: Re: Bug#483971: Fwd: Re: grub-installer: no support for dmraid and multipath for grub2
Date: Mon, 16 Jun 2008 22:56:06 +0200
On Thu, Jun 12, 2008 at 09:04:20AM +0200, Guido Günther wrote:
> On Wed, Jun 11, 2008 at 10:53:36PM +0200, Robert Millan wrote:
> > grub_util_get_grub_dev() returns the corresponding GRUB drive for a given
> > Linux device.  This can be (hdX), (mdX) or (some-lvm-name).
> Ah, o.k. that's why there's LVM names and hdX mixed - I see now. So if
> my device.map is:
> 
> (hd0) /dev/sda
> (hd1) /dev/sdb
> (hd2) /dev/mapper/mpath0
> 
> this should simply return (hd2)?

Yes, but ...

> > The question here is how GRUB should treat your multipath device.  If it
> > is like any normal device, in that the BIOS will report it to GRUB as a
> > disk, you should arrange grub_util_get_dev_abstraction() to return
> > GRUB_DEV_ABSTRACTION_NONE.
> No. The bios doesn't now anything about the multipathing. It sees a
> number of identical scsi devices sda[a-d] while Linux multipaths this to
> /dev/mapper/mpath0.

... then /dev/mapper/mpath0 doesn't belong in device.map.

> > If it's just an alias for an existing device, we'll probably have to
> > think this through.
> /dev/mapper/mpath0 is kind of an alias for the underlying paths (e.g.
> /dev/sda[a-d]). So whenever grub wants to access /dev/sd? it should
> access the /dev/mapper/mpathX instead. Does this qualify as an alias?
> There are two ways to find out which /dev/sd? build up the multipath
> device: Looking at the multipath -l output or looking at the dm map
> (like I've implemented it in parted).

So how is this different from software RAID-1?

-- 
Robert Millan

<GPLv2> I know my rights; I want my phone call!
<DRM> What good is a phone call… if you are unable to speak?
(as seen on /.)




Information forwarded to debian-bugs-dist@lists.debian.org, GRUB Maintainers <pkg-grub-devel@lists.alioth.debian.org>:
Bug#483971; Package grub2. Full text and rfc822 format available.

Acknowledgement sent to Guido Günther <agx@sigxcpu.org>:
Extra info received and forwarded to list. Copy sent to GRUB Maintainers <pkg-grub-devel@lists.alioth.debian.org>. Full text and rfc822 format available.

Message #41 received at 483971@bugs.debian.org (full text, mbox):

From: Guido Günther <agx@sigxcpu.org>
To: Robert Millan <rmh@aybabtu.com>
Cc: 483971@bugs.debian.org
Subject: Re: Bug#483971: Fwd: Re: grub-installer: no support for dmraid and multipath for grub2
Date: Tue, 17 Jun 2008 09:16:51 +0200
[Message part 1 (text/plain, inline)]
On Mon, Jun 16, 2008 at 10:56:06PM +0200, Robert Millan wrote:
> > No. The bios doesn't now anything about the multipathing. It sees a
> > number of identical scsi devices sda[a-d] while Linux multipaths this to
> > /dev/mapper/mpath0.
> 
> ... then /dev/mapper/mpath0 doesn't belong in device.map.
O.k. So the device map only lists Bios/EFI devices?

> > > If it's just an alias for an existing device, we'll probably have to
> > > think this through.
> > /dev/mapper/mpath0 is kind of an alias for the underlying paths (e.g.
> > /dev/sda[a-d]). So whenever grub wants to access /dev/sd? it should
> > access the /dev/mapper/mpathX instead. Does this qualify as an alias?
> > There are two ways to find out which /dev/sd? build up the multipath
> > device: Looking at the multipath -l output or looking at the dm map
> > (like I've implemented it in parted).
> 
> So how is this different from software RAID-1?
I think it doesn't differ that much - this is why we could reuse most of
the grub-installer code for grub1. The basic poinst is that we need grub
to write the MBR onto /dev/mapper/mpathX and that the partitions are
/dev/mapper/mapthX-partY instead of /dev/sdaY. 
This is a bit of a special case but sufficient for the installer.
 -- Guido
[signature.asc (application/pgp-signature, inline)]

Information forwarded to debian-bugs-dist@lists.debian.org, GRUB Maintainers <pkg-grub-devel@lists.alioth.debian.org>:
Bug#483971; Package grub2. Full text and rfc822 format available.

Message #44 received at 483971@bugs.debian.org (full text, mbox):

From: Robert Millan <rmh@aybabtu.com>
To: Guido Günther <agx@sigxcpu.org>
Cc: 483971@bugs.debian.org
Subject: Re: Bug#483971: Fwd: Re: grub-installer: no support for dmraid and multipath for grub2
Date: Tue, 17 Jun 2008 13:22:41 +0200
On Tue, Jun 17, 2008 at 09:16:51AM +0200, Guido Günther wrote:
> On Mon, Jun 16, 2008 at 10:56:06PM +0200, Robert Millan wrote:
> > > No. The bios doesn't now anything about the multipathing. It sees a
> > > number of identical scsi devices sda[a-d] while Linux multipaths this to
> > > /dev/mapper/mpath0.
> > 
> > ... then /dev/mapper/mpath0 doesn't belong in device.map.
> O.k. So the device map only lists Bios/EFI devices?

It lists BIOS devices.  For the other platforms, it also has support for
Ieee1275 devices, but in general they're just dummy placeholders.

> > > > If it's just an alias for an existing device, we'll probably have to
> > > > think this through.
> > > /dev/mapper/mpath0 is kind of an alias for the underlying paths (e.g.
> > > /dev/sda[a-d]). So whenever grub wants to access /dev/sd? it should
> > > access the /dev/mapper/mpathX instead. Does this qualify as an alias?
> > > There are two ways to find out which /dev/sd? build up the multipath
> > > device: Looking at the multipath -l output or looking at the dm map
> > > (like I've implemented it in parted).
> > 
> > So how is this different from software RAID-1?
> I think it doesn't differ that much - this is why we could reuse most of
> the grub-installer code for grub1. The basic poinst is that we need grub
> to write the MBR onto /dev/mapper/mpathX and that the partitions are
> /dev/mapper/mapthX-partY instead of /dev/sdaY. 
> This is a bit of a special case but sufficient for the installer.

A proper fix belongs in GRUB, not grub-installer.  Please don't add hacks
there to workaround GRUB limitations.

I think I have enough info to sort this out now;  I'll give this a try,
maybe tomorrow, and come back with a patch for you to test.

Thanks

-- 
Robert Millan

<GPLv2> I know my rights; I want my phone call!
<DRM> What good is a phone call… if you are unable to speak?
(as seen on /.)




Tags removed: moreinfo Request was from Felix Zielcke <fzielcke@z-51.de> to control@bugs.debian.org. (Mon, 04 Aug 2008 10:24:02 GMT) Full text and rfc822 format available.

Information forwarded to debian-bugs-dist@lists.debian.org, GRUB Maintainers <pkg-grub-devel@lists.alioth.debian.org>:
Bug#483971; Package grub2. Full text and rfc822 format available.

Acknowledgement sent to Felix Zielcke <fzielcke@z-51.de>:
Extra info received and forwarded to list. Copy sent to GRUB Maintainers <pkg-grub-devel@lists.alioth.debian.org>. Full text and rfc822 format available.

Message #51 received at 483971@bugs.debian.org (full text, mbox):

From: Felix Zielcke <fzielcke@z-51.de>
To: 483971@bugs.debian.org
Cc: Frans Pop <elendil@planet.nl>
Subject: grub2: support for multipath
Date: Sun, 24 Aug 2008 10:43:48 +0200
retitle 483971 support for device-mapper multipath
thanks

Hello,

upstream has now added support for the `mdadm' multipath.
This report seems to be more for the device-mapper ones, so I just
retitle it.





Changed Bug title to `support for device-mapper multipath' from `support for multipath'. Request was from Felix Zielcke <fzielcke@z-51.de> to control@bugs.debian.org. (Sun, 24 Aug 2008 08:45:23 GMT) Full text and rfc822 format available.

Bug reassigned from package 'grub2' to 'grub-commom'. Request was from Felix Zielcke <fzielcke@z-51.de> to control@bugs.debian.org. (Fri, 24 Jul 2009 12:24:06 GMT) Full text and rfc822 format available.

Bug reassigned from package 'grub-commom' to 'grub-common'. Request was from Felix Zielcke <fzielcke@z-51.de> to control@bugs.debian.org. (Fri, 24 Jul 2009 12:33:08 GMT) Full text and rfc822 format available.

Forcibly Merged 442382 483971. Request was from Felix Zielcke <fzielcke@z-51.de> to control@bugs.debian.org. (Fri, 24 Jul 2009 12:33:09 GMT) Full text and rfc822 format available.

Forcibly Merged 442382 483971 557359. Request was from Felix Zielcke <fzielcke@z-51.de> to control@bugs.debian.org. (Sat, 21 Nov 2009 20:36:12 GMT) Full text and rfc822 format available.

Added tag(s) pending and fixed-upstream. Request was from Felix Zielcke <fzielcke@z-51.de> to control@bugs.debian.org. (Tue, 24 Nov 2009 07:51:03 GMT) Full text and rfc822 format available.

Bug archived. Request was from Debbugs Internal Request <owner@bugs.debian.org> to internal_control@bugs.debian.org. (Sat, 26 Dec 2009 07:36:00 GMT) Full text and rfc822 format available.

Bug unarchived. Request was from Guido Günther <agx@sigxcpu.org> to control@bugs.debian.org. (Sun, 28 Mar 2010 13:48:06 GMT) Full text and rfc822 format available.

Bug No longer marked as fixed in versions grub2/1.97+20091124-1 and grub2/1.97+experimental.20091127-1 and reopened. Request was from Debbugs Internal Request <owner@bugs.debian.org> to internal_control@bugs.debian.org. (Sun, 28 Mar 2010 13:48:10 GMT) Full text and rfc822 format available.

Information forwarded to debian-bugs-dist@lists.debian.org, GRUB Maintainers <pkg-grub-devel@lists.alioth.debian.org>:
Bug#483971; Package grub-common. (Mon, 19 Sep 2011 15:09:06 GMT) Full text and rfc822 format available.

Acknowledgement sent to John Morrissey <jwm@horde.net>:
Extra info received and forwarded to list. Copy sent to GRUB Maintainers <pkg-grub-devel@lists.alioth.debian.org>. (Mon, 19 Sep 2011 15:09:07 GMT) Full text and rfc822 format available.

Message #74 received at 483971@bugs.debian.org (full text, mbox):

From: John Morrissey <jwm@horde.net>
To: 483971@bugs.debian.org
Cc: control@bugs.debian.org
Subject: Patch for squeeze: grub2 support for multipath
Date: Mon, 19 Sep 2011 10:54:51 -0400
[Message part 1 (text/plain, inline)]
found 483971 1.98+20100804-14
fixed 483971 1.99-12
thanks

grub2 1.99-12 (from sid) works fine, but I ran into this upgrading our
multipathed lenny machines to squeeze. Attached is the patch from #442382
that fixes this, updated for squeeze's grub2 (1.98+20100804-14).

FWIW, unmodified 1.98+20100804-14 on squeeze fails with:

[jwm@syslog01.roch.ny:pts/4 ~> sudo dpkg-reconfigure grub-pc
Generating core.img
/usr/sbin/grub-probe: error: no such disk.
Auto-detection of a filesystem of /dev/mapper/rootvol-part1 failed.
Please report this together with the output of "/usr/sbin/grub-probe --device-map=/boot/grub/device.map --target=fs -v /boot/grub" to <bug-grub@gnu.org>

john
-- 
John Morrissey          _o            /\         ----  __o
jwm@horde.net        _-< \_          /  \       ----  <  \,
www.horde.net/    __(_)/_(_)________/    \_______(_) /_(_)__
[442382-squeeze-grub2-multipath-support.patch (text/x-diff, attachment)]

Bug Marked as found in versions grub2/1.98+20100804-14. Request was from John Morrissey <jwm@horde.net> to control@bugs.debian.org. (Mon, 19 Sep 2011 15:09:08 GMT) Full text and rfc822 format available.

Bug Marked as fixed in versions grub2/1.99-12. Request was from John Morrissey <jwm@horde.net> to control@bugs.debian.org. (Mon, 19 Sep 2011 15:09:10 GMT) Full text and rfc822 format available.

Send a report that this bug log contains spam.


Debian bug tracking system administrator <owner@bugs.debian.org>. Last modified: Thu Apr 24 06:57:44 2014; Machine Name: beach.debian.org

Debian Bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.