Amanda-Users

Re: Issues with tape changers

2004-07-14 22:44:09
Subject: Re: Issues with tape changers
From: Gene Heskett <gene.heskett AT verizon DOT net>
To: amanda-users AT amanda DOT org
Date: Wed, 14 Jul 2004 22:31:42 -0400
On Wednesday 14 July 2004 14:16, Gaby vanhegan wrote:
>On 14 Jul 2004, at 16:48, Gene Heskett wrote:
>> Now, the confusion in setting up chg-scsi seems to be mainly
>> centered around how you specify the tape device, both in
>> amanda.conf and in chg-scsi.conf.  Or at least that was the
>> source of my confusion early on.
>
>OK, having looked at your files and changed my own, I'm still no
>closer.  I now get this:
>
>bash-2.05b# sudo -u operator /usr/local/sbin/amcheck ltsn
>Amanda Tape Server Host Check
>-----------------------------
>Holding disk /home/amanda/holding: 47180616 KB disk space available,
>that's plenty
>amcheck-server: could not get changer info: open: /dev/ch0: Bad file
>descriptor

I'm assuming that your ltsn config lives in /usr/local/etc/ltsn?
Just making sure this is the same amanda.conf that amanda is using :)

>Can anyone see any problems with these rrelevant portions of
>amanda.conf:
>
>runtapes 1              # number of tapes to be used in a single run
> of amdump
>tpchanger "chg-scsi"    # the tape-changer glue script
>tapedev "0"             # the no-rewind tape device to be used
>rawtapedev "/dev/null"  # the raw device to be used (ftape only)
^^^^^^^^^
The above item should be commented out.  Don't know if thats the cause 
of the problem though.

>changerfile "/usr/local/etc/amanda/ltsn/chg-scsi.conf"
>#changerdev "/dev/ch0"
>
>maxdumpsize -1          # Maximum number of bytes the planner will
>schedule
>                         # for a run (default: runtapes *
> tape_length). tapetype DLT            # what kind of tape it is
> (see tapetypes below) labelstr "^ltsn[0-9][0-9]*$"    # label
> constraint regex: all tapes must match
>
>amrecover_do_fsf yes            # amrecover will call amrestore with
> the # -f flag for faster positioning of the tape.
>amrecover_check_label yes       # amrecover will call amrestore with
> the # -l flag to check the label. amrecover_changer "chg-scsi"    #
> amrecover will use the changer if you restore
>                                 # from this device.
>                                 # It could be a string like
> 'changer' and
>                                 # amrecover will use your changer
> if you # set your tape with 'settape changer'
>
>And chg-scsi.conf:
>
># chg-scsi for Dell Power Vault 120T
>number_configs  1   # Only 1 configuration
>
>eject           1           # Tapedrives need an eject command
>sleep           90          # Seconds to wait until the tape gets
> ready cleanmax        100         # How many times could a cleaning
> tape get used
>debug           9:0         # High debug level please
>scsitapedev     /dev/nrst0  # Non-rewinding tape device
>changerdev      /dev/ch0    # Jukebox changer
Ahh, here be dragons^^^^

Substitute for /dev/ch0, whatever your dmesg (boot log) identifies the 
changer mechanism as.  I'll insert the pieces from mine for an 
example of what to look for.  Unforch, its for linux_x86 here, so the 
actual device names are going to be different.

># Configuration 0
>config          0           # ID for this configuration
>drivenum        0           # Use drive id 0
>dev             /dev/nrst0  # the device that is used for the
> tapedrive 0
>startuse        0           # The slots associated with the drive 0
>enduse          6           # Final slot to use
>statfile        /usr/local/etc/amanda/ltsn/chg-scsi-slot    # The
> file where the actual slot is stored
>usagecount      /usr/local/etc/amanda/ltsn/totaltime        #
>Statistics file
>
>Gaby

>From my dmesg:
-------
scsi0 : AdvanSys SCSI 3.4MGH: PCI Ultra: IO 0xD000-0xD00F, IRQ 0xB
  Vendor: ARCHIVE   Model: Python 28849-XXX  Rev: 4.CM
  Type:   Sequential-Access                  ANSI SCSI revision: 02
  Vendor: ARCHIVE   Model: Python 28849-XXX  Rev: 4.CM
  Type:   Medium Changer                     ANSI SCSI revision: 02
st: Version 20030622, fixed bufsize 32768, s/g segs 256
Attached scsi tape st0 at scsi0, channel 0, id 1, lun 0
st0: try direct i/o: yes, max page reachable by HBA 131056
Attached scsi generic sg0 at scsi0, channel 0, id 1, lun 0,  type 1
Attached scsi generic sg1 at scsi0, channel 0, id 1, lun 1,  type 8
-----
This last item is the changer robot portion of this particular drive, 
so the changer then is addressed as /dev/sg1 in this case.

Note too, that its the same base scsi address as the drive, but is at 
"lun 1".  If you were running a redhat kernel, you would have to 
rebuild it after turning the SCAN_ALL_LUNS in the .config file, 
otherwise the changer itself will not be found at noot time.  The 
SCAN_ALL_LUNS makes the boot a bit slower since in a scsi2 narrow 
environment, there are still 43 potential devices it has to query 
rather than 7 for the usual case.

This should help.  Yelp to this list if it doesn't.

-- 
Cheers, Gene
There are 4 boxes to be used in defense of liberty. 
Soap, ballot, jury, and ammo.
Please use in that order, starting now.  -Ed Howdershelt, Author
Additions to this message made by Gene Heskett are Copyright 2004, 
Maurice E. Heskett, all rights reserved.


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