[Gllug] SCSI and /dev

Rich Walker rw at shadow.org.uk
Wed Mar 3 20:14:50 UTC 2004


Mike Brodbelt <mike at coruscant.demon.co.uk> writes:

> On Wed, 2004-03-03 at 12:21, Bruce Richardson wrote:
>> On Wed, Mar 03, 2004 at 11:41:42AM +0000, Doug wrote:
>> > On Wed 03 Mar Bruce Richardson wrote:
>> > > You could try devfs, which has some flaws but does give you a /dev
>> > > structure that reflects the kernel's internal device naming scheme.
>> > 
>> > udev is almost certainly a better bet:
>> 
>> Not at the moment, I think.  It's still lacks most of the useful
>> functions of devfs.
>
> Not according to it's author, who explicitly claims it can do everthing
> that devfs can today. Now, I'll freely admit I've not used either of
> them in earnest yet (though udev looks tempting), but what do you claim
> devfs does that udev doesn't (except the modprobe on access stuff, which
> is fundamentally flawed in unfixable ways, according to most of the
> posts on linux kernel)?

I've been following the thread there, 'cos I'll have to port my code to
udev when I get round to 2.6. udev not only appears to do all the things
devfs did, it does some extra things as well, permitting

1. hardware objects to have the same name no matter where in a device
   chain they appear (and if that doesn't sound useful, you've never
   had multiple USB or Firewire devices of the same class attached)

2. programmatic naming interface, so you can (and this made me fall off
   my chair) automagically query the free CD database for the name of
   the CD you just inserted...
>
>>   While devfs has some known issues, it is still
>> being maintained (if not by the original developer) and is stable for
>> most purposes. 

umm; that's a novel use of stable :->

>>  udev is still a beta project.
>
> Yes, but as I understand it, devfs is definitely not going to remain, so
> any effort invested in it at this point is likely to be a dead end
> somewhere not too far down the line. Kernel list posts also claim it has
> unsolvable race conditions, which can't be a good thing.

As well as a lack of people wanting to maintain it, which for kernel
code is a pretty big no-no...

> I've never really understood the urge to have a /dev with only valid
> device nodes in it. I care *far* more about persistent device naming,
> which udev offers, and devfs doesn't. In between SCSI disks, firewire
> storage, and USB card readers, I can't use fstab mounting[1] for my
> removable media. Running rescan-scsi-bus is a hack at best... The
> presence of a few hundred device nodes, which do nothing, and probably
> consume all of a few K of disk bothers me not at all. That said, I tend
> to build kernels with the appropriate drivers built in, and not use
> modules much anyway, so I might just be weird....

Yes, you are. I find I can't keep track of which machines have which
cards/devices/... attached, and I need to swap them around often enough,
that I just have to have all the modules, all the time...

cheers, Rich.


-- 
rich walker         |  Shadow Robot Company | rw at shadow.org.uk
technical director     251 Liverpool Road   |
need a Hand?           London  N1 1LX       | +UK 20 7700 2487
www.shadow.org.uk/products/newhand.shtml
-- 
Gllug mailing list  -  Gllug at gllug.org.uk
http://lists.gllug.org.uk/mailman/listinfo/gllug




More information about the GLLUG mailing list