Amanda-Users

SV: Problems with chg-manual changer script - Amanda 2.6.0p2

2008-10-28 06:20:44
Subject: SV: Problems with chg-manual changer script - Amanda 2.6.0p2
From: "Gunnarsson, Gunnar" <Gunnar.Gunnarsson AT svk DOT se>
To: <amanda-users AT amanda DOT org>
Date: Tue, 28 Oct 2008 11:04:04 +0100
I had to change another line in the chg-manual script. I don't no if his is a 
mt specific problem in Solaris but hera are my changes for chg-lib.sh

diff   /opt/sfw/libexec/amanda/chg-lib.sh /opt/sfw/libexec/amanda/chg-lib.sh.off

<     if echo "$amdevcheck_output" | $EGREP "VOLUME_MISSING|VOLUME_ERROR" > 
/dev/null; then
---
>     if echo "$amdevcheck_output" | $EGREP "VOLUME_MISSING" > 
> /dev/null; then
134c134
<             $MT $MTF "$try_eject_device_tape" rewoffl
---
>             $MT $MTF "$try_eject_device_tape" eject


Thanks Gunnar Gunnarsson

-----Ursprungligt meddelande-----
Från: owner-amanda-users AT amanda DOT org [mailto:owner-amanda-users AT amanda 
DOT org] För Jon LaBadie
Skickat: den 25 oktober 2008 17:02
Till: amanda-users AT amanda DOT org
Ämne: Re: Problems with chg-manual changer script - Amanda 2.6.0p2

On Sat, Oct 25, 2008 at 02:24:47PM +0200, Gunnarsson, Gunnar wrote:
> Hey everyone,
> 
> I'm having problem setting up chg-manual changer script in Solaris 10.
> >From the taped.debug: 
> 
> mt: unknown command: eject
> 
> I tried to change the eject command to rewoffl instead
> 
> # diff   /opt/sfw/libexec/amanda/chg-lib.sh
> /opt/sfw/libexec/amanda/chg-lib.sh.off
> 134c134
> <             $MT $MTF "$try_eject_device_tape" rewoffl
> ---
> >             $MT $MTF "$try_eject_device_tape" eject
> 
> But then I got some other error instead see below. Any ideas what 
> might be the problem ?
> 
> 1224898398.489880: taper: putresult: 26 REQUEST-NEW-TAPE
> 1224898398.490892: taper: getcmd: NEW-TAPE
> 1224898405.934941: taper: changer_query: changer return was 5 1
> 1224898405.935141: taper: changer_query: searchable = 0
> 1224898405.935176: taper: changer_find: looking for NULL changer is 
> searchable =  0 Error rewinding device /dev/rmt/1n Error rewinding 
> device /dev/rmt/1n
> 1224898466.433921: taper: device_read_label; mode = 0 Can't open tape 
> device /dev/rmt/1n: Device busy
> /dev/rmt/1n: Device busy
> Can't open tape device /dev/rmt/1n: Device busy Can't open tape device 
> /dev/rmt/1n: Device busy Can't open tape device /dev/rmt/1n: Device 
> busy
> /dev/rmt/1n: Device busy
> Can't open tape device /dev/rmt/1n: Device busy

Just a WAG.  Only thing in common is Solaris, but it was 9 vs 10.

My mt command often would return while the tape was still rewinding.  If run 
from the command line, I would get the next shell prompt and yet could still 
hear the tape drive and see the tape's activity lights.

Until the tape had actually completed its task, new commands would fail.  In my 
scripts, I had to insert "sleep X" (X to be empirically defined) after mt cmds 
that might take a significant time.

jl
-- 
Jon H. LaBadie                  jon AT jgcomp DOT com
 JG Computing
 12027 Creekbend Drive          (703) 787-0884
 Reston, VA  20194              (703) 787-0922 (fax)