Bug#514338: grub-common: grub-probe fails on RAID with "error: array->nr_devs > array->total_devs (2)?!?"
Rasmus Bøg Hansen
rasmus at msconsult.dk
Fri Feb 6 13:12:44 UTC 2009
Package: grub-common
Version: 1.96+20080724-12
Severity: important
On two of my systems with software raid install-grub fails with an error message:
root at samsi-server:~# /usr/sbin/grub-install --recheck --no-floppy /dev/sda
error: array->nr_devs > array->total_devs (2)?!?
error: array->nr_devs > array->total_devs (2)?!?
error: array->nr_devs > array->total_devs (2)?!?
error: array->nr_devs > array->total_devs (2)?!?
error: array->nr_devs > array->total_devs (2)?!?
Searching for GRUB installation directory ... found: /boot/grub
error: array->nr_devs > array->total_devs (2)?!?
Installation finished. No error reported.
This is the contents of the device map /boot/grub/device.map.
Check if this is correct or not. If any of the lines is incorrect,
fix it and re-run the script `grub-install'.
(hd0) /dev/sda
(hd1) /dev/sdb
(hd2) /dev/sdc
root at samsi-server:~#
Exactly the same happens when I use sdb or md0 instead of sda. Running grub-install through bash -x reveals that grub-probe is the problem:
++ grub-probe --device-map=/boot/grub/device.map -t drive -d /dev/sda
error: array->nr_devs > array->total_devs (2)?!?
[...]
+++ grub-probe --device-map=/boot/grub/device.map -t device /
error: array->nr_devs > array->total_devs (2)?!?
[...]
+++ grub-probe --device-map=/boot/grub/device.map -t device /boot/
error: array->nr_devs > array->total_devs (2)?!?
[...]
++ grub-probe --device-map=/boot/grub/device.map -t drive -d /dev/sda1
error: array->nr_devs > array->total_devs (2)?!?
[...]
+++ grub-probe --device-map=/boot/grub/device.map -t device /boot/grub/
error: array->nr_devs > array->total_devs (2)?!?
[...]
++ grub-probe -t fs /boot/grub
error: array->nr_devs > array->total_devs (2)?!?
System 1 is configured with root on /dev/md0 (and /boot on /):
Personalities : [raid1]
md1 : active raid1 sdc2[2](S) sda2[0] sdb2[1]
966992448 blocks [2/2] [UU]
md0 : active raid1 sdc1[2](S) sda1[0] sdb1[1]
9767424 blocks [2/2] [UU]
root at samsi-server:~# fdisk -l /dev/sda
Disk /dev/sda: 1000.2 GB, 1000204886016 bytes
255 heads, 63 sectors/track, 121601 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x000e2ef1
Device Boot Start End Blocks Id System
/dev/sda1 * 1 1216 9767488+ fd Linux raid autodetect
/dev/sda2 1217 121601 966992512+ fd Linux raid autodetect
root at samsi-server:~# fdisk -l /dev/sdb
Disk /dev/sdb: 1000.2 GB, 1000204886016 bytes
255 heads, 63 sectors/track, 121601 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x000ead2c
Device Boot Start End Blocks Id System
/dev/sdb1 * 1 1216 9767488+ fd Linux raid autodetect
/dev/sdb2 1217 121601 966992512+ fd Linux raid autodetect
System 2 is configured with root on /dev/md0 (and /boot on /):
md1 : active raid1 sdd2[2](S) sdc2[3](S) sdb2[1] sda2[0]
987904 blocks [2/2] [UU]
md2 : active raid5 sdd3[3](S) sdc3[2] sdb3[1] sda3[0]
1443616768 blocks level 5, 64k chunk, algorithm 2 [3/3] [UUU]
md0 : active raid1 sdd1[2](S) sdc1[3](S) sdb1[1] sda1[0]
9775424 blocks [2/2] [UU]
All four disks partitioned the same way:
root at sleipner:~# fdisk -l /dev/sda
Disk /dev/sda: 750.1 GB, 750156374016 bytes
255 heads, 63 sectors/track, 91201 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x00000000
Device Boot Start End Blocks Id System
/dev/sda1 * 1 1217 9775521 fd Linux raid autodetect
/dev/sda2 1218 1340 987997+ fd Linux raid autodetect
/dev/sda3 1341 91201 721808482+ fd Linux raid autodetect
On system 2 the etch version of grub (0.97-27etch1) is able to boot the system.
On system 1, however, neither etch grub, lenny grub or lenny grub-pc will install without the error message. If I install grub 0.97-51 (experimental) and grub-common (1.96+20081201-1) grub installs without error message.
I have not tried rebooting system 2 with the grub installations that gives error messages as the system is located abroad (4 hours total travel time by plane). System 1 is just 10km away but unreachable for the next week and I have only tried the etch grub.
I have tried to remove the spares on both md0 and md1 on system 1; nothing changes. I have also tried changing partition types on sdc to 83 instead of fd; still no change.
I am at a loss. I cannot figure out what is the problem, nor how to fix it. To me it seems like a bug in grub-probe from grub2. I will gladly give any information that might help.
Regards
/Rasmus Bøg Hansen
-- System Information:
Debian Release: 5.0
APT prefers testing
APT policy: (500, 'testing')
Architecture: amd64 (x86_64)
Kernel: Linux 2.6.26-1-amd64 (SMP w/2 CPU cores)
Locale: LANG=da_DK.UTF-8, LC_CTYPE=da_DK.UTF-8 (charmap=UTF-8) (ignored: LC_ALL set to da_DK.UTF-8)
Shell: /bin/sh linked to /bin/bash
Versions of packages grub-common depends on:
ii base-files 5 Debian base system miscellaneous f
ii libc6 2.7-18 GNU C Library: Shared libraries
grub-common recommends no packages.
Versions of packages grub-common suggests:
pn multiboot-doc <none> (no description available)
-- no debconf information
More information about the Pkg-grub-devel
mailing list