Amanda-Users

Re: chg-zd-mtx output

2002-08-15 13:40:23
Subject: Re: chg-zd-mtx output
From: Jay Lessert <jayl AT accelerant DOT net>
To: Jason Greenberg <jg AT execulink DOT com>
Date: Thu, 15 Aug 2002 10:24:56 -0700
On Thu, Aug 15, 2002 at 12:49:04PM -0400, Jason Greenberg wrote:
> Does anyone know what could cause this output?  I am trying to debug my
> setup with a PowerVault 128T / Linux Redhat 7.3 
> 
> 
> bash-2.05a$ /usr/lib/amanda/chg-zd-mtx -info
> /usr/lib/amanda/chg-zd-mtx: [: : integer expression expected
> /usr/lib/amanda/chg-zd-mtx: [: -lt: unary operator expected
>   16 1 1

I'm a happy chg-zd-mtx user, but it is not the most portable script
ever, because of:

    - The wide range of responses possible from a dizzying
      array of almost-but-not-quite standards compliant
      changers.

    - The wide range of responses possible from a disturbingly
      variant range of tr, sed, awk, sh, etc. utilities.

When I was tweaking my chg-zd-mtx to work, what I found most useful
was:

    % cd /usr/local/etc/amanda/config_dir
    % sh -x /usr/lib/amanda/chg-zd-mtx -info (or whatever command doesn't work)

In your case, the problem is probably *not* in the line like:

    if [ $usedslot -lt 0 ]; then

where the script is blowing up, but in the mildly amazing line like:

    usedslot=`echo $tmpslot |
              sed -n "s/Data Transfer Element $drivenum:Empty/-1/p;
                      s/Data Transfer Element $drivenum:Full (Storage Element 
\([1-9][0-9]*\) Loaded)\(.*\)/\1/p"`

where the sed is not interacting w/the mtx output from your changer the
way the script expects.

-- 
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>