grub not recognising my GPT+mdadm+lvm layout

Bug #1208268 reported by Robert Collins on 2013-08-04
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
grub2 (Ubuntu)
High
Unassigned

Bug Description

I have a setup that AIUI is supported, but grub doesn't handle it for some reason.

I have 4 3TB disks in a non-UEFI AMD 64-bit PC.

Each disk has a 10MiB Bios Boot Partition, and the remainder in a 'linux raid' partition.
MDADM then has the 4 linux raid partitions in RAID6.
On top of that I have LVM2.

Grub-install finds the right modules AFAICT - and I've tried hard coding the gpt+mdadm+lvm recognisers in, wit no joy.

At the moment my workaround is to have a manually created USB key with a copy of the current kernel on it.

partition tables (sda is the aforementioned USB key)

sgdisk -p /dev/sdb
Disk /dev/sdb: 5860531055 sectors, 2.7 TiB
Logical sector size: 512 bytes
Disk identifier (GUID): 1F47EFB2-48D7-4AD3-ABBE-401315027D53
Partition table holds up to 128 entries
First usable sector is 34, last usable sector is 5860531021
Partitions will be aligned on 2048-sector boundaries
Total free space is 2014 sectors (1007.0 KiB)

Number Start (sector) End (sector) Size Code Name
   1 2048 22527 10.0 MiB EF02 BIOS boot partition
   2 22528 5860531021 2.7 TiB FD00 Linux RAID
sgdisk -p /dev/sdc
Disk /dev/sdc: 5860531055 sectors, 2.7 TiB
Logical sector size: 512 bytes
Disk identifier (GUID): 9CC043F7-A718-425D-B1EF-A790447E95C6
Partition table holds up to 128 entries
First usable sector is 34, last usable sector is 5860531021
Partitions will be aligned on 2048-sector boundaries
Total free space is 2014 sectors (1007.0 KiB)

Number Start (sector) End (sector) Size Code Name
   1 2048 22527 10.0 MiB EF02 BIOS boot partition
   2 22528 5860531021 2.7 TiB FD00 Linux RAID
sgdisk -p /dev/sdd
Disk /dev/sdd: 5860531055 sectors, 2.7 TiB
Logical sector size: 512 bytes
Disk identifier (GUID): 54345A02-B198-405C-8A1E-D6A981505D78
Partition table holds up to 128 entries
First usable sector is 34, last usable sector is 5860531021
Partitions will be aligned on 2048-sector boundaries
Total free space is 2014 sectors (1007.0 KiB)

Number Start (sector) End (sector) Size Code Name
   1 2048 22527 10.0 MiB EF02 BIOS boot partition
   2 22528 5860531021 2.7 TiB FD00 Linux RAID
sgdisk -p /dev/sde
Disk /dev/sde: 5860531055 sectors, 2.7 TiB
Logical sector size: 512 bytes
Disk identifier (GUID): 7689B7B0-94A5-4B40-AAB0-B8F6BDA26871
Partition table holds up to 128 entries
First usable sector is 34, last usable sector is 5860531021
Partitions will be aligned on 2048-sector boundaries
Total free space is 2014 sectors (1007.0 KiB)

Number Start (sector) End (sector) Size Code Name
   1 2048 22527 10.0 MiB EF02 BIOS boot partition
   2 22528 5860531021 2.7 TiB FD00 Linux RAID

The mdadm layout:
sudo mdadm --detail /dev/md127
/dev/md127:
        Version : 1.2
  Creation Time : Tue Feb 12 17:31:04 2013
     Raid Level : raid6
     Array Size : 5860245504 (5588.77 GiB 6000.89 GB)
  Used Dev Size : 2930122752 (2794.38 GiB 3000.45 GB)
   Raid Devices : 4
  Total Devices : 4
    Persistence : Superblock is persistent

    Update Time : Mon Aug 5 11:31:31 2013
          State : clean
 Active Devices : 4
Working Devices : 4
 Failed Devices : 0
  Spare Devices : 0

         Layout : left-symmetric
     Chunk Size : 512K

           Name : lifelesswks:lifelesswks (local to host lifelesswks)
           UUID : 203dffb7:ac6b75af:4ac45e35:6fe07126
         Events : 315908

    Number Major Minor RaidDevice State
       7 8 34 0 active sync /dev/sdc2
       6 8 50 1 active sync /dev/sdd2
       4 8 66 2 active sync /dev/sde2
       5 8 18 3 active sync /dev/sdb2

pvdisplay
  --- Physical volume ---
  PV Name /dev/md127
  VG Name lifelesswks
  PV Size 5.46 TiB / not usable 3.00 MiB
  Allocatable yes (but full)
  PE Size 4.00 MiB
  Total PE 1430723
  Free PE 0
  Allocated PE 1430723
  PV UUID a8ExO2-FUhl-BPwo-9Aif-XAE3-chQA-1gmv80

vgdisplay
  --- Volume group ---
  VG Name lifelesswks
  System ID
  Format lvm2
  Metadata Areas 1
  Metadata Sequence No 36
  VG Access read/write
  VG Status resizable
  MAX LV 0
  Cur LV 1
  Open LV 1
  Max PV 0
  Cur PV 1
  Act PV 1
  VG Size 5.46 TiB
  PE Size 4.00 MiB
  Total PE 1430723
  Alloc PE / Size 1430723 / 5.46 TiB
  Free PE / Size 0 / 0
  VG UUID 09ObfW-8L9y-Nevl-DOl7-IjUY-jQvn-QSsDlo

lvdisplay
  --- Logical volume ---
  LV Path /dev/lifelesswks/primary
  LV Name primary
  VG Name lifelesswks
  LV UUID UWnID9-LeLi-h8dR-rTgC-pPdS-9muQ-IBtr2D
  LV Write Access read/write
  LV Creation host, time ,
  LV Status available
  # open 1
  LV Size 5.46 TiB
  Current LE 1430723
  Segments 1
  Allocation inherit
  Read ahead sectors auto
  - currently set to 4096
  Block device 252:0

ProblemType: Bug
DistroRelease: Ubuntu 13.04
Package: grub-pc 2.00-13ubuntu3
ProcVersionSignature: Ubuntu 3.5.0-17.28-generic 3.5.5
Uname: Linux 3.5.0-17-generic x86_64
ApportVersion: 2.9.2-0ubuntu8.1
Architecture: amd64
Date: Mon Aug 5 11:11:43 2013
MarkForUpload: True
ProcEnviron:
 TERM=xterm
 PATH=(custom, no user)
 LANG=en_AU.UTF-8
 SHELL=/bin/bash
SourcePackage: grub2
UpgradeStatus: Upgraded to raring on 2013-07-14 (21 days ago)

Robert Collins (lifeless) wrote :
description: updated
description: updated
Robert Collins (lifeless) wrote :

(updating as a debug step:
# grub-install --debug-image=all /dev/sdb
Installation finished. No error reported.
# grub-install --debug-image=all /dev/sdc
Installation finished. No error reported.
# grub-install --debug-image=all /dev/sdd
Installation finished. No error reported.
# grub-install --debug-image=all /dev/sde
Installation finished. No error reported.

Colin Watson (cjwatson) wrote :

The problem here is that GRUB apparently doesn't recognise that the drive in question has LBA extensions, so when it tries to read RAID metadata (presumably from the end of the partition in question) it falls back to CHS which can't represent enough of the disk. Linux works, but Linux won't be going through the BIOS to read from the disk.

Changed in grub2 (Ubuntu):
importance: Undecided → High
status: New → Triaged
Robert Collins (lifeless) wrote :

  *-core
       description: Motherboard
       product: M61P-S3
       vendor: Gigabyte Technology Co., Ltd.
       physical id: 0
       version: x.x
       serial: Wed Jan 17 06:42:56 2007
     *-firmware
          description: BIOS
          vendor: Award Software International, Inc.
          physical id: 0
          version: F2
          date: 12/26/2006
          size: 128KiB
          capacity: 448KiB
          capabilities: pci pnp apm upgrade shadowing cdboot bootselect socketedrom edd int13floppy360 int13floppy1200 int13floppy720 int13floppy2880 int5printscreen int9keyboard int14serial int17printer int10video acpi usb ls120boot zipboot biosbootspecification
...
     *-scsi:4
          physical id: 11
          logical name: scsi6
          capabilities: emulated
        *-disk
             description: ATA Disk
             product: WDC WD30EFRX-68A
             vendor: Western Digital
             physical id: 0.0.0
             bus info: scsi@6:0.0.0
             logical name: /dev/sdd
             version: 80.0
             serial: WD-WMC1T2395636
             size: 2794GiB (3TB)
             capabilities: gpt-1.00 partitioned partitioned:gpt
             configuration: ansiversion=5 guid=54345a02-b198-405c-8a1e-d6a981505d78 sectorsize=4096
           *-volume:0
                description: BIOS Boot partition
                vendor: EFI
                physical id: 1
                bus info: scsi@6:0.0.0,1
                logical name: /dev/sdd1
                serial: 0a6de544-b201-48bd-b67b-f26ac23811e7
                capacity: 10239KiB
                capabilities: nofs
                configuration: name=BIOS boot partition
           *-volume:1
                description: RAID partition
                vendor: Linux
                physical id: 2
                bus info: scsi@6:0.0.0,2
                logical name: /dev/sdd2
                serial: 4b9cf355-a20d-476f-b027-1b842bf4043b
                capacity: 2794GiB
                capabilities: multi
                configuration: name=Linux RAID

Robert Collins (lifeless) wrote :

irc discussion:
> 2.1 TB of disks are often inaccessible from BIOS Int13H calls.

the mdadm layout should permit identifying the array without reading past 2.1GB, LVM likewise.

Colin suggests that grub2 may be taking errors from Int13h to mean 'LBA is bust' when in actual fact it works, just can't read the /whole/ disk.

http://paste.ubuntu.com/5950617/ is suggested as being part of a possible fix.

Phillip Susi (psusi) wrote :

If the bios can't read the whole disk then you will have to use a /boot partition near the start.

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers