Re: Persistent device numbers

Christoph Hellwig (hch@ns.caldera.de)
Thu, 2 Aug 2001 12:20:35 +0200


In article <000901c11b1c$a87b1f40$21c9ca95@mow.siemens.ru> you wrote:
> As far as I understand, currently kernel assigns device numbers dynamically.
> It means, that actual, user visible, controller/drive name may change if
>
> - hardware configuaration is changed (added ot removed controller, added or
> removed drive)
>
> - for some reasons order of initialisation in kernel changes (which may
> result in nasty surprise after update)
>
> Moreover, it near to impossible to know which name device gets in advance
> (or why it gets this name).
>
> Most commercial systems (O.K. those I looked into) have some sort of logical
> device numbering that assigns fixed name based on some unique hardware
> address (cf /etc/path_to_inst in Solaris). Hardware address usually is a
> path needed to access device - i.e. Bus/Slot/Channel[/drive id], so that you
> can set
>
> PCI0/Slot3/Channel1 == eth3
>
> and this never changes if you add or remove any card.
>
> Do I miss something and Linux has such mechanism?

For some device-types this is provided be userspace tools. E.g. LVM
provides persistan names for it's deice by stroing name and UUID on disk,
'normal' filesystems can be mounted by UUID or label and Andi Kleen has
a tool that allows naming network interfaces by MAC addresses.

Christoph

-- 
Of course it doesn't work. We've performed a software upgrade.
-
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/