Skip to contentSkip to conversation

LANANA: To Pending Device Number Registrants

DISCUSSION David Brownell 4 participants 5 messages May 15, 2001 – May 17, 2001

lore
Share & tools
lore
#0 lore raw
Quoted 2 lines

And my opinion is that the "hot-plugged" approach works for devices even if they are soldered down ...

Yep. Though I tend to look at the whole problem as "autoconfiguration" lately. Solving device naming (even the major/minor subproblem) is only one part of having a complete autoconfiguration infrastructure.

Quoted 5 lines

Now, if we just fundamentally try to think about any device as being hot-pluggable, you realize that things like "which PCI slot is this device in" are completely _worthless_ as device identification, because they fundamentally take the wrong approach, and they don't fit the generic approach at all.

Well, "completely" goes too far IMO. Unless by "identifier" you imply something of which there's only one? In my book, devices can have many kinds of identifiers.

The reason is that such "physical" identifiers (or "device topology" IDs) may be all that's available to distinguish some devices. For example, network adapters (no major/minor numbers :) and parallel/printer/serial ports may have no better "stable" (over reboots) identifier available.

Without "stable" names, it's too easy to have bad things happen, like your "confidential materials" printer output get redirected into the lobby printer, or trust your network DMZ as if it were the internal network. Given hotplugging, I think the best solution to such issues does involve exposing topological IDs such as PCI slot names. (What IDs the different applications use is a different issue.)

- Dave

#1 lore raw
Quoted 11 lines · David Bronwell
Quoted 5 lines · Linus

Now, if we just fundamentally try to think about any device as being hot-pluggable, you realize that things like "which PCI slot is this device in" are completely _worthless_ as device identification, because they fundamentally take the wrong approach, and they don't fit the generic approach at all.

The reason is that such "physical" identifiers (or "device topology" IDs) may be all that's available to distinguish some devices. For example, network adapters (no major/minor numbers :) and parallel/printer/serial ports may have no better "stable" (over reboots) identifier available.

I would have to agree that "stable" is critical to not driving people crazy. In the case of AIX, once a device is enumerated, it will retain the same name across reboots. Enough information is kept about each device to determine if it has already been enumerated (i.e. same I/O port address for serial devices, MAC address for ethernet cards, etc), or if it is a new device and should get a new name.

Quoted 4 lines

Without "stable" names, it's too easy to have bad things happen, like your "confidential materials" printer output get redirected into the lobby printer, or trust your network DMZ as if it were the internal network.

Without stable names it is basically impossible to make any sort of reasonable configuration decision, unless the configuration can be stored on the device itself. That works for disks, and not much else.

Quoted 3 lines

Given hotplugging, I think the best solution to such issues does involve exposing topological IDs such as PCI slot names. (What IDs the different applications use is a different issue.)

I disagree here. In many cases you only have a very limited number of devices of each type (or only 1), so you don't want to be bogged down with physical device naming. If you have lots of a given type of device (e.g. disks), you _also_ don't want to be bogged down with physical device naming, because it will NOT be consistent across different physical access methods. In both cases, you want a generic name PLUS a way to find out the physical characteristics (attributes) of the device to do INITIAL configuration. If the device keeps a constant name across reboots, you don't care how it is accessed after the first configuration.

Cheers, Andreas

Signature · 3 lines
Andreas Dilger  \ "If a man ate a pound of pasta and a pound of antipasto,
                 \  would they cancel out, leaving him still hungry?"
http://www-mddsp.enel.ucalgary.ca/People/adilger/               -- Dogbert
#2 lore raw

[ Re why "physical" device IDs _should_ have a critical role in sysadmin ]

Quoted 6 lines

I would have to agree that "stable" is critical to not driving people crazy. In the case of AIX, once a device is enumerated, it will retain the same name across reboots. Enough information is kept about each device to determine if it has already been enumerated (i.e. same I/O port address for serial devices, MAC address for ethernet cards, etc), or if it is a new device and should get a new name.

I caught those refs to how AIX does this ... sounds worth learning from. Does it handle USB "port addresses" (which bus and hub)?

Quoted 7 lines
Quoted 3 lines

Given hotplugging, I think the best solution to such issues does involve exposing topological IDs such as PCI slot names. (What IDs the different applications use is a different issue.)

I disagree here. In many cases you only have a very limited number of devices of each type (or only 1), so you don't want to be bogged down with physical device naming.

I'm not clear what you were disagreeing with. Though I think you've hit on an important stumbling block: folk working with only one instance of a given device type tend to come at this problem from a differerent perspective. A workable naming policy needs to not make such setups become painful; they're the "start points" most systems will grow from.

Quoted 7 lines

If you have lots of a given type of device
(e.g. disks), you _also_ don't want to be bogged down with physical device naming, because it will NOT be consistent across different physical access methods. In both cases, you want a generic name PLUS a way to find out the physical characteristics (attributes) of the device to do INITIAL configuration. If the device keeps a constant name across reboots, you don't care how it is accessed after the first configuration.

Sounds like you're actually agreeing with me that the ID used by applications ("generic name") isn't necessarily the physical/topological ID used to establish and maintain a stable non-"crazy" naming setup.

- Dave

#3 lore raw
Quoted 11 lines · David Brownell

[ Re why "physical" device IDs _should_ have a critical role in sysadmin ]

Quoted 6 lines

I would have to agree that "stable" is critical to not driving people crazy. In the case of AIX, once a device is enumerated, it will retain the same name across reboots. Enough information is kept about each device to determine if it has already been enumerated (i.e. same I/O port address for serial devices, MAC address for ethernet cards, etc), or if it is a new device and should get a new name.

I caught those refs to how AIX does this ... sounds worth learning from. Does it handle USB "port addresses" (which bus and hub)?

Solaris has a scheme that addresses the issue at well. Device nodes live in /devices (/dev has soft links into /devices) and have system-global-geographic names. In Solaris talk, the 0-1-2 of eth0-1-2 i an instance. There's a file /etc/pathtoinst that records the connection of an device instance to its /devices geographical name.

It does keep naming stable, but can be a PITA at times when you're reconfiguring a system and *want* to renumber things. (There are magic ways to do it, though).

That's all Solaris 2.6; not sure about 2.8.

Signature · 1 line
/Jonathan Lundell.
#4 lore raw
In reply to Andreas Dilger

At the risk of offending hundreds, I'll mention that dynamic naming of disks and tapes has worked very well for many years in VMS. When you e.g. mount a disk volume labelled FOO, the system creates a system logical name DISK$FOO: for it automagically. Users don't care that it's really $4$DUA7: (which is *really* disk#5 on one HSCxx controller and disk#2 on another one). When you open DISK$FOO:[some.where]some.file , the kernel knows what you meant.

Substitute ephemeral device special files for the system logical names and you've got something like what's being discussed here.

Mind you, when that AI-thingy, I forget the name, suspects an impending failure and wants to send me mail about it, *it* needs some way to tell me which physical device needs replacing, so that I don't remove the wrong one. So physical locations have value, but only in special circumstances. Ordinary end-use and daily system administration shouldn't employ them.

Signature · 2 lines
Mark H. Wood, Lead System Programmer   [email protected]
Make a good day.