Re: DEVFSv50 and /dev/fb? (or /dev/fb/? ???)

Kragen (kragen@pobox.com)
Fri, 7 Aug 1998 10:25:52 -0400 (EDT)


On Thu, 6 Aug 1998, Stephen Frost wrote:
> SUN has it's own problems w/ that damn /devices directory and the
> fact that they use those names in their log files. I've discovered that
> the /dev/dsk/c0t0d0s0 way of expressing a disk is VERY usefull in large
> machines. Yes if you have all of one SCSI controller and maybe two drives
> the /dev/sda solution is fine, but when you have 6 controllers and about
> 30 drives, as well as a raid array w/ another 36 drives in it, I'm sorry,
> but /dev/sda would not cut it.

Maybe we could have the best of both worlds:
/dev/sda is /dev/dsk/c0t0d0*
/dev/sda1 is /dev/dsk/c0t0d0s0
/dev/sda2 is /dev/dsk/c0t0d0s1
/dev/sda3 is /dev/dsk/c0t0d0s2
/dev/sdb1 is /dev/dsk/c0t1d0s0
/dev/sdb2 is /dev/dsk/c0t1d0s1

-- which gives us the same simple names we have now (only stable!) --
and the naming scheme can be extended uniformly to more complex
setups:
/dev/sd_c1_a1 is /dev/dsk/c1t0d0s0
/dev/sd_c1_a2 is /dev/dsk/c1t0d0s1
/dev/sda_d1_ is /dev/dsk/c0t0d1*
/dev/sda_d1_1 is /dev/dsk/c0t0d1s0
/dev/sda_d2_1 is /dev/dsk/c0t0d2s0
/dev/sd_c2_d_d2_2 is /dev/dsk/c2t3d2s2

I think easy things (remembering the names of the disks on a machine
with one or two disks) should be easy, and hard things (having 100
disks on one machine, adding and removing disks without having to edit
fstab) should be possible.

The only disadvantages I can see to this scheme are that it requires a
little bit more complexity (a couple of conditionals) in the code that
creates these disks, and it requires a bit more complexity (the same
couple of conditionals) in any user-level code that wants to traverse
all possible disks. (But I suspect most such user-level code will just
glob /dev/sd*.)

(Stephen proposed something similar in the message to which I am
replying.)

I must have missed the explanation of how autoloading of device-driver
modules works with devfs. If a device is to be automatically loaded
and configured when someone tries to access it, and devfs creates names
in /dev as devices are loaded and configured, then how do you try to
access the unloaded, unconfigured device?

(I think devfs is a really good idea. But I like Plan9, too.)

> I've got another machine w/ 5 SCSI controller in it, of which
> only 4 are used and I've got a total of 30 disks, this system is running
> a nice big Oracle system. Oracle at least in the past for me does NOT
> like it when/if the name it uses to access a drive changes.

I DBA'd Informix for a while. It doesn't like it either. (In fact, it
marks the space as "down" if it happens to start when it's
inaccessible, and the only way to fix it is to restore the database
from backup, or to have Informix support people telnet in and edit your
root dbspace with a hex editor.)

Kragen

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.altern.org/andrebalsa/doc/lkml-faq.html