grub2 LVM support does not handle MD raid1 style mirrored volumes, completely ignoring such volumes

Bug #1206238 reported by Andy Whitcroft
18
This bug affects 4 people
Affects Status Importance Assigned to Milestone
grub2 (Ubuntu)
Invalid
Medium
Unassigned

Bug Description

grub2 LVM support handles MD raid 4.5 and 6 but not raid1. If you make your boot or root raid1 it is no longer able to even list the volumes. It is therefore possible to boot your system, add a mirror, reboot and have no system at all. I would guess raid1 would be a degenerate case of the mirror support that already exists.

ProblemType: Bug
DistroRelease: Ubuntu 13.04
Package: grub2 (not installed)
ProcVersionSignature: Ubuntu 3.10.0-1.2~unstable201306041951-generic 3.10.0-rc4
Uname: Linux 3.10.0-1-generic x86_64
ApportVersion: 2.9.2-0ubuntu8.1
Architecture: amd64
Date: Mon Jul 29 20:27:49 2013
EcryptfsInUse: Yes
MarkForUpload: True
SourcePackage: grub2
UpgradeStatus: Upgraded to raring on 2013-02-26 (153 days ago)

Revision history for this message
Andy Whitcroft (apw) wrote :
Revision history for this message
Phillip Susi (psusi) wrote :

What devices does the ls command at the grub prompt show?

Changed in grub2 (Ubuntu):
status: New → Incomplete
Revision history for this message
Andy Whitcroft (apw) wrote :

@Phillip -- all of the LVM objects other than the ones of type RAID1, it simply has no support for knowing they are valid nor how to read them.

Changed in grub2 (Ubuntu):
status: Incomplete → Confirmed
Revision history for this message
Phillip Susi (psusi) wrote :

Please explicitly list the output rather than summarize it, as well as describe your configuration. Do you have lvm on top of md raid, or are you having lvm do the mirroring? Please show the output of mdadm -D on the raid1.

Changed in grub2 (Ubuntu):
status: Confirmed → Incomplete
Revision history for this message
Colin Watson (cjwatson) wrote :

Andy's pointed me at the code in question; it's clear that support is simply missing.

Changed in grub2 (Ubuntu):
importance: Undecided → Medium
status: Incomplete → Triaged
Revision history for this message
Andy Whitcroft (apw) wrote :

It is hard to get the machine in question into this state again, to get the explicit output from the grub ls command. It would list all my partitions other than the one which was switched to raid1, which was absent en-toto.

As for configuration. This is a pure LVM setup, using the MD raid personality for raid:1 underneath. There is no mdadm configuration as they are built by LVM. Looking at that device in dmsetup table it looks something like this:

    datavg-home: 0 524288000 raid raid1 3 0 region_size 1024 2 252:6 252:7 252:8 252:9

So it drops into the following piece of grub_lvm_detect():

                  else if (grub_memcmp (p, "raid", sizeof ("raid") - 1)
                           == 0 && (p[sizeof ("raid") - 1] >= '4'
                                    && p[sizeof ("raid") - 1] <= '6')
                           && p[sizeof ("raidX") - 1] == '"')
                    {

Not that this specifically only handles three types of raid:N 4, 5, and 6. With this form of symetric mirroring we have raid:1.

Revision history for this message
Vadim (vadikgo) wrote :

bug fixed in upstream grub2 git repo:
http://savannah.gnu.org/bugs/?44534

Revision history for this message
Marcus Tomlinson (marcustomlinson) wrote :

This release of Ubuntu is no longer receiving maintenance updates. If this is still an issue on a maintained version of Ubuntu please let us know.

Changed in grub2 (Ubuntu):
status: Triaged → Incomplete
Revision history for this message
Marcus Tomlinson (marcustomlinson) wrote :

This issue has sat incomplete for more than 60 days now. I'm going to close it as invalid. Please feel free re-open if this is still an issue for you. Thank you.

Changed in grub2 (Ubuntu):
status: Incomplete → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.