Subject: Re: devfs, was Re: FreeBSD 5/6/7 kernel emulator for NetBSD 2.x
To: Jason Thorpe <>
From: Bill Studenmund <>
List: tech-kern
Date: 10/27/2005 18:14:51
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Thu, Oct 27, 2005 at 04:40:53PM -0700, Jason Thorpe wrote:
> On Oct 27, 2005, at 3:41 PM, Bill Studenmund wrote:
> >As above, we may be not in disagreement. One idea I had was that if =20
> >the
> >userland config file said SCSI disk wwn 52004567BA64678D was sd3, =20
> >devfs
> >setup would make whatever disk had that wwn be sd3. I was even kicking
> >around the idea that kernel log messages would say "sd3" in them. This
> >idea is still vague, and for instance I haven't figured out what =20
> >exactly
> >to do if we already had an sd3. :-)
> What's the point of even mapping it to "sd3"?  Just reference it as "/=20
> dev/sd.wwn.52004567BA64678D" or whatever.  And with wedges, you would =20

For some of (but not all of) the same reasons we have always prefered
"/dev/sd0a" over "/dev/rdsk/c3t0d0s0". It's really realy ugly. :-)

If it ends up we really would prefer /dev/sd.wwn.52004567BA64678D, we can=
do it.

I can think of two other reasons for doing the maping trick. One is I see=
all of this as an extension/embellishment of kernel autoconfig locators.=20
So the userland devfs config is an extension of the kernel's wiring down.=
Since we wire down "sd3" and such now, I suggest we continue to do so. I=20
also think this will make it all make more sense to folks as we=20

Second, I think it's easier to keep track of "sd0", "sd3","sd62", and
"sd89" than "sd.wwn.52004567BA64678D", "sd.wwn.52002E004D3E218F",
"sd.wwn.52000F4C31D7AA70" and so on. I think it will be a lot easier to=20
understand log messages and to configure other parts of the system if we=20
have to deal with the shorter names. All of the characters in both names=20
are significant, but most of the wwn characters carry little human=20
relevance. So I'd rather our admins focus effort on dealing with devices=20
and what they are doing rather than huge device names.

I would rather not have log messages like:

sd.wwn.52004567BA64678D(umass0:0:0:0): command aborted, data =3D 00 00 00 0=
04 04 00 00 00 00

> end up with even more useful names:
> 	/dev/dk/nbsd4.0root
> ...based on the name in the EFI label.

Oh! I was expecting that for wedges! That's why I haven't talked about=20
"sd0a" and such. :-)

Take care,


Content-Type: application/pgp-signature
Content-Disposition: inline

Version: GnuPG v1.2.3 (NetBSD)