Hard Disk device IDs in Linux

Dan Egli ddavidegli at gmail.com
Tue Mar 12 00:31:21 MDT 2013


*Nicholas Leippe <nick at leippe.com> wrote:*

*> I think there's 12 bits for major number and 20 bits for minor*

* *

*That would be 4096 major IDs. I hope you aren't indicating that they would
all be for hard disks. :) That's including things like /dev/psaux and
/dev/input/mouse/1 or /dev/input/mice, not to mention things like
/dev/nvram, /dev/zero and others, right? I don't want to even CONSIDER the
headaches that would be involved in maintaining even 1000 hard disks, let
alone 4096! :) *

* *

* *

*> higher drive numbers is currently. Nowadays that's often left up to*

*> udev rules--some distros override the kernel defaults to provide a*

* *

*Well, that's interesting. I've seen udev before. I know Gentoo makes heavy
use of it (or at least it did last I looked). I still wonder about that. If
everyone likes the things that udev does, then why did they clobber devfs
out of the kernel all those years ago? devfs and udev were very similar.
The biggest difference that I can see (and I admit I haven't looked closely
at udev beyond making sure it was running back when I had a Gentoo box all
those years ago) was that udev had the option of creating customized device
filenames automatically where as devfs had the device filenames fixed in
the kernel. But then that was what devfsd was supposed to be for in the
first place. Not only did it create symlinks to the actual device files
that were present in the devfs, but I was under the impression that you
could also instruct it to create custom symlinks as well that would still
point to the correct device files. Maybe I'm wrong, but that's my memory at
least.*

* *

*--- Dan*


More information about the PLUG mailing list