devfs
[Top] [All Lists]

RE: SCSI Tapes and devfs

To: "'Brett I. Holcomb'" <brettholcomb@xxxxxxxxxxx>, devfs@xxxxxxxxxxx
Subject: RE: SCSI Tapes and devfs
From: Borzenkov Andrey <Andrey.Borzenkov@xxxxxxxxxxx>
Date: Fri, 17 Jan 2003 09:40:32 +0300
Importance: Normal
In-reply-to: <20030116205835.2993b742.brettholcomb@charter.net>
Sender: devfs-bounce@xxxxxxxxxxx
> 
> Now, where does /etc/modules.conf fit into the devfs scheme - what is it
> used for?  I thought that was only
> for modules yet it's included in /etc/modules.devfs?
> 

/etc/modules.devfs _is_ for modules.

The main problem with devfs is, you need driver to be loaded for devices to
show up under /dev. But how should kernel know it has to load, say, st when
you try to access /dev/tapes/tape0?

With static /dev kernel autoloads modules based on major numbers. You have
/dev/st0, it has major - forgot - there is as yet no driver that registered
this major number, so look it up and load. But with devfs there is _no_
/dev/st0 until st has been loaded. You have chicken and egg problem.

Here devfsd helps. When path under /dev is not found devfsd gets notified
and tries to load module that may provide support for this device.

/etc/modules.devfs includes /etc/modules.conf because /etc/modules.devfs is
expected to be generic. If you have local changes (like, say, NVidia driver)
you edit /etc/modules.conf as usual.

> If I create some symlinks such as
> 
> ln -s /dev/tape0 /dev/st/c1b0t0u0m0
> ln -s /dev/tape0 /dev/st/c1b0t0u0m0n
> ls -s /dev/sg/dev/auto_changer0 /dev/sg/c1b0t1u0
> 

I hope you mean ln -s st/c1b0t0u0m0 /dev/tape0. /dev/st is managed by devfsd
internally - do not mess up with it!

> do I have to do anything to make them be restored on the next system
> reboot?  According to my /etc/devfsd.conf (see below) it should, if I
> understand it, copy all the devices and restore them next time -
> correct?
> 

Looks like it should work, with comment above.

> And when do I modify /etc/devfsd.conf - or do I ever.  I understand I
> need to modify it for the cdrw but what else would I have to do with it
> as it seems setup to cover everything necessary?
> 

If you want to change names, change permissions or whatever and make
absolutely sure they persist across reboots even if /lib/dev-state is wiped
out (that is the first thing you must do if you have problem with names
under /dev :))))

-andrey


<Prev in Thread] Current Thread [Next in Thread>