Bug#620390: This can also happen if you have old 0.90 superblocks lying about
Andy Smith
andy at strugglers.net
Mon Sep 15 17:24:28 UTC 2014
I recently needed to shrink a 6 device RAID-10 array down to 4
devices, on a Debian wheezy host. As part of that process I needed
to upgrade the metadata from 0.90 to 1.0.
After the work was done, I started receiving these "error: found two
disks with the index 3 for RAID md2" messages from grub-probe.
My searching found this bug, and the upstream bug:
http://savannah.gnu.org/bugs/index.php?34250
but both of these state that the problem is fixed upstream and that
it doesn't happen with 1.x metadata.
It turns out that the old copy of the 0.90 metadata is left on my
disk and grub-probe is finding it.
This can be verified as follows:
# mdadm --examine --metadata=1.0 /dev/sda3
/dev/sda3:
Magic : a92b4efc
Version : 1.0
Feature Map : 0x0
Array UUID : 3905b303:ca604b72:be5949c4:ab051b7a
Name : 2
Creation Time : Sun Jun 4 08:18:59 2006
Raid Level : raid10
Raid Devices : 4
Avail Dev Size : 618727264 (295.03 GiB 316.79 GB)
Array Size : 618726528 (590.06 GiB 633.58 GB)
Used Dev Size : 618726528 (295.03 GiB 316.79 GB)
Data Offset : 128 sectors
Super Offset : 618727392 sectors
State : active
Device UUID : e30176be:81a57e84:1f2aa206:9515150f
Update Time : Fri Sep 12 12:22:47 2014
Checksum : bd6c9738 - correct
Events : 1415
Layout : near=2
Chunk Size : 64K
Device Role : Active device 1
Array State : AAAA ('A' == active, '.' == missing)
[andy at specialbrew ~]$ sudo mdadm --examine --metadata=0.90 /dev/sda3
/dev/sda3:
Magic : a92b4efc
Version : 0.90.01
UUID : 3905b303:ca604b72:be5949c4:ab051b7a
Creation Time : Sun Jun 4 08:18:58 2006
Raid Level : raid10
Used Dev Size : 309363264 (295.03 GiB 316.79 GB)
Array Size : 928089792 (885.10 GiB 950.36 GB)
Raid Devices : 6
Total Devices : 6
Preferred Minor : 2
Update Time : Sun Aug 24 14:26:50 2014
State : clean
Active Devices : 6
Working Devices : 6
Failed Devices : 0
Spare Devices : 0
Checksum : e613d577 - correct
Events : 312149996
Layout : near=2
Chunk Size : 64K
Number Major Minor RaidDevice State
this 5 8 3 5 active sync /dev/sda3
0 0 8 51 0 active sync /dev/sdd3
1 1 8 67 1 active sync
2 2 8 83 2 active sync
3 3 8 19 3 active sync /dev/sdb3
4 4 8 35 4 active sync /dev/sdc3
5 5 8 3 5 active sync /dev/sda3
Note that it thinks there are 6 devices in the array, proving that
this is from before the shrink operation. The 1.0 metadata which is
currently being used says:
# mdadm --examine /dev/sda3
/dev/sda3:
Magic : a92b4efc
Version : 1.0
Feature Map : 0x0
Array UUID : 3905b303:ca604b72:be5949c4:ab051b7a
Name : 2
Creation Time : Sun Jun 4 08:18:59 2006
Raid Level : raid10
Raid Devices : 4
Avail Dev Size : 618727264 (295.03 GiB 316.79 GB)
Array Size : 618726528 (590.06 GiB 633.58 GB)
Used Dev Size : 618726528 (295.03 GiB 316.79 GB)
Data Offset : 128 sectors
Super Offset : 618727392 sectors
State : active
Device UUID : e30176be:81a57e84:1f2aa206:9515150f
Update Time : Fri Sep 12 12:22:47 2014
Checksum : bd6c9738 - correct
Events : 1415
Layout : near=2
Chunk Size : 64K
Device Role : Active device 1
Array State : AAAA ('A' == active, '.' == missing)
I am told it can be fixed by zeroing the old metadata:
# mdadm --zero-super --metadata=0.90 /dev/sda3
However, that requires the array to be stopped so I haven't verified
this yet.
I thought I would mention this on this bug report because although
it is not strictly a bug of grub-probe (grub-probe could be more
verbose about what it is reading though), it can be very confusing
as to why it is happening still with 1.0 metadata, and this bug is
the main search result I found during my research.
Is this worth separate bugs on grub-probe (wishlist: be more verbose
about which version of metadata is being found and where) and/or
mdadm (wishlist: zero old metadata after upgrading to new)?
Cheers,
Andy
More information about the Pkg-grub-devel
mailing list