Amanda-Users

Re: Removing / replacing tape in cycle

2005-01-05 17:20:13
Subject: Re: Removing / replacing tape in cycle
From: Gene Heskett <gene.heskett AT verizon DOT net>
To: Fran Fabrizio <fran AT cis.uab DOT edu>
Date: Wed, 5 Jan 2005 17:13:43 -0500
On Wednesday 05 January 2005 16:33, Fran Fabrizio wrote:
>First off - apologies, I know I've asked this before, and I'm sure
> it's addressed in the docs somewhere, but I've been searching for
> 30 minutes and I can't find either, so I humbly ask again (because
> I need to fix it before tonight :-)
>
>I've had a tape go bad on me.  Its label is CIS-008 in config CIS. 
> What are the proper steps to remove this tape from the cycle and
> add a new one?   Is this it?
>
># amrmtape CIS CIS-008
># (load fresh tape in the drive)
># amlabel CIS CIS-XXX (where XXX is the next in the series I haven't
>used yet?)
>
>Do I need to then edit the tapelist by hand?  Or alternately, do I
> just want to remove the bad tape, put in a fresh one, and label it
> CIS-008 (knowing that if I then need a backup that was on the bad
> CIS-008 Amanda will become confused)?
>
>Also, amrmtape seems for when a tape goes bad (which is my current
>situation) but is there a different procedure for when you just want
> to retire a tape?  Something like:
>
># amadmin CIS no-reuse CIS-008
>(Will Amanda then prompt for a new tape to get back to desired
> number of tapes?  Or do I just load a fresh tape and...)
># amlabel CIS CIS-XXX
>
>Thanks, and sorry again for re-asking.
>
>-Fran

If the header block containing the label can still be read from the 
bad tape, there's an easy way to fix this.

dd if=/dev/tape of=scratch
change tape to the new one
dd if=scratch of=/dev/tape

Make sure you are using the rewinding versions of the tape descriptor 
for the last write.

Now, if an amcheck can read that tape, it should be safe to put it 
back in the rotation in the original tapes sequence.

You can even edit that scratch file with vim if you have to get a 
label from a different tape because that ones really gone, but you 
must not change the length of it.  I've done it several times in 
trying to keep a dds2 system running here,  but like anyone being 
beaten about the brow with a hammer, it feels so good when you stop.

-- 
Cheers, Gene
"There are four boxes to be used in defense of liberty:
 soap, ballot, jury, and ammo. Please use in that order."
-Ed Howdershelt (Author)
99.31% setiathome rank, not too shabby for a WV hillbilly
Yahoo.com attorneys please note, additions to this message
by Gene Heskett are:
Copyright 2004 by Maurice Eugene Heskett, all rights reserved.

<Prev in Thread] Current Thread [Next in Thread>