Basically, what you describe is the system that AIX has used since day 1.
All devices are "discovered" at boot time (even if they are soldered-down),
and registered in a database (for Linux that database could be /dev and
some text files in /etc)...
Every device driver supports hot-plugging. No "static" major or minor
numbers per-se (i.e. no HPA needed), but devices are static in the sense
of "once a device node is created in /dev, it does not change major/minor
numbers until removed", so it is the same device name across reboots.
Devices keep a device node in /dev until specifically unconfigured (so
sysadmins know a device disappeared) but are seen as "unavailable", and
can be permanently removed via "rmdev". Real hot-plug devices on Linux
could remove their own device node when removed, I suppose.
> This is true to the point that I would not actually think that it is a bad
> idea to call /sbin/hotplug when we enumerate the motherboard devices. In
> fact, if you look at the current network drivers, this is exactly what
> will happen: when we auto-detect the motherboard devices, we _will_
> actually call /sbin/hotplug to tell that we've "inserted" a network
> device.
Yes, in AIX it is always possible to re-run device detection (cfgmgr)
to find new devices (if they do not announce that fact themselves).
This would re-traverse all of the system busses (including CPU, memory,
motherboard(s), etc) looking for new devices, and each item found
spits out either endpoints or children which need further enumeration.
It is also possible to only selectively run device detection, so you
could, say, ask it to check for new disks only on a specific adapter
(important if you have 300 disks on a system).
This way you can detect new disks, adapter cards, serial ports, etc. any
time after the system is up. All disks are identified as "/dev/hdiskX",
(serial ports /dev/ttySX, etc) and if you really need to know more
about the location of the device that is stored as part of the device
attributes (e.g. physical path to that device, I/O addresses, some device
attributes like serial number/MAC/etc).
> [ The biggest silliness is this "let's try to make the disks appear in the
> same order that the BIOS probes them". Now THAT is really stupid, and it
> goes on a lot more than I'd ever like to see. ]
Of course, since AIX uses exclusively LVM, it can identify which disk
is which no matter where it has moved, so it never had that legacy "I
have a DOS partition on C: and D: and I don't want to toast them" issue.
Since AIX runs only on proprietary H/W it always can tell you which slot
a card is in if you need to identify it (which PCI can do, but ISA can't).
Cheers, Andreas
-- 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 - 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/