2021-01-16 08:28:12 |
Kees Cook |
bug |
|
|
added bug |
2021-01-16 10:04:07 |
Kees Cook |
summary |
grub2 fails to install/probe into md device with hot spare |
grub2 fails to install/probe into md device with first drive not active (i.e. hot spare) |
|
2021-01-16 11:05:32 |
Kees Cook |
attachment added |
|
fix-md-array-list-truncation.patch https://bugs.launchpad.net/ubuntu/+source/grub2/+bug/1912043/+attachment/5453655/+files/fix-md-array-list-truncation.patch |
|
2021-01-16 11:06:34 |
Kees Cook |
bug watch added |
|
http://savannah.gnu.org/bugs/?59887 |
|
2021-01-16 12:29:04 |
Ubuntu Foundations Team Bug Bot |
tags |
|
patch |
|
2021-01-16 17:15:58 |
Kees Cook |
attachment added |
|
fix-md-array-enumeration.patch https://bugs.launchpad.net/ubuntu/+source/grub2/+bug/1912043/+attachment/5453745/+files/fix-md-array-enumeration.patch |
|
2021-01-16 17:28:33 |
Kees Cook |
summary |
grub2 fails to install/probe into md device with first drive not active (i.e. hot spare) |
grub2 fails to install/probe into md device when drives have moved around |
|
2021-01-16 17:31:02 |
Kees Cook |
description |
grub2 appears to _sometimes_ ignore md devices with a hot spare:
$ cat /proc/mdstat
Personalities : [raid1] [linear] [multipath] [raid0] [raid6] [raid5] [raid4] [raid10]
md5 : active raid1 sda2[2](S) sdb2[3] sde2[4]
2925939136 blocks super 1.2 [2/2] [UU]
bitmap: 2/22 pages [8KB], 65536KB chunk
md6 : active raid1 sdf2[0] sdd2[2](S) sdk2[1]
3902691136 blocks super 1.2 [2/2] [UU]
bitmap: 1/30 pages [4KB], 65536KB chunk
unused devices: <none>
$ sudo grub-probe -vvv / 2>&1 | grep -E 'info: Inserting md/|error'
grub-probe: info: Inserting md/6 (+0,7805382272) into systemvg (lvm)
grub-probe: error: disk `lvmid/5R9E1M-V0xL-pEsR-74zV-3oOm-JorM-hb2Erw/WHUtMx-lZcd-2RmH-WVSk-Z0Et-qiqS-hFBd4u' not found.
If I remove the hotspare from md5, everything works normally and I can install grub again. But md6 has a spare too... ?! |
grub2 appears to _sometimes_ ignore md devices with a hot spare:
$ cat /proc/mdstat
Personalities : [raid1] [linear] [multipath] [raid0] [raid6] [raid5] [raid4] [raid10]
md5 : active raid1 sda2[0](S) sdb2[1] sde2[2]
2925939136 blocks super 1.2 [2/2] [UU]
bitmap: 2/22 pages [8KB], 65536KB chunk
md6 : active raid1 sdf2[0] sdd2[2](S) sdk2[1]
3902691136 blocks super 1.2 [2/2] [UU]
bitmap: 1/30 pages [4KB], 65536KB chunk
unused devices: <none>
$ sudo grub-probe -vvv / 2>&1 | grep -E 'info: Inserting md/|error'
grub-probe: info: Inserting md/6 (+0,7805382272) into systemvg (lvm)
grub-probe: error: disk `lvmid/5R9E1M-V0xL-pEsR-74zV-3oOm-JorM-hb2Erw/WHUtMx-lZcd-2RmH-WVSk-Z0Et-qiqS-hFBd4u' not found.
If I remove the hotspare from md5, everything works normally and I can install grub again.
And if devices have moved around enough internally that the internal index doesn't match the max count any more, they also become invisible to grub. For example:
$ cat /proc/mdstat
Personalities : [raid1] [linear] [multipath] [raid0] [raid6] [raid5] [raid4] [raid10]
md5 : active raid1 sdb2[3] sde2[4]
2925939136 blocks super 1.2 [2/2] [UU]
bitmap: 2/22 pages [8KB], 65536KB chunk
Note the "[3]" and "[4]". Unlike mdadm, grub was not checking beyond the array size. This needs fixing as well. |
|