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: Thu, 16 Jan 2003 19:33:47 +0300
Importance: Normal
In-reply-to: <20030115180943.1bc7048e.brettholcomb@xxxxxxxxxxx>
Sender: devfs-bounce@xxxxxxxxxxx
> 
> I am new to devfs - it came with the Gentoo distribution of Linux I am
> now using.  I have a Cybernetics 15 slot tape library with drive that
> has worked successfully on other distros.  I'm really confused with
> devfs.
> 
> I spent yesterday reading docs and working with devfs to get the thing
> working and kind of succeded - once.  When I started the system I had no
> /dev/st - just /dev/sg, sd, sr.  Sometime during the afternoon I did an
> ls /dev/st again and there was the st directory.  Using mt I managed to
> test communciations and could talk to the tape drive under /dev/st.  How
> or why the /dev/st suddenly appeared I have no idea.
>
> I shutdown the system and when I rebooted - no /dev/st anymore!  My
> original kernel was built with SCSI support built in as I have an
> entirely SCSI system and did not want to mess with initrd.  I could not
> get /dev/st to show up again.
> 
> At that point I decided to build st support as a module and autoload it.
>  Did that and there was /dev/st with my tape devices!
> 

/dev/st are just compatibility names. Do you have
/dev/scsi/hostX/busY/targetZ/lunW/mt* for your device?

> At this point I'm confused.  My understanding of devfs is that upon
> startup (Gentoo boots with devfs running) devfs will find the devices
> and create the necessary directories under /dev/. 
 
No. Devfs does not find any device. Devfs is just a repository where drivers
can register devices they have found or created.

                                                     The devices ARE in
> /proc/scsi/scsi.

Which does not mean driver has told devfs anything about it.

                   I can see that the module loading will cause devfs to
> see a device added and create the directories.  But why didn't devfs see
> the devices when st support was built into the kernel??
> 

because something went differently and driver did not tell devfs about
existence of this tape.

Besides the process has more than one step. Drivers usually register
canonical names that are selected to be hierarchical to avoid possible
confusion. The names you are talking about (specifically, /dev/st directory)
are created by devfsd program. So the reason why you did not see /dev/st may
be also devfsd malfunction.

> Do I have to manually edit /etc/devfsd.conf to tell it to find my tape
> and autochanger? 

Usually not.

                          I thought that devfs would find them by itself.
> 

Devfs does not find anything. It is very dumb. It sits there and waits until
somebody tells it "hey, I have SCSI tape, please show it to user now".

> I've read man pages, the FAQ at the devfs author's site and asked on the
> Gentoo and other Linux newsgroups but am still confused.  In fact the
> deafing silence on the mailing lists and newsgroups shows me not many
> people understand devfs or so it appears.  
 
I guess silence means Devfs works as expected :)))

                                              Any help in unconfusing me
> would be appreciated.
> 


Please show /etc/devfsd.conf, /etc/modules.devfs, explain how and when
devfsd is loaded in Gentoo and show dmesg output for the case /dev/st does
not appear.

-andrey


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