* devfs
@ 2004-02-03 3:48 mike
2004-02-03 15:26 ` devfs Ken Moffat
0 siblings, 1 reply; 6+ messages in thread
From: mike @ 2004-02-03 3:48 UTC (permalink / raw)
To: linux-newbie
Hello all,
I was reading the thread subject=(error message interpretation
help?) and the reference to "devfs". I have a stock installation of
MDK9.2 and my understanding is that "devfs" is in the kernel or
(module maybe?) by default.
I should say right off the bat that I am a major newbie so bare with
me. I've heard complaints about "devfs" before, for one thing the
naming convention I noticed on my "df" output alittle long and hard
to read for instance.
Filesystem Size Used Avail Use% Mounted on
/dev/ide/host0/bus0/target0/lun0/part5
380M 115M 246M 32% /
Someone told me that was because I had "devfs" I did some reading
and I think I can change that part on my system with
/etc/devfsd.conf but my question is do I really need "devfs" and if
not how can I remove it or disable it, and do I need to replace it
with something else?
--
Mike
-
To unsubscribe from this list: send the line "unsubscribe linux-newbie" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.linux-learn.org/faqs
^ permalink raw reply [flat|nested] 6+ messages in thread
* devfs
@ 2004-02-03 3:53 mike
0 siblings, 0 replies; 6+ messages in thread
From: mike @ 2004-02-03 3:53 UTC (permalink / raw)
To: linux-newbie
Forgot some more info.
ext3 file system
no scsi drives
--
Mike
-
To unsubscribe from this list: send the line "unsubscribe linux-newbie" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.linux-learn.org/faqs
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: devfs
@ 2004-02-03 6:59 beolach
[not found] ` <40208ADF.7010307@kevino.org>
0 siblings, 1 reply; 6+ messages in thread
From: beolach @ 2004-02-03 6:59 UTC (permalink / raw)
To: mike; +Cc: linux-newbie
Sorry for the length of this reply, I was bored and felt like writing a novel.
Well, no you don't *need* to have devfs, and it would be really easy to remove,
but I wouldn't recommend it, for a couple reasons. First of all, devfs really
is the best way to do what's being done (see below), and secondly (and more
importantly) I don't subscribe to the engineering maxim, "If it's not broken,
fix it." I've had enough grief from trying to "fix"/improve/whatever stuff
that wasn't broken that I don't recommend making any unnecessary changes to
a system that is currently working. If you do want to disable devfs, it
should be as simple as passing devfs=nomount at the boot prompt, and possible
editing your startup scripts not to run devfsd. This is assuming that your
distribution includes a standard set of device files - most do. And there
might be other pitfalls to avoid that I'm not aware of.
Some history on device files: basically, *nix systems use special files in
the /dev directory to refer to physical devices on the system. The "old"
(pre-devfs) way for these special files to be created was with the mknod
command. Because there are at the very least dozens of these special device
files required to opperate correctly, most *nix distributions came with the
most common device files already created. Generally, the distributions tried
to include every possible device file that could be in the system, so that the
end user would never have to worry about creating them. This is where the
problem starts. There are so many possible devices that could potentially be
in any given system that the /dev directory installed by default from most
distribution started to get very cluttered. For example, hard drives. Most
home desktop computers only support a max of 4 IDE drives. But, especially on
the servers that *nixes often run on, there could be many more, and often
they would be SCSI drives. So instead of just having /dev/hd[a-d], Slackware
(my preferred distro) includes /dev/hd[a-t] & /dev/sd[a-h]. And then we have
up to 32 partitions for each IDE hard drive, and 15 for each SCSI drive. So
here we have 788 special device files just for hard drives & partitions.
Hopefully you can see how this becomes really cluttered with stuff that, for
most systems, is unnecessary. Just FYI, Slackware comes with over 23000
special device files by default, the majority of which are usually unneeded.
Now assume that you install a new device (say, a rare video card) that needs
a special device file to work properly, but your distribution hadn't included
that particular device file. Now you need to create it. If your lucky, the
distribution or the device manufacturor will have supplied a MAKEDEV script
that will do this for you; if you're unlucky you'll need to find out what the
device file is supposed to be named, and what major & minor device numbers it
expects. Hopefully it's well documented & easy to find, but you could end up
digging through the source code hunting for the major/minor numbers (alright,
that is a unlikely worst case scenario, but it could happen).
Now lets talk about the naming system. You've already mentioned that this is
one of the big areas of controversy around devfs. But lets start with the
"old" (pre-devfs) naming system. The problem here was that the naming system
was overly cryptic and hard to interpret. Again I will illustrate with disk
drives. IDE hard drives would have device files like /dev/hda or /dev/hdb;
which at first glance looks simple enough: hd for Hard Drive, and a letter to
differentiate between multiple hard drives. But wait; /dev/hda could be any
IDE device, like a CD-ROM, Tape, or Floppy drive, not just a hard drive. And
my hard drive could be SCSI, so it wouldn't be a /dev/hd? device. It would
be /dev/sda. And a SCSI CD-ROM drive would be /dev/sr0 (notice it a number
rather than a letter to differ between multiple SCSI CD-ROMS), and a SCSI
tape drive would be either /dev/rst0 or /dev/nrst0 depending on if it was a
rewinding or nonrewinding drive. Anyway, with the old naming scheme
everything ended up being a jumble of letters and numbers, that supposedly
stand for something (hd=hard drive; sd=SCSI drive), but actually don't; and
if you don't already know what a device name means, good luck guessing.
Devfs is a virtual device filesytems designed to solve these problems. It
dynamically creates & removes special device files as devices are added or
removed from the system (a major benefit if you deal with hotplug stuff like
USB), or when the drive module is inserted or removed from the kernel. So
/dev only has the special device files for devices that actually are in the
system - forget the other 20000 or more devices files that I don't need. And
as long as I can find a driver for this rare video card I just found, it will
work, without me needing to mess with mknod and finding major/minor numbers
(okay, maybe not - some device drivers still don't support devfs, but not
many, and even if it doesn't I'm no worse off than if I wasn't using devfs).
The changes to the naming scheme are, IMO, less important, but are still an
improvement. And because enough people do dislike the new naming scheme, it
can be changed in /etc/devfsd.conf (if you can figure out how - my very brief
glance at it looked complicated). While the new names are longer, they also
give more information with less ambiguity than the old names. And IIRC devfs
by default does make symlinks to to all the old names. This means that while
on the old system /dev/hdb could be any type of IDE device, on the new system
I can `readlink /dev/hdb` and it will show the new name for the device, which
might be "ide/host0/bus0/target1/lun0/cd" - which tells me this is a CD-ROM
on lun0 (not sure what that is... all I know is most IDE devices only have 1
lun) on the slave channel (target1) of the primary bus (bus0) of the first IDE
controller (host0) in the system. All of that other than what type of drive
it is can be interpreted from from the old naming system, but this spells it
out better.
Well, that's my novel for today. Hope you enjoy,
Conway S. Smith
> Hello all,
> I was reading the thread subject=(error message interpretation
> help?) and the reference to "devfs". I have a stock installation of
> MDK9.2 and my understanding is that "devfs" is in the kernel or
> (module maybe?) by default.
> I should say right off the bat that I am a major newbie so bare with
> me. I've heard complaints about "devfs" before, for one thing the
> naming convention I noticed on my "df" output alittle long and hard
> to read for instance.
>
> Filesystem Size Used Avail Use% Mounted on
> /dev/ide/host0/bus0/target0/lun0/part5
> 380M 115M 246M 32% /
>
> Someone told me that was because I had "devfs" I did some reading
> and I think I can change that part on my system with
> /etc/devfsd.conf but my question is do I really need "devfs" and if
> not how can I remove it or disable it, and do I need to replace it
> with something else?
>
> --
> Mike
>
-
To unsubscribe from this list: send the line "unsubscribe linux-newbie" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.linux-learn.org/faqs
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: devfs
2004-02-03 3:48 devfs mike
@ 2004-02-03 15:26 ` Ken Moffat
[not found] ` <40208F5E.8020504@kevino.org>
0 siblings, 1 reply; 6+ messages in thread
From: Ken Moffat @ 2004-02-03 15:26 UTC (permalink / raw)
To: mike; +Cc: linux-newbie
On Mon, 2 Feb 2004, mike wrote:
> Hello all,
> I was reading the thread subject=(error message interpretation
> help?) and the reference to "devfs". I have a stock installation of
> MDK9.2 and my understanding is that "devfs" is in the kernel or
> (module maybe?) by default.
> I should say right off the bat that I am a major newbie so bare with
> me. I've heard complaints about "devfs" before, for one thing the
> naming convention I noticed on my "df" output alittle long and hard
> to read for instance.
>
> Filesystem Size Used Avail Use% Mounted on
> /dev/ide/host0/bus0/target0/lun0/part5
> 380M 115M 246M 32% /
>
> Someone told me that was because I had "devfs" I did some reading
> and I think I can change that part on my system with
> /etc/devfsd.conf but my question is do I really need "devfs" and if
> not how can I remove it or disable it, and do I need to replace it
> with something else?
>
>
Based on past experience with mdk8.2, which used devfs and worked
extremely badly for me, I'd recommend doing without. However, that's a
lot easier said than done. You'll need to create static devices, and
you won't be able to do this while devfs is blocking access to the real
underlying /dev, which means booting from a recovery CD as well as
knowing which devices you need, and which groups should own them.
I also take the view that most people don't change their underlying
hardware and peripherals very often, so for me manually adding a device
when I add a usb printer is par for the course. If you don't want that
level of involvement and you don't have any problems with it, keep it.
Funnily enough, based on an email a little while ago on lkml about udev,
I thought Mandrake had already moved away from devfs. [ udev
reimplements some of what devfs does, with 2.6 kernels, but its still at
an early stage and certainly not intended as a drop-in replacement. ]
Ken
--
Brighton tops UK Jedi league
http://www.theregister.co.uk/content/28/35186.html
-
To unsubscribe from this list: send the line "unsubscribe linux-newbie" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.linux-learn.org/faqs
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: devfs
[not found] ` <40208ADF.7010307@kevino.org>
@ 2004-02-04 14:09 ` mike
0 siblings, 0 replies; 6+ messages in thread
From: mike @ 2004-02-04 14:09 UTC (permalink / raw)
To: linux-newbie
mike wrote:
> beolach@comcast.net wrote:
>
>> Sorry for the length of this reply, I was bored and felt like writing
>> a novel.
>
>
> Thats quite alright, I need to have things spelled out to me.
> And your explanation helped me understand quite abit more of whats going
> on.
>
>> Well, no you don't *need* to have devfs, and it would be really easy
>> to remove,
>> but I wouldn't recommend it, for a couple reasons. First of all,
>> devfs really
>> is the best way to do what's being done (see below), and secondly (and
>> more
>> importantly) I don't subscribe to the engineering maxim, "If it's not
>> broken,
>> fix it."
>
>
> I agree with you on that, theres much more to it than I thought, and
> from your explanation way out of my league. Sounds like it could get
> complicated. My system runs well for me I would hate to 'jinks'
> that :-)
>
>
>> And because enough people do dislike the new naming scheme, it
>> can be changed in /etc/devfsd.conf (if you can figure out how - my
>> very brief
>> glance at it looked complicated). While the new names are longer,
>> they also
>> give more information with less ambiguity than the old names. And
>> IIRC devfs
>> by default does make symlinks to to all the old names.
>
>
> I was used to the /dev/hda naming scheme and understood it, is why the
> new naming kinda through me when I used the "df" command.
> But your explanation of how it works makes sense to me, and I believe I
> can used to it.
>
>>
>> Well, that's my novel for today. Hope you enjoy,
>> Conway S. Smith
>
>
> I appreciate your responce thanks, Conway
>
--
Mike
-
To unsubscribe from this list: send the line "unsubscribe linux-newbie" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.linux-learn.org/faqs
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: devfs
[not found] ` <40208F5E.8020504@kevino.org>
@ 2004-02-04 14:09 ` mike
0 siblings, 0 replies; 6+ messages in thread
From: mike @ 2004-02-04 14:09 UTC (permalink / raw)
To: linux-newbie
mike wrote:
> Ken Moffat wrote:
>
>>
>>
>>
>> Based on past experience with mdk8.2, which used devfs and worked
>> extremely badly for me, I'd recommend doing without. However, that's a
>> lot easier said than done. You'll need to create static devices, and
>> you won't be able to do this while devfs is blocking access to the real
>> underlying /dev, which means booting from a recovery CD as well as
>> knowing which devices you need, and which groups should own them.
>>
>> I also take the view that most people don't change their underlying
>> hardware and peripherals very often, so for me manually adding a device
>> when I add a usb printer is par for the course. If you don't want that
>> level of involvement and you don't have any problems with it, keep it.
>
>
> I think I'll keep it, sounds like it does alot for me which I'm not
> knowledgeable enough to do for myself. At least at this point in my
> learning process :-)
>
>> Funnily enough, based on an email a little while ago on lkml about udev,
>> I thought Mandrake had already moved away from devfs. [ udev
>> reimplements some of what devfs does, with 2.6 kernels, but its still at
>> an early stage and certainly not intended as a drop-in replacement. ]
>>
>> Ken
>
>
> Thanks for reply Ken.
>
--
Mike
-
To unsubscribe from this list: send the line "unsubscribe linux-newbie" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.linux-learn.org/faqs
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2004-02-04 14:09 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-02-03 3:48 devfs mike
2004-02-03 15:26 ` devfs Ken Moffat
[not found] ` <40208F5E.8020504@kevino.org>
2004-02-04 14:09 ` devfs mike
-- strict thread matches above, loose matches on Subject: below --
2004-02-03 3:53 devfs mike
2004-02-03 6:59 devfs beolach
[not found] ` <40208ADF.7010307@kevino.org>
2004-02-04 14:09 ` devfs mike
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).