On Wed, 30 Nov 2005, Tim Mooney wrote:
TM> > It seems to be related to the block size after all! Although it seems to
TM> > be impossible to set it on the device until a tape has been loaded in it.
TM> Based on my tenuous understanding of stinit, I think stinit should be
TM> setting the default block size, on a per-mode basis, for all the devices
TM> that your stinit.def entries match.
Yes, it SHOULD. But it doesn't work, obviously. :)
TM> > After preparing nst3 with a tape loaded, I ran the following:
TM> >
TM> > sn01:~ # mt -f /dev/nst3 setblk 0
TM> > sn01:~ # mt -f /dev/nst2 setblk 0
TM> > mt: /dev/nst2: Input/output error
TM> >
TM> > nst2 doesn't have a tape in it, and is thus not accepting any mt commands
TM> > until a tape has been loaded. After this little experiment, nst3 could
TM> > mount a tape just fine from networker, but nst2 showed the same behavior
TM> > as previously mentioned.
TM> >
TM> > So, is there any way to set the block size without mounting a tape first?
TM> > It seems like stinit says it has done so, but that doesn't seem to be
TM> > correct.
TM> I think that's the problem. I don't understand why it's happening though.
So do I. And neither do I. mt accesses /dev/st0 as a normal file, but if
there is no tape in the drive, the open call hangs, and returns an I/O
error after a minute or two if the tape hasn't been loaded by then.
In my view this is probably kernel related. I seem to remember that I've
read somewhere that st behavior has changed from 2.4 to 2.6 where 2.6
waits two minutes for a tape to be inserted. Why, or where I read that I
don't know. They are just vague memories.
TM> > And where does it get the 512byte default setting from?
TM> I *think* (but could be way off) that 512 bytes is the default for the
TM> st driver.
Stupid default setting. :) Oh well.
TM> > Where can
TM> > that be set, without affecting other SCSI devices such as disk drives?
TM>
TM> Assuming that the mode that's defined in /etc/stinit.def
TM> applies to the device file you're using, running stinit should be
TM> accomplishing that for you.
That's what I thought too, but as previously stated, that doesn't work.
And yes, I only have one entry in the stinit.def file.
Oh, I found this more or less ancient link -
http://meteora.ucsd.edu/~pierce/linux_tape.html - which describes the
problem I'm having. However, that tool doesn't work either, it gets an I/O
error as well (verified with strace).
I will try your modules/modprobe.conf addition now. :)
//Oscar
To sign off this list, send email to listserv AT listserv.temple DOT edu and
type "signoff networker" in the
body of the email. Please write to networker-request AT listserv.temple DOT edu
if you have any problems
wit this list. You can access the archives at
http://listserv.temple.edu/archives/networker.html or
via RSS at http://listserv.temple.edu/cgi-bin/wa?RSS&L=NETWORKER
|