Re: devfs

Leonard N. Zubkoff (lnz@dandelion.com)
Mon, 12 Jan 1998 23:20:04 -0800


Date: Tue, 13 Jan 1998 17:58:22 +1100
From: Richard Gooch <rgooch@atnf.CSIRO.AU>

OK then. I can cope with that. So, people: you have a choice between:

h0c0i0l0p2 current scheme: no changes required :-)

h0c0t0u0p2 new scheme: requires people to change compatibility
symlinks and /etc/fstab (if you've gone that far)

I think it's a bit too soon to consider compatibility with an existing
implementation as an important factor in design decisions. I think there is a
strong argument to be made that the use of "t" and "u" provides greater
readability. Using "l" would be a *very* bad idea, in my opinion. I think the
"new scheme" is a good compromise between slavish compatibility with systems
like Solaris and the unique needs of Linux. Use of "i" rather than "t" would
be a gratuitous incompatibility, whereas the need for separate host number and
channel number is fully justified.

Leonard: what's your view on the placement of these devices:

/dev/sd_h0c0t0u0p2 OR:
/dev/disc/sd_h0c0t0u0p2

I don't think deep directory trees are a good idea. At least not for
the standard names. We can always create other trees/names later.

I'd like to see /dev/disk/sd_h?c?t?u?p? personally (i.e., a single directory
for all disk devices). The spelling "disc" is nonstandard. I think a shallow
directory tree is a good compromise. It will be easier to find devices if
there is a shallow hierarchy based on function: disk, tape, cdrom, scsi (for
generic), etc.

What happens if I have sdb on host 1, sdc on host 2 and then remove
host 1? Is sdc still a valid name?

Yes. sdc is essentially an index into a table, and once assigned it won't go
away. A cursory look at the code shows that a subsequent disk attach would be
assigned sdb. The first free letter starting with "a" is used.

I think your point argues in favour of additional naming schemes that
use UUIDs or vendor strings. Whether those solutions belong in kernel
space or user space is yet to be determined.

Indeed. Most SCSI disks can provide their serial number to an appropriate host
query, and I've always thought that this would be another useful identification
method, especially where a file system isn't present. It's too bad we don't
control the partition table/MBR, as that's where a UUID for the whole disk
would be helpful.

Leonard