Amanda-Users

RE: Have 2.4.4p1 RAIT over file: working sort of...[ very long ]

2003-11-20 02:29:40
Subject: RE: Have 2.4.4p1 RAIT over file: working sort of...[ very long ]
From: "Dana Bourgeois" <em-lists AT netgods DOT us>
To: "'Jean-Louis Martineau'" <martinea AT iro.umontreal DOT ca>
Date: Wed, 19 Nov 2003 23:24:01 -0800
OK, I ran 'amtape daily1 slot 10' which should move the active slot to 10
and show the tape loaded.

changer.debug ==============================
Args -> -slot 10
Args -> -slot 10
MT -> /usr/sbin/ammt -f
MT -> /usr/sbin/ammt -f
Args -> -slot 10
MT -> /usr/sbin/ammt -f
Note: setting posteject to a default of "true"
     -> rewind file:/backup1/daily10
Note: setting posteject to a default of "true"
Exit -> 10 file:/backup1/daily10
     -> rewind file:/backup2/daily10
Exit -> 10 file:/backup2/daily10
Note: setting posteject to a default of "true"
     -> rewind file:/backup3/daily10
Exit -> 10 file:/backup3/daily10
==================================================
/backup1/daily10/info:
        position 0
/backup2/daily10/info:
        position 0
/backup/daily10/info:
        position 0

So it looks like the rewind worked...

rait-changer.debug ================================
args: /usr/lib/amanda/chg-rait -slot 10
+ prefix=/usr
+ exec_prefix=/usr
+ sbindir=/usr/sbin
+ libexecdir=/usr/lib/amanda
+ USE_VERSION_SUFFIXES=no
+ test no = yes
+ SUF=
+ getconf=/usr/sbin/amgetconf
+ PATH=/usr/sbin:/usr/lib/amanda:/usr/bin:/bin:/usr/sbin:/sbin:/usr/ucb
+ export PATH
++ /usr/sbin/amgetconf changerfile
+ changerfile=/var/lib/amanda/config/rait-changer.conf
+ . /var/lib/amanda/config/rait-changer.conf
++ nchangers=3
++ tpchanger_1=chg-multi
++ changerfile_1=/etc/amanda/daily1/changer1.conf
++ tpchanger_2=chg-multi
++ changerfile_2=/etc/amanda/daily1/changer2.conf
++ tpchanger_3=chg-multi
++ changerfile_3=/etc/amanda/daily1/changer3.conf
++ /usr/sbin/amgetconf ORG
+ org=daily
++ /usr/sbin/amgetconf mailto
+ mailto=amanda AT netgods DOT us
+ i=1
+ '[' 1 -le 3 ']'
+ eval 'tpchanger=$tpchanger_1'
++ tpchanger=chg-multi
+ eval 'changerdev=$changerdev_1'
++ changerdev=
+ eval 'changerfile=$changerfile_1'
++ changerfile=/etc/amanda/daily1/changer1.conf
+ eval 'tapedev=$tapedev_1'
++ tapedev=
+ mkdir -p /tmp/amanda/chgwork30095/1
+ cd /tmp/amanda/chgwork30095/1
+ cat
++ expr 1 + 1
+ i=2
+ '[' 2 -le 3 ']'
+ eval 'tpchanger=$tpchanger_2'
++ tpchanger=chg-multi
+ eval 'changerdev=$changerdev_2'
++ changerdev=
+ eval 'changerfile=$changerfile_2'
++ changerfile=/etc/amanda/daily1/changer2.conf
+ eval 'tapedev=$tapedev_2'
++ tapedev=
+ mkdir -p /tmp/amanda/chgwork30095/2
+ cd /tmp/amanda/chgwork30095/2
+ cat
++ expr 2 + 1
+ i=3
+ '[' 3 -le 3 ']'
+ eval 'tpchanger=$tpchanger_3'
++ tpchanger=chg-multi
+ eval 'changerdev=$changerdev_3'
++ changerdev=
+ eval 'changerfile=$changerfile_3'
++ changerfile=/etc/amanda/daily1/changer3.conf
+ eval 'tapedev=$tapedev_3'
++ tapedev=
+ mkdir -p /tmp/amanda/chgwork30095/3
+ cd /tmp/amanda/chgwork30095/3
+ cat
++ expr 3 + 1
+ i=4
+ '[' 4 -le 3 ']'
+ wait
+ myexit=0
+ myslot=-1
+ mymax=65536
+ myflag=1
+ mydev=
+ mysep={
+ i=1
+ '[' 1 -le 3 ']'
+ read exitcode
+ read n dev
+ echo --------------
--------------
+ cat /tmp/amanda/chgwork30095/1/stderr
+ chg-multi -slot 10
+ echo 0
+ cat /tmp/amanda/changer.debug
Args -> -slot 10
Args -> -slot 10
MT -> /usr/sbin/ammt -f
MT -> /usr/sbin/ammt -f
Args -> -slot 10
MT -> /usr/sbin/ammt -f
Note: setting posteject to a default of "true"
     -> rewind file:/backup1/daily10
Note: setting posteject to a default of "true"
Exit -> 10 file:/backup1/daily10
     -> rewind file:/backup2/daily10
Exit -> 10 file:/backup2/daily10
Note: setting posteject to a default of "true"
     -> rewind file:/backup3/daily10
Exit -> 10 file:/backup3/daily10
+ echo --------------
--------------
+ '[' 0 '!=' 0 ']'
+ '[' -1 = -1 ']'
+ myslot=10
+ '[' 10 '!=' 10 ']'
+ mydev={file:/backup1/daily10
+ mysep=,
++ expr 1 + 1
+ i=2
+ '[' 2 -le 3 ']'
+ read exitcode
+ read n dev
+ echo --------------
--------------
+ cat /tmp/amanda/chgwork30095/2/stderr
+ chg-multi -slot 10
+ echo 0
+ cat /tmp/amanda/changer.debug
Args -> -slot 10
Args -> -slot 10
MT -> /usr/sbin/ammt -f
MT -> /usr/sbin/ammt -f
Args -> -slot 10
MT -> /usr/sbin/ammt -f
Note: setting posteject to a default of "true"
     -> rewind file:/backup1/daily10
Note: setting posteject to a default of "true"
Exit -> 10 file:/backup1/daily10
     -> rewind file:/backup2/daily10
Exit -> 10 file:/backup2/daily10
Note: setting posteject to a default of "true"
     -> rewind file:/backup3/daily10
Exit -> 10 file:/backup3/daily10
+ echo --------------
--------------
+ '[' 0 '!=' 0 ']'
+ '[' 10 = -1 ']'
+ '[' 10 '!=' 10 ']'
+ mydev={file:/backup1/daily10,file:/backup2/daily10
+ mysep=,
++ expr 2 + 1
+ i=3
+ '[' 3 -le 3 ']'
+ read exitcode
+ read n dev
+ echo --------------
--------------
+ cat /tmp/amanda/chgwork30095/3/stderr
+ chg-multi -slot 10
+ echo 0
+ cat /tmp/amanda/changer.debug
Args -> -slot 10
Args -> -slot 10
MT -> /usr/sbin/ammt -f
MT -> /usr/sbin/ammt -f
Args -> -slot 10
MT -> /usr/sbin/ammt -f
Note: setting posteject to a default of "true"
     -> rewind file:/backup1/daily10
Note: setting posteject to a default of "true"
Exit -> 10 file:/backup1/daily10
     -> rewind file:/backup2/daily10
Exit -> 10 file:/backup2/daily10
Note: setting posteject to a default of "true"
     -> rewind file:/backup3/daily10
Exit -> 10 file:/backup3/daily10
+ echo --------------
--------------
+ '[' 0 '!=' 0 ']'
+ '[' 10 = -1 ']'
+ '[' 10 '!=' 10 ']'
+ mydev={file:/backup1/daily10,file:/backup2/daily10,file:/backup3/daily10
+ mysep=,
++ expr 3 + 1
+ i=4
+ '[' 4 -le 3 ']'
+
mydev=rait:{file:/backup1/daily10,file:/backup2/daily10,file:/backup3/daily1
0}
+ echo 10
'rait:{file:/backup1/daily10,file:/backup2/daily10,file:/backup3/daily
10}'
+ rm -rf /tmp/amanda/chgwork30095
+ exit 0
========================================

I don't see anything wrong here.

OK, now I will run 'amlabel daily1 daily10 slot 10' and see if the rewind
works correctly and the tape is checked without any errors:

output from amlabel ===================
labeling tape in slot 10
(rait:{file:/backup1/daily10,file:/backup2/daily10,file:/backup3/daily10}):
rewinding, reading label daily10
rewinding, writing label daily10, checking label
amlabel: no label found, are you sure
rait:{file:/backup1/daily10,file:/backup2/daily10,file:/backup3/daily10} is
non-rewinding?
========================================

Now I'm sure its non-rewinding so I check the info files again after this.

/backup1/daily10/info:
        position 3
/backup2/daily10/info:
        position 3
/backup3/daily10/info:
        position 3

Should be position 0 if its rewound, I think.  Here are the debug outputs
after the amlabel...

changer.debug ============================
Args -> -slot 10
Args -> -slot 10
MT -> /usr/sbin/ammt -f
MT -> /usr/sbin/ammt -f
Args -> -slot 10
MT -> /usr/sbin/ammt -f
Note: setting posteject to a default of "true"
     -> rewind file:/backup1/daily10
Note: setting posteject to a default of "true"
Exit -> 10 file:/backup1/daily10
     -> rewind file:/backup2/daily10
Exit -> 10 file:/backup2/daily10
Note: setting posteject to a default of "true"
     -> rewind file:/backup3/daily10
Exit -> 10 file:/backup3/daily10
Args -> -slot 10
MT -> /usr/sbin/ammt -f
Args -> -slot 10
Args -> -slot 10
MT -> /usr/sbin/ammt -f
MT -> /usr/sbin/ammt -f
Note: setting posteject to a default of "true"
Note: setting posteject to a default of "true"
Note: setting posteject to a default of "true"
     -> rewind file:/backup2/daily10
Exit -> 10 file:/backup2/daily10
     -> rewind file:/backup1/daily10
Exit -> 10 file:/backup1/daily10
     -> rewind file:/backup3/daily10
Exit -> 10 file:/backup3/daily10
============================================
rait-changer.debug =========================
args: /usr/lib/amanda/chg-rait -slot 10
+ prefix=/usr
+ exec_prefix=/usr
+ sbindir=/usr/sbin
+ libexecdir=/usr/lib/amanda
+ USE_VERSION_SUFFIXES=no
+ test no = yes
+ SUF=
+ getconf=/usr/sbin/amgetconf
+ PATH=/usr/sbin:/usr/lib/amanda:/usr/bin:/bin:/usr/sbin:/sbin:/usr/ucb
+ export PATH
++ /usr/sbin/amgetconf changerfile
+ changerfile=/var/lib/amanda/config/rait-changer.conf
+ . /var/lib/amanda/config/rait-changer.conf
++ nchangers=3
++ tpchanger_1=chg-multi
++ changerfile_1=/etc/amanda/daily1/changer1.conf
++ tpchanger_2=chg-multi
++ changerfile_2=/etc/amanda/daily1/changer2.conf
++ tpchanger_3=chg-multi
++ changerfile_3=/etc/amanda/daily1/changer3.conf
++ /usr/sbin/amgetconf ORG
+ org=daily
++ /usr/sbin/amgetconf mailto
+ mailto=amanda AT netgods DOT us
+ i=1
+ '[' 1 -le 3 ']'
+ eval 'tpchanger=$tpchanger_1'
++ tpchanger=chg-multi
+ eval 'changerdev=$changerdev_1'
++ changerdev=
+ eval 'changerfile=$changerfile_1'
++ changerfile=/etc/amanda/daily1/changer1.conf
+ eval 'tapedev=$tapedev_1'
++ tapedev=
+ mkdir -p /tmp/amanda/chgwork30218/1
+ cd /tmp/amanda/chgwork30218/1
+ cat
++ expr 1 + 1
+ i=2
+ '[' 2 -le 3 ']'
+ eval 'tpchanger=$tpchanger_2'
++ tpchanger=chg-multi
+ eval 'changerdev=$changerdev_2'
++ changerdev=
+ eval 'changerfile=$changerfile_2'
++ changerfile=/etc/amanda/daily1/changer2.conf
+ eval 'tapedev=$tapedev_2'
++ tapedev=
+ mkdir -p /tmp/amanda/chgwork30218/2
+ cd /tmp/amanda/chgwork30218/2
+ cat
++ expr 2 + 1
+ i=3
+ '[' 3 -le 3 ']'
+ eval 'tpchanger=$tpchanger_3'
++ tpchanger=chg-multi
+ eval 'changerdev=$changerdev_3'
++ changerdev=
+ eval 'changerfile=$changerfile_3'
++ changerfile=/etc/amanda/daily1/changer3.conf
+ eval 'tapedev=$tapedev_3'
++ tapedev=
+ mkdir -p /tmp/amanda/chgwork30218/3
+ cd /tmp/amanda/chgwork30218/3
+ cat
++ expr 3 + 1
+ i=4
+ '[' 4 -le 3 ']'
+ wait
+ myexit=0
+ myslot=-1
+ mymax=65536
+ myflag=1
+ mydev=
+ mysep={
+ i=1
+ '[' 1 -le 3 ']'
+ read exitcode
+ read n dev
+ echo --------------
--------------
+ cat /tmp/amanda/chgwork30218/1/stderr
+ chg-multi -slot 10
+ echo 0
+ cat /tmp/amanda/changer.debug
Args -> -slot 10
Args -> -slot 10
MT -> /usr/sbin/ammt -f
MT -> /usr/sbin/ammt -f
Args -> -slot 10
MT -> /usr/sbin/ammt -f
Note: setting posteject to a default of "true"
     -> rewind file:/backup1/daily10
Note: setting posteject to a default of "true"
Exit -> 10 file:/backup1/daily10
     -> rewind file:/backup2/daily10
Exit -> 10 file:/backup2/daily10
Note: setting posteject to a default of "true"
     -> rewind file:/backup3/daily10
Exit -> 10 file:/backup3/daily10
Args -> -slot 10
MT -> /usr/sbin/ammt -f
Args -> -slot 10
Args -> -slot 10
MT -> /usr/sbin/ammt -f
MT -> /usr/sbin/ammt -f
Note: setting posteject to a default of "true"
Note: setting posteject to a default of "true"
Note: setting posteject to a default of "true"
     -> rewind file:/backup2/daily10
Exit -> 10 file:/backup2/daily10
     -> rewind file:/backup1/daily10
Exit -> 10 file:/backup1/daily10
     -> rewind file:/backup3/daily10
Exit -> 10 file:/backup3/daily10
+ echo --------------
--------------
+ '[' 0 '!=' 0 ']'
+ '[' -1 = -1 ']'
+ myslot=10
+ '[' 10 '!=' 10 ']'
+ mydev={file:/backup1/daily10
+ mysep=,
++ expr 1 + 1
+ i=2
+ '[' 2 -le 3 ']'
+ read exitcode
+ read n dev
+ echo --------------
--------------
+ cat /tmp/amanda/chgwork30218/2/stderr
+ chg-multi -slot 10
+ echo 0
+ cat /tmp/amanda/changer.debug
Args -> -slot 10
Args -> -slot 10
MT -> /usr/sbin/ammt -f
MT -> /usr/sbin/ammt -f
Args -> -slot 10
MT -> /usr/sbin/ammt -f
Note: setting posteject to a default of "true"
     -> rewind file:/backup1/daily10
Note: setting posteject to a default of "true"
Exit -> 10 file:/backup1/daily10
     -> rewind file:/backup2/daily10
Exit -> 10 file:/backup2/daily10
Note: setting posteject to a default of "true"
     -> rewind file:/backup3/daily10
Exit -> 10 file:/backup3/daily10
Args -> -slot 10
MT -> /usr/sbin/ammt -f
Args -> -slot 10
Args -> -slot 10
MT -> /usr/sbin/ammt -f
MT -> /usr/sbin/ammt -f
Note: setting posteject to a default of "true"
Note: setting posteject to a default of "true"
Note: setting posteject to a default of "true"
     -> rewind file:/backup2/daily10
Exit -> 10 file:/backup2/daily10
     -> rewind file:/backup1/daily10
Exit -> 10 file:/backup1/daily10
     -> rewind file:/backup3/daily10
Exit -> 10 file:/backup3/daily10
+ echo --------------
--------------
+ '[' 0 '!=' 0 ']'
+ '[' 10 = -1 ']'
+ '[' 10 '!=' 10 ']'
+ mydev={file:/backup1/daily10,file:/backup2/daily10
+ mysep=,
++ expr 2 + 1
+ i=3
+ '[' 3 -le 3 ']'
+ read exitcode
+ read n dev
+ echo --------------
--------------
+ cat /tmp/amanda/chgwork30218/3/stderr
+ chg-multi -slot 10
+ echo 0
+ cat /tmp/amanda/changer.debug
Args -> -slot 10
Args -> -slot 10
MT -> /usr/sbin/ammt -f
MT -> /usr/sbin/ammt -f
Args -> -slot 10
MT -> /usr/sbin/ammt -f
Note: setting posteject to a default of "true"
     -> rewind file:/backup1/daily10
Note: setting posteject to a default of "true"
Exit -> 10 file:/backup1/daily10
     -> rewind file:/backup2/daily10
Exit -> 10 file:/backup2/daily10
Note: setting posteject to a default of "true"
     -> rewind file:/backup3/daily10
Exit -> 10 file:/backup3/daily10
Args -> -slot 10
MT -> /usr/sbin/ammt -f
Args -> -slot 10
Args -> -slot 10
MT -> /usr/sbin/ammt -f
MT -> /usr/sbin/ammt -f
Note: setting posteject to a default of "true"
Note: setting posteject to a default of "true"
Note: setting posteject to a default of "true"
     -> rewind file:/backup2/daily10
Exit -> 10 file:/backup2/daily10
     -> rewind file:/backup1/daily10
Exit -> 10 file:/backup1/daily10
     -> rewind file:/backup3/daily10
Exit -> 10 file:/backup3/daily10
+ echo --------------
--------------
+ '[' 0 '!=' 0 ']'
+ '[' 10 = -1 ']'
+ '[' 10 '!=' 10 ']'
+ mydev={file:/backup1/daily10,file:/backup2/daily10,file:/backup3/daily10
+ mysep=,
++ expr 3 + 1
+ i=4
+ '[' 4 -le 3 ']'
+
mydev=rait:{file:/backup1/daily10,file:/backup2/daily10,file:/backup3/daily1
0}
+ echo 10
'rait:{file:/backup1/daily10,file:/backup2/daily10,file:/backup3/daily10}'
+ rm -rf /tmp/amanda/chgwork30218
+ exit 0
=============================================
If there is a problem I sure don't see where it is.  It all looks like its
working but I think the tape is not getting rewound properly.  It all SEZ it
happens but I don't think it does.

OK, so I try it by hand.  I check the info file for daily10 on all backup
disks.  Position 3.  Then I run 'ammt -d -f file:/backup?/daily10 rewind'
checking the relevant file after each run.  And the ammt command rewinds the
tape (info file contents) back to "position 0".  

Is the script somehow skipping the command but not catching the error?  



Dana Bourgeois


> -----Original Message-----
> From: Jean-Louis Martineau [mailto:martinea AT iro.umontreal DOT ca] 
> Sent: Wednesday, November 19, 2003 6:54 AM
> To: Dana Bourgeois
> Cc: amanda-users AT amanda DOT org
> Subject: Re: Have 2.4.4p1 RAIT over file: working sort of...
> 
> 
> Hi Dana,
> 
> Your setup should works correctly, what's in the changer debug file?
> 
> Jean-Louis