Subject: Re: Another changer, another changer problem
To: None <current-users@netbsd.org>
From: Greg A. Woods <woods@most.weird.com>
List: current-users
Date: 10/02/1998 00:26:28
[ On Thu, October 1, 1998 at 23:29:23 (-0400), Perry E. Metzger wrote: ]
> Subject: Re: Another changer, another changer problem 
>
> seebs@plethora.net writes:
> > But this is a damn good system.  I like it.  It is the number one thing
> > I miss about administering SVR4.  No matter *WHAT* is attached, I like
> > to have a way to say "*I* know that this disk will always, forever, be
> > SCSI ID 2 on the 1st SCSI controller attached to this system".
> 
> You can do that already under netbsd. Can you explain what the problem 
> is?

of course.  most unix systems let you do anything you want.

however it's a totally different proposition to have the system work
this way be default from the ground up.  although I've not actually made
the changes, I can guess from having noted over time whenever
assumptions are made about things like "sdNX", "stNn", etc., that it
would be no small feat to actually fix everything through and through
from the kernel to all of userland.

of course to actually make both schemes work at the flip of a switch
would be an imensely complex task, and would IMNSHO be a stupid waste of
time.  so, that would imply that either things must stay as they are and
those who make this decision must endure the occasional complaint about
the inflexibility of the system, or that a moderate effort be put into
making device and bus naming conventions both more consistent and
flexible from the ground up.

primarily I'm thinking of making uniform the naming of devices that host
filesystems, but of course this *can* go much deeper.  staying on the
surface for the moment, I think it might be useful to point out yet
another major distinction between these two schemes that's not been
mentioned in this thread.  i.e. the BSD naming scheme includes the
driver name as part of the device name, where as the SysV scheme makes
all disks and controllers simply "units" in the larger picture.  which
underlying driver type actually supports a given spindle or slice is
irrelevant:

	c0t0d0s0 might be a partition on an IDE drive
	c1t0d0s0 might be a partition on an SMD drive
	c2t0d0s0 might be a partition on an IPI drive
	c3t0d0s0 might be a partition on a SCSI drive

it should be sufficient to use the major number to specify a different
driver, and not some component of the filename.

yes the SysV scheme can involve putting different devices of different
types, such as tapes vs. disks, in sub-directories under /dev, but this
is a restriction borne more out of the ancient SysV 14-char limits than
anythign else.  that said I can assure you that from hindsight it *is*
far nicer to see all the disks in one directory, all the tapes in
another, all the tty's in a third, all the pty's in a fourth, etc.

(so, to answer another question in this thread, yes, if you try to
access /dev/dsk/c0t4d0s0, but target 4 is actually a tape drive then you
get ENXIO -- you must use /dev/tape/c0t4d0 instead)

-- 
							Greg A. Woods

+1 416 218-0098      VE3TCP      <gwoods@acm.org>      <robohack!woods>
Planix, Inc. <woods@planix.com>; Secrets of the Weird <woods@weird.com>