Amanda-Users

Re: A last question (here) on chg-MTX-ZD

2003-08-08 14:04:27
Subject: Re: A last question (here) on chg-MTX-ZD
From: Jay Lessert <jayl AT accelerant DOT net>
To: "Bruntel, Mitchell L" <mbruntel AT att DOT com>
Date: Fri, 8 Aug 2003 11:01:18 -0700
On Fri, Aug 08, 2003 at 10:00:41AM -0500, Bruntel, Mitchell L wrote:
> Hopefully this is it.  sorry it's so lengthy.  
> 
> Question is kind of short.
> 
> In the changer script chg-zd-mtx script Variable :DriveSlot  
> is defined as 
>      Figure out the drive slot number.  By default, it is set to 0.
>      In the example above, the tape drive ("Data Transfer Element")
>      is in slot 0. If your drive slot is not 0, you need to set the
>      drive slot number with the "driveslot" variable.

This is telling you that chg-zd-mtx "driveslot" is the same as mtx
"Data Transfer Element".

> ====================
> Here's the question.
> ====================
> I'm lucky(?) enough to have a three drive robot.
> Drive 0,1, 2 are the names.  Are these absolute values?  IE, if I set
> my tapedev in amanda.conf to drive 2 (/dev/rmt/2n)
> does DRIVESLOT STILL need to be 2, or can that default to the
> "default" of 0?  I've tried it both ways (shown below), and am not
> sure which one is "better" or "right"

When you run 'mtx status' it says you have three "Data Transfer
Element" items.  0, 1, and 2.  When you define chg-zd-mtx 'driveslot',
that refers to the same number.

Now, in /dev/rmt, you've (apparently) got 0n, 1n, 2n.  At this point,
YOU HAVE NO IDEA whether "Data Transfer Element 0" and "/dev/rmt/0n"
refer to the same physical tape drive or not.  YOU MUST FIGURE THAT
OUT:

"Data Transfer Element 0"       /dev/rmt/Xn
"Data Transfer Element 1"       /dev/rmt/Yn
"Data Transfer Element 2"       /dev/rmt/Zn

You have to figure out what X, Y and Z are.  In all cases below, when I
say 'mtx something', I mean 'mtx -f /dev/scsi/changer/c1t0d0 something'
(I believe that is your changer device).

"Data Transfer Element"         means tape drive
"Storage Element"               means tape slot

You need to master running mtx (NOT chg-zd-mtx) by hand.  Very nice
tool, very handy.  I see you've got barcodes on your tapes, excellent!
Do an 'mtx status'.  Unload any tapes that are loaded.  mtx tells you
where they came from.  I'll assume it looks like the chg-zd-mtx
output you just gave us, slot 1 in drive 0, and slot 14 in drive 1.

% mtx unload 1 0
% mtx unload 14 1

Now 'mt status' all the drives, it'll look something like this:

% foreach i (0 1 2)
foreach? mt -f /dev/rmt/${i}n status
foreach? end
/dev/rmt/0n: no tape loaded or drive offline
/dev/rmt/1n: no tape loaded or drive offline
/dev/rmt/2n: no tape loaded or drive offline

Nobody home, right?  Now load a tape into, say, "Data Transfer Element 2".

% mtx load 14 2

And do the foreach loop again.  Aha!  You know the value of "Z"!
Repeat the unload/load/foreach process until you know X and Y also.
If you're lucky, you get:

"Data Transfer Element 0"       /dev/rmt/0n
"Data Transfer Element 1"       /dev/rmt/1n
"Data Transfer Element 2"       /dev/rmt/2n

If you're not lucky, write the mapping down on a card and tape it do
the outside of your changer, and leave comments behind in your
changer.conf.

Now you know how to make *sure* that tapedev in amanda.conf and
driveslot in changer.conf refer to the same physical tape drive.
Pick a drive set both .conf files, and proceed.

It does appear that you have set:

    'tapedev /dev/rmt/2n'
    'driveslot 0'

and that whatever the mapping is, you know for sure that:

    X != 2 :-)
    
But now you know how to set it up correctly.

One worrying note.  In your mtx debug output, I see stuff like:

    MOVE MEDIUM from Element Address 451 to 0 Failed

IIRC, 451 is one of your IMPORT/EXPORT slots and shouldn't even be
involved.  I wonder if there might be a configuration problem in the
box itself.  With some changers, IMPORT/EXPORT slots are just regular
tape slots that you tell the changer to use as IMPORT/EXPORT; if you
inadvertently used those as amanda slots that wouldn't be good.

-- 
Jay Lessert                               jay_lessert AT accelerant DOT net
Accelerant Networks Inc.                       (voice)1.503.439.3461
Beaverton OR, USA                                (fax)1.503.466.9472

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