Amanda-Users

RE: "no slots available" error with amanda and chg-zd-mtx

2003-08-01 15:14:12
Subject: RE: "no slots available" error with amanda and chg-zd-mtx
From: "Woodman, Joel" <woodman AT chuma1.cas.usf DOT edu>
To: "'amanda-users AT amanda DOT org'" <amanda-users AT amanda DOT org>
Date: Fri, 1 Aug 2003 15:07:50 -0400
Folks,

Many thanks for the swift responses. It does look like it was a path issue,
though even running from root the error was the same. I've removed mtx and
re-installed from RPM and that cleared the problem up. I do, however, have a
few more questions. When I run "chg-zg-mtx -info" I get the following
result:

# /usr/lib/amanda/chg-zd-mtx -info
2 2 1

As I understand the documentation, this means that my current slot is "2," I
have "2" slots and the changer can travel backwards, as noted by "1." Is it
normal for mtx to define "slots" as slots with tapes in them, versus slots
in total? "mtx -f /dev/sg0 status" is aware of all seven slots, and whether
they're empty or not.

Also, if I run "/usr/sbin/amtape cas-unix show" amanda will show the tapes
in the pod, but won't unload the last tape it examined without a manual
"amtape eject." Is this normal, or is there something in the configuration
files quoted below that would prevent the tape pod from unloading the tape
when it was done with it?

-Joel

> -----Original Message-----
> From: Frank Smith [mailto:fsmith AT hoovers DOT com] 
> Sent: Friday, August 01, 2003 12:21 PM
> To: Woodman, Joel; 'amanda-users AT amanda DOT org'
> Subject: Re: "no slots available" error with amanda and chg-zd-mtx
> 
> 
> --On Friday, August 01, 2003 11:44:07 -0400 "Woodman, Joel" 
> <woodman AT chuma1.cas.usf DOT edu> wrote:
> 
> > Hello Amanda folks,
> > 
> > I'm a shiny new Amanda user, with a Dell PowerEdge 6450 
> server and a 
> > PowerVault 120T tape pod. The server's running RedHat Linux 9 and 
> > Amanda 2.4.4p1, with chg-zd-mtx managing the tape changer. 
> mtx is mtx 
> > 1.2.18rel, from ftp.badtux.net. As far as I can tell, I've 
> configured 
> > everything properly, however I've been stumped by one serious error:
> > 
> ># /usr/lib/amanda/chg-zd-mtx -info
> > <none> no slots available
> > 
> > Here's what the system has to say about the hardware:
> > 
> > "cat /proc/scsi/scsi"
> > 
> > Host: scsi0 Channel: 00 Id: 01 Lun: 00
> >   Vendor: ADIC     Model: FastStor DLT     Rev: D116
> >   Type:   Medium Changer                   ANSI SCSI revision: 02
> > Host: scsi0 Channel: 00 Id: 03 Lun: 00
> >   Vendor: QUANTUM  Model: DLT7000          Rev: 2561
> >   Type:   Sequential-Access                ANSI SCSI revision: 02
> > 
> > "mtx -f /dev/sg0 status"
> > 
> >   Storage Changer /dev/sg0:1 Drives, 7 Slots ( 0 
> Import/Export ) Data 
> > Transfer Element 0:Empty
> >       Storage Element 1:Full 
> >       Storage Element 2:Full 
> >       Storage Element 3:Empty
> >       Storage Element 4:Empty
> >       Storage Element 5:Empty
> >       Storage Element 6:Empty
> >       Storage Element 7:Empty
> > 
> > This is correct-- There are tapes in slots 1 and 2, and no 
> tapes are 
> > loaded.
> > 
> > The chg-zd-mtx log does show that something's gone wrong:
> > 
> > chg-zd-mtx: debug 1 pid 26374 ruid 0 euid 0: start at Fri Aug  1 
> > 11:21:48 2003 11:21:49 Using config file 
> > /etc/amanda/cas-unix/changer.conf 11:21:49 Arg info:
> >          $# = 1
> >          $0 = "/usr/lib/amanda/chg-zd-mtx"
> >          $1 = "-info"
> > 11:21:49 Running: mtx status
> > 11:21:49 Exit code: 127
> >          Stderr:
> > /usr/lib/amanda/chg-zd-mtx: line 381: mtx: command not found
> 
>                                         ^^^^^^^^^^^^^^^^^^^^^^
> 
> This is most likely your problem.  Since you were able to run 
> mtx from the command line, either the path specifies for it 
> in chg-zd-mtx is incorrect, or it is called without a path 
> and it is not in the Amanda user's default search path.
> 
> Frank
> 
> > 11:21:49 Exit (2) -> <none> no slots available
> > chg-zd-mtx: pid 26452 finish time Fri Aug  1 11:21:49 2003
> > 
> > Here's the changer.conf file:
> > 
> > firstslot=1
> > lastslot=7
> > cleanslot=-1
> > driveslot=0
> > autoclean=0
> > havereader=0
> > OFFLINE_BEFORE_UNLOAD=1
> > poll_drive_ready=3
> > max_drive_wait=120
> > 
> > ... and here's the pertinent bits of amanda.conf:
> > 
> > runtapes 7              # number of tapes to be used in a 
> single run of
> > amdump
> > tpchanger "chg-zd-mtx"  # the tape-changer glue script
> > tapedev "/dev/nst0"     # the no-rewind tape device to be used
> > changerfile "/etc/amanda/cas-unix/changer"
> > changerdev "/dev/sg0"
> > 
> > tapetype DLT7000-IV-C     # what kind of tape it is (see 
> tapetypes below)
> > labelstr "^cas-unix-[0-9][0-9][0-9]*$"  # label constraint 
> regex: all 
> > tapes must match
> > 
> > So-- what gives? If I run amtape, it says that no slots are 
> available, 
> > just like chg-zd-mtx does.
> > 
> > 
> > -Joel
> 
> 
> 
> --
> Frank Smith                                             
> fsmith AT hoovers DOT com
> Systems Administrator                                  Voice: 
> 512-374-4673
> Hoover's Online                                          Fax: 
> 512-374-4501
>