Networker

[Networker] nsrjb open()ing all drives on same changer

2002-11-02 20:32:29
Subject: [Networker] nsrjb open()ing all drives on same changer
From: Troy Davis <troy AT NACK DOT NET>
To: NETWORKER AT LISTMAIL.TEMPLE DOT EDU
Date: Sat, 2 Nov 2002 17:22:25 -0800
Hi,

We have a Breece Hill Q47 (4 DLT4000 drives, 60 slots) connected to a
Linux 2.4.19 machine w/Networker 6.1.2 b340.  When I run nsrjb to
eject a tape from one drive, nsrjb tries to open() all 4 drives
instead of just the one that it needs to issue SCSI commands to.
ie, instead of just opening /dev/nst0 and/or /dev/st0, it tries to
open /dev/nst0 through /dev/nst4.

Since the other drives are in use, it can't open them and goes into
a loop of sleeping for 1 second and retrying the open().  nsrjb blocks
there until and unless it gets control of the other 3 drives.
Happens with nsrjb processes started via the GUI and via the CLI,
and without regard to which drive should be the target.

The problem manifests itself as timed out unloads, eventually causing
the drive to be automatically disabled.

I am able to eject the tape just fine with other tools (like eject),
since they only open the device that is receiving the ioctl() calls.

Networker succeeds on the unload when the same nsrjb process gets
control of all 4 drives, but that's a rare event -- other Networker
processes are generally already using the other drives.

Does anyone know how to make each drive independent?  All 4 drives
and the changer are on the same SCSI bus, but they definately can be
controlled individually.  Any ideas would be appreciated.

Marvin is the jukebox.  Here's the output from
"strace -f nsrjb -j Marvin -u -f /dev/nst0":

[library loading snipped]

open("/dev/nst0", O_RDONLY|O_NONBLOCK)  = 9
ioctl(9, CDROMAUDIOBUFSIZ, 0xbffe0378)  = 0
ioctl(9, 0x5386, 0xbffe0380)            = 0
close(9)                                = 0
open("/dev/nst1", O_RDONLY|O_NONBLOCK)  = -1 EBUSY (Device or resource busy)
rt_sigprocmask(SIG_BLOCK, [CHLD], [RT_0], 8) = 0
rt_sigaction(SIGCHLD, NULL, {SIG_DFL}, 8) = 0
rt_sigprocmask(SIG_SETMASK, [RT_0], NULL, 8) = 0
nanosleep({1, 0}, {1, 0})               = 0
open("/dev/nst1", O_RDONLY|O_NONBLOCK)  = -1 EBUSY (Device or resource busy)
rt_sigprocmask(SIG_BLOCK, [CHLD], [RT_0], 8) = 0
rt_sigaction(SIGCHLD, NULL, {SIG_DFL}, 8) = 0
rt_sigprocmask(SIG_SETMASK, [RT_0], NULL, 8) = 0
nanosleep({1, 0}, {1, 0})               = 0

[repeat ad nauseum until it nsrjb times out and gives up]



Cheers & thanks,

Troy

--
Note: To sign off this list, send a "signoff" command via email
to listserv AT listmail.temple DOT edu or visit the list's Web site at
http://listmail.temple.edu/archives/networker.html where you can
also view and post messages to the list.
=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=

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