Amanda-Users

Re: Changing the label of an Amanda tape

2007-07-11 12:40:52
Subject: Re: Changing the label of an Amanda tape
From: Chris Hoogendyk <hoogendyk AT bio.umass DOT edu>
To: Craig Dewick <cdewick AT lios.apana.org DOT au>
Date: Wed, 11 Jul 2007 12:31:06 -0400


Craig Dewick wrote:
On Tue, 3 Jul 2007, Marc Muehlfeld wrote:

Yogesh Hasabnis schrieb:
For that, when I use
the amlabel command to change the tape label and
configuration, I get a message as follows: "tape is in another amanda configuration
rewinding tape not labeled"

amlabel -f {Setname}

In my case (just recently reconfigued my rack entirely and have set up the L9 array again), Amanda is reporting 'changer problem: no slots available (expecting a new tape).

Last time that happened I actually got a fresh set of tapes since the old ones did need to be replaced anyway, but this time I'd like to use some of the old ones again so that the batch of tapes I keep aside is properly cycled (not just with the ones in the array itself).

Is there a way to convince Amanda that it's ok to re-use tapes with existing labels written onto them or is the only way to get around this to either 'scramble' the data with something else writing to the tapes then re-labelling, or replace the old tapes with brand new ones (using different tape names when writing the labels?)?

The other way might be to reconfigure Amanda so that the only tapes it knows about are the ones in the array without telling it there are other tapes stored off-array that I'd be manually putting in the carrier at regular intervals as a 'batch swap'. What's the general consensus on this theory?


It's best to maintain consistency in all the information amanda has about tapes and backups.

I have about twice as many tapes in my regular rotation as my tape library holds. I periodically swap out a batch of tapes from the library and cycle in the ones that will be coming up soon. I do all that from the console of the library. Then I run `amtape daily update`, which both tells me what I have in the library now and also updates amanda's information.

If you have tapes from another configuration of amanda that has been decommissioned and is obsolete, then relabel the tapes. It takes a bit of effort, but it is best that you do it yourself and know exactly what has been done. I don't like the idea of some other backup software that automatically relabels tapes.

In my case, I would do `amtape daily slot 10` and then `amtape daily current` to see exactly what I have loaded from slot 10. Once I was sure, then I would do `amlabel daily bio-daily-025`. If it was already an amanda label, and you were sure you wanted to re-use it, then you could use the "-f" on amlabel. Alternatively, you could do `mt erase` first (or `mt -f /dev/rmt/1n`, or whatever).

I had an instance where the tapedrive barfed on the writing of the tape the night before (first time for that). The dump results were left on the holding disk. After running the cleaning tape that the library requested, I loaded the tape. Amanda said it was not an amanda tape. I knew I wasn't losing any data from it, because amanda had been about to overwrite it. However, just to keep things totally clean, I did `amrmtape daily bio-daily-025`, followed by `amlabel daily bio-daily-025`, to re-create the labeled tape. Then I ran `amflush daily` and I was right where I should have been at that point.

All of that is just to say, keep amanda's databases informed and consistent.


---------------

Chris Hoogendyk

-
  O__  ---- Systems Administrator
 c/ /'_ --- Biology & Geology Departments
(*) \(*) -- 140 Morrill Science Center
~~~~~~~~~~ - University of Massachusetts, Amherst
<hoogendyk AT bio.umass DOT edu>

---------------
Erdös 4