Amanda-Users

Re: amrecover failures

2006-07-10 19:58:15
Subject: Re: amrecover failures
From: Frank Smith <fsmith AT hoovers DOT com>
To: Jerlique Bahn <jerlique AT webscene.com DOT au>
Date: Mon, 10 Jul 2006 17:53:27 -0500
Jerlique Bahn wrote:
>>> I have recently configured Amanda to backup our data.  I am now trying
>> to
>>> restore some of the data that I have backed up, and I am having problems
>>> doing so.  The client and server are the same machine. I have chg-manual
>>> configured so that the first and last slot are both 1. I am running
>>> amrecover as root. I am guessing that its because the changer think that
>> it needs a different tape, but I cannot work out why.
>>> # ammt -f /dev/nsa0 status
>>> /dev/nsa0 status: ONLINE ds == 0x0001 er == 0x0000
>>>
>>> # amtape backup reset
>>> changer: got exit: 0 str: 1 /dev/nsa0
>>> amtape: changer is reset, slot 1 is loaded.
>>>
>>> ## this is from /tmp/Amanda/amidxtaped....
>>> Looking for tape backup-1...
>>> changer: got exit: 0 str: 0 1 1
>>> changer_query: changer return was 1 1
>>> changer_query: searchable = 0
>>> changer_find: looking for backup-1 changer is searchable = 0
>>> changer: got exit: 2 str: /usr/local/amanda/libexec/chg-manual: cannot
>>> create /dev/tty: Device not configured
>> I'm not very familiar with the chg-manual script, but as a wild guess
>> you might have the wrong console device specified for your OS.
> 
> I don't think so, because the commands that are failing from within
> chg-manual work if I type them in eg:
> 
> SRV# echo "insert tape into slot $1 and press return" >/dev/tty
> insert tape into slot  and press return
> SRV# read ANSWER </dev/tty
> 
> SRV#
>  
>>> amidxtaped: could not load slot /usr/local/amanda/libexec/chg-manual::
>>> cannot create /dev/tty: Device not configured
>>> amidxtaped: time 0.186: could not load slot
>>> /usr/local/amanda/libexec/chg-manual:: cannot create /dev/tty: Device
>> not
>>> configu
>>> red
>>> amidxtaped: time 0.186: pid 5948 finish time Mon Jul 10 23:01:39 2006
>>>
>>>
>>> ## This is from the changer.debug
>>> MT -> /usr/local/amanda/sbin/ammt -f
>>> DD -> /usr/local/amanda/sbin/amdd
>>> Args -> -slot next
>>>      -> rewind /dev/nsa0
>>> /dev/nsa0 rewind failed: Permission denied
>> Looks like this is your main problem, you don't have permissions to
>> the tape drive.  Odd, since you say you are running amrecover as
>> root.  Is the tape actually loaded in the drive?  Can you (from the
>> command line) run 'mt -f /dev/nsa0 rewind' successfully?
> 
> I agree, however from the command line I have full access:

On poking around my installation, the changer scripts are all
owned by my Amanda user, not root.  Can you 'su -' to your Amanda
user and still run these commands?

Frank

> 
> SRV# mt -f /dev/nsa0 rewind
> 
> SRV# dd if=/dev/nsa0 bs=32k
> AMANDA: TAPESTART DATE 20060623 TAPE backup-1
> 014
> 1+0 records in
> 1+0 records out
> 32768 bytes transferred in 3.319408 secs (9872 bytes/sec)
> 
> SRV# mt -f /dev/nsa0 status
> Mode      Density              Blocksize      bpi      Compression
> Current:  0x42                 variable       0        0x1
> ---------available modes---------
> 0:        0x42                 variable       0        0x1
> 1:        0x42                 variable       0        0x1
> 2:        0x42                 variable       0        0x1
> 3:        0x42                 variable       0        0x1
> ---------------------------------
> Current Driver State: at rest.
> ---------------------------------
> File Number: 0  Record Number: 0        Residual Count 0
> 
> JB
> 


-- 
Frank Smith                                      fsmith AT hoovers DOT com
Sr. Systems Administrator                       Voice: 512-374-4673
Hoover's Online                                   Fax: 512-374-4501