Hi,

Coming back to work after Easter holidays I found a small annoyance
with amverify:

Our cron backup skript basically does 

amdump;
mt status;
amverify;
mt offline;

After inserting the last tape on thursday all backups went to holding
disk as planned. Inserting the next tape for amflush lead to
unexpected behaviour, because two amverify processes left over from
the cron jobs happily grabbed control of the tape, so amflush has to
wait.

I have some SCSI trouble leading to unexpected server reboots, so I
won't send any signals to processes dealing with the tape drive.  I
thought about "amdump; mt status; mt rewind && amverify && mt offline"
but this does not cope with the problem that amverify (as of Amanda
2.4.2) does not check for the tape label. It happily tests any
inserted tape. I could use a amverify option a la "amverify
--test-last-backup-or-error-out-immediately <config>" that uses the
tape list and "amcheck -t" to look for the tape. At the moment it uses

...
$Echon "Rewinding..."
until $MT $MTOPT $DEVICE rewind; do
        sleep 3
done
...

which is an endless loop if no tape is inserted. A good test for human
presence is difficult; so a long timeout (approx. 3 hours in the
example) could be used:

until ($MT $MTOPT $DEVICE rewind && i < 3600); do
        sleep 3;
        $i++;
done


What's your approach to amverify in skripts?


Johannes Nie�

P.S: Somehow my cron does create the "next" processes of a crontab
entry only after ending the last one, so I can't "kill" anything.

Reply via email to