Amanda-Users

RE: NEC autoloaded - amanda-2.4.4

2003-06-18 08:32:55
Subject: RE: NEC autoloaded - amanda-2.4.4
From: "Ron Bauman" <RBauman AT HatterasNetworks DOT com>
To: "Tom Brown" <tom.brown AT goodtechnology DOT com>, <amanda-users AT amanda DOT org>
Date: Wed, 18 Jun 2003 08:27:36 -0400
Tom, your changer file contents and what chg-zd-mtx is finding are not the 
same. The error message and the debug configuration both indicate lastslot is 
1.  Be sure that your amanda.conf in the gt-host directory points to the 
correct changer file.  From my amanda.conf file:

# modified to support Treefrog
tpchanger "chg-zd-mtx.ccserv"   # the tape-changer glue script
tapedev "/dev/nst0"     # the no-rewind tape device to be used
changerdev "/dev/sgd"   # the mtx control device
#rawtapedev "/dev/null" # the raw device to be used (ftape only)
# changerfile is a prefix for chg-zd-mtx.  we point to the /usr/adm/amanda/daily
# directory.
changerfile "/etc/amanda/daily/changer"

And my changer.conf file is in /etc/amanda/daily.  It has

# From /usr/local/src/amanda-2.4.4/changer-src/chg-zd-mtx
#
# Here is a commented out example file with all the variables and showing
# their default value (if any):
####
firstslot=1                 #### First storage slot (element) -- required
lastslot=12                 #### Last storage slot (element) -- required
cleanslot=15                #### Slot with cleaner tape -- default is "-1"
#                           #### Set negative to indicate no cleaner available
#
#   # Do you want to clean the drive after a certain number of accesses?
#   # NOTE - This is unreliable, since 'accesses' aren't 'uses', and we
#   #        have no reliable way to count this.  A single amcheck could
#   #        generate as many accesses as slots you have, plus 1.
#   # ALSO NOTE - many modern tape loaders handle this automatically.
#
AUTOCLEAN=1                 #### Set to '1' or greater to enable
autoclean=1                 #### Set to '1' or greater to enable
#
autocleancount=50           #### Number of access before a clean.
#
havereader=1                #### If you have a barcode reader, set to 1.
#
OFFLINE_BEFORE_UNLOAD=0 #### Does your tape driver require a
                        #### 'mt offline' before mtx unload?
offline_before_unload=0     #### Does your robot require an
#                           #### 'mt offline' before mtx unload?
#
driveslot=0                 #### Drive slot number.  Defaults to the
#                           #### tape device number (e.g. /dev/nst0 is
#                           #### assumed to be robot drive 0).
#
poll_drive_ready=1          #### Time (seconds) between tests to see if
#                           #### the tape drive has gone ready (default: 3).
#
max_drive_wait=120          #### Maximum time (seconds) to wait for the
#                           #### tape drive to become ready (default: 120).
unloadpause=0                   
loadpause=5                 #### Time (seconds) to wait after loading a tape
                            #### before declaring the operation done. (default: 
0)
offlinestatus=1           #### Set to 0 if 'mt status' gives an
#                         #### "offline" when drive is offline.
#                         #### Set to 1 or greater if 'mt status'
#                         #### doesn't give and offline, rather an
#                         #### "ONLINE" when drive is online.
####

My changer script is /usr/lib/amanda/chg-zd-mtx.ccserv.  As per the 
instructions in the header, when I run it from the /etc/amanda/daily directory 
with the -info switch I get:

[root@softserv2 daily]# /usr/lib/amanda/chg-zd-mtx.ccserv -info
4 12 1 1
[root@softserv2 daily]#

The second number is the number of slots which for you should be 7.

Ron Bauman
Hatteras Networks, Inc.

-----Original Message-----
From: Tom Brown [mailto:tom.brown AT goodtechnology DOT com]
Sent: Wednesday, June 18, 2003 7:50 AM
To: amanda-users AT amanda DOT org
Subject: NEC autoloaded - amanda-2.4.4


Hi,

NEC autloader with 10 slots and IBM ultrium tape drive.

mtx version 1.2.17

amanda-2.4.4

dmesg -

  Vendor: IBM       Model: ULTRIUM-TD1       Rev: 1CSG
  Type:   Sequential-Access                  ANSI SCSI revision: 03
(scsi0:A:2): 40.000MB/s transfers (20.000MHz, offset 8, 16bit)
  Vendor: NEC       Model: LL0101H-0A        Rev: 0002
  Type:   Medium Changer                     ANSI SCSI revision: 02

I can control this robot with mtx fine - I have noticed that i need to do a
mt -f /dev/nst0 offline before i can unload but other than that mtx is fine
and i can load and unload happily.

The problem comes when doing, at the moment, an amlabel.

the first tape loads and labels fine with a

$ amlabel -f gt-host gthost01 slot 1
labeling tape in slot 1 (/dev/nst0):
rewinding, reading label gtlto01, tape is in another amanda configuration
rewinding, writing label gthost01, checking label, done.

then when trying the next

$ amlabel -f gt-host gthost02 slot 2
amlabel: could not load slot "2": Cannot find slot 2 in slot list ( 1)

an mtx status gives me

$ mtx -f /dev/sg3 status
  Storage Changer /dev/sg3:1 Drives, 9 Slots ( 0 Import/Export )
Data Transfer Element 0:Full (Storage Element 1 Loaded):VolumeTag =
      Storage Element 1:Empty:VolumeTag=
      Storage Element 2:Full :VolumeTag=
      Storage Element 3:Full :VolumeTag=
      Storage Element 4:Full :VolumeTag=
      Storage Element 5:Full :VolumeTag=
      Storage Element 6:Full :VolumeTag=
      Storage Element 7:Full :VolumeTag=
      Storage Element 8:Empty:VolumeTag=
      Storage Element 9:Empty:VolumeTag=

This is whats in my changer file

firstslot=1
lastslot=7
cleanslot=8
AUTOCLEAN=0
autocleancount=99
havereader=0
offlinestatus=1
OFFLINE_BEFORE_UNLOAD=1
tapedev=/dev/nst0

I think this is because of the drive needing an offline before an unload but
i thought this should have been taken care of in the change.conf

$ cat /tmp/amanda/amlabel.20030618134533.debug
amlabel: debug 1 pid 28779 ruid 11 euid 11: start at Wed Jun 18 13:45:33
2003
changer: got exit: 2 str: <none> Cannot find slot 2 in slot list ( 1)
amlabel: could not load slot "2": Cannot find slot 2 in slot list ( 1)
amlabel: pid 28779 finish time Wed Jun 18 13:45:34 2003

and

$ cat /tmp/amanda/chg-zd-mtx.20030618134533.debug
chg-zd-mtx: debug 1 pid 28790 ruid 11 euid 11: start at Wed Jun 18 13:45:33
2003
13:45:33 Arg info:
         $# = 2
         $0 = "/opt/amanda-2.4.4/libexec/chg-zd-mtx"
         $1 = "-slot"
         $2 = "2"
13:45:33 Running: /usr/sbin/mtx status
13:45:34 Exit code: 0
         Stdout:
  Storage Changer /dev/sg3:1 Drives, 9 Slots ( 0 Import/Export )
Data Transfer Element 0:Full (Storage Element 1 Loaded):VolumeTag =
      Storage Element 1:Empty:VolumeTag=
      Storage Element 2:Full :VolumeTag=
      Storage Element 3:Full :VolumeTag=
      Storage Element 4:Full :VolumeTag=
      Storage Element 5:Full :VolumeTag=
      Storage Element 6:Full :VolumeTag=
      Storage Element 7:Full :VolumeTag=
      Storage Element 8:Empty:VolumeTag=
      Storage Element 9:Empty:VolumeTag=
13:45:34 Config info:
         firstslot = "1"
         lastslot = "1"
         cleanslot = "-1"
         cleancycle = "120"
         offline_before_unload = "1"
         unloadpause = "0"
         autoclean = "0"
         autocleancount = "99"
         havereader = "0"
         driveslot = "0"
         poll_drive_ready = "3"
         max_drive_wait = "120"
13:45:34 LOADSLOT -> load drive 0 (/dev/nst0) from slot 2
13:45:34 Exit (2) -> <none> Cannot find slot 2 in slot list ( 1)
chg-zd-mtx: pid 28917 finish time Wed Jun 18 13:45:34 2003

thanks for any help

Tom



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