Re: magic device renumbering was -- Re: Linux 2.4.2ac20

From: Tim Wright (timw@splhi.com)
Date: Wed Mar 14 2001 - 11:27:10 EST


On Wed, Mar 14, 2001 at 10:36:40AM -0500, John Jasen wrote:
>
> The problem:
>
[ Device name slippage ]
>
> Possible solutions(?):
>
> Solaris uses an /etc/path_to_inst file, to keep track of device ordering,
> et al.
>
> Maybe we should consider something similar, where a physical device to
> logical device map is kept and used to keep things consistent on
> kernel/driver changes; device addition/removal, and so forth ...
>
> I am, of course, open to better solutions.
>

This would currently be massive overkill for Linux, but DYNIX/ptx avoids this
problem entirely by keeping a device naming database. This became necessary
when we added support for multi-path fibre-channel connected disks. Most
device-naming conventions rely on "physical" addresses i.e. this disk at the end
of this bus connected to this controller in this PCI slot is /dev/sdd. The
Solaris scheme mentioned above is no different in that respect. Unfortunately,
it doesn't work with multi-path FC-connected devices.

Very briefly, devices that are "id-able" i.e. already have a unique id are
simply entered into the database (SCSI drives have a unique id that you can
read at autoconf time). For elements that are not "id-able", we establish
a derived id by recording their relation to "id-able" elements. At boot time,
we scan (in parallel) the system and compare what we find to the database.
That way, you get consistent naming for devices, and, at least in the case of
the SCSI (or FC) drives, the name doesn't change, even if you pull a drive
from one bus and plug it into a different bus entirely.

As I say, this would be massive overkill for Linux, but it's a rather thorough
solution :-)

Tim

-- 
Tim Wright - timw@splhi.com or timw@aracnet.com or twright@us.ibm.com
IBM Linux Technology Center, Beaverton, Oregon
Interested in Linux scalability ? Look at http://lse.sourceforge.net/
"Nobody ever said I was charming, they said "Rimmer, you're a git!"" RD VI
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Thu Mar 15 2001 - 21:00:16 EST