[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[bug #62756] grub-install fails with /dev/md_NAME style device names

From: Csordás Hunor
Subject: [bug #62756] grub-install fails with /dev/md_NAME style device names
Date: Tue, 12 Jul 2022 13:38:53 -0400 (EDT)

Follow-up Comment #1, bug #62756 (project grub):

Possible patch attached. This maps all the "numbered" device filenames that
were previously recognized to the same grub device as before:

* /dev/md_dNN -> mdNN
* /dev/md_dNNpMM -> mdNN,MM
* /dev/md/dNN -> mdNN
* /dev/md/dNNpMM -> mdNN,MM
* /dev/md/NN -> mdNN
* /dev/md/NNpMM -> mdNNpMM
* /dev/mdNN -> mdNN
* /dev/mdNNpMM -> mdNN,MM

And it allows the following "named" device filenames:

* /dev/md/NAME -> md/NAME (this is unchanged)
* /dev/md_NAME -> md/NAME (this is new)

In addition, the entire device filename is checked, instead of relying only on
the prefix, allowing the name in the "named" filenames to begin with a 'd' or
a number. This is still not perfect -- naming an array "d1" will still give
md1 instead of md/d1, but giving an array such a misleading name is probably a
bad idea anyway.

The device is still rejected even if an mduuid/UUID style device could be
found. This is unchanged behavior.

Finally, named devices are now always treated as unpartitioned. This is
because it's pretty much impossible to figure out the layout from the name
alone: /dev/md/ap1p2 could refer to either

0 an array named ap1p2,
0 partition 2 of an array named ap1p, or
0 partition 2 of an array named ap1.

This patch always chooses option 1. The previous behavior was inconsistent:

* if the UUID could be obtained:
** /dev/md/a2 was mapped to mduuid/UUID
** /dev/md/a1p2 was mapped to mduuid/UUID,2
** /dev/md/ap1p2 was mapped to mduuid/UUID,2
* if the UUID could not be obtained:
** /dev/md/a2 was mapped to md/a2
** /dev/md/a1p2 was mapped to md/a1,2
** /dev/md/ap1p2 was mapped to md/a,1p2

(file #53423)


Additional Item Attachment:

File name: named-md-device.patch          Size:3 KB


Reply to this item at:


Message sent via Savannah

reply via email to

[Prev in Thread] Current Thread [Next in Thread]