Bacula-users

Re: [Bacula-users] Tapes not recycling: VolStatus = Error, all job are stalled

2009-04-20 04:44:22
Subject: Re: [Bacula-users] Tapes not recycling: VolStatus = Error, all job are stalled
From: Erik Lucero <erik.lucero AT gmail DOT com>
To: bacula-users AT lists.sourceforge DOT net
Date: Mon, 20 Apr 2009 01:40:34 -0700
Timo,
I think you are onto something. To clear up what happened when I executed the earlier suggestions. I tried updating the status of the volume to Used and then tried pruning. I used "1 day" retention period only as a test to see if anything would change. I have set the default retention period to 1 year. The Prune command did nothing. So I tried to purge the volume and as I wrote earlier Bacula reported the following:
"0 Files on Volume "June08-02" purged from catalog."

The volumes are DDS-4 tapes.

I just updated the status to Append and tried the label command. I mounted the volume and tried labeling the tape. Here is the output from Bacula:

*label
The defined Storage resources are:
     1: File
     2: DDS-4
Select Storage resource (1-2): 2
Enter new Volume name: June08-02
Automatically selected Pool: Default
Connecting to Storage daemon DDS-4 at eraser.physics.ucsb.edu:9103 ...
Sending label command for Volume "June08-02" Slot 0 ...
3934 Device "Sony" (/dev/nst0) is being initialized.
Label command failed for Volume June08-02.
Do not forget to mount the drive!!!
*label
The defined Storage resources are:
     1: File
     2: DDS-4
Select Storage resource (1-2): 2
Enter new Volume name: June08-02
Automatically selected Pool: Default
Connecting to Storage daemon DDS-4 at eraser.physics.ucsb.edu:9103 ...
Sending label command for Volume "June08-02" Slot 0 ...
3934 Device "Sony" (/dev/nst0) is being initialized.
Label command failed for Volume June08-02.
Do not forget to mount the drive!!!
You have messages.
*messages
20-Apr 01:39 eraser-sd JobId 474: Volume "June08-02" previously written, moving to end of data.


Then the tape drive worked on the tape volume for a while and then ejected the tape and Bacula had the following error message:

20-Apr 01:41 eraser-sd JobId 474: Error: Bacula cannot write on tape Volume "June08-02" because:
The number of files mismatch! Volume=26 Catalog=0
20-Apr 01:41 eraser-sd JobId 474: Marking Volume "June08-02" in Error in Catalog.

So it looks like the offending volume has a previous media ID of 26 from an old catalog (I am taking over the backup administration for our research group and I am always discovering relics from the old sys-admin). In my current pool this volume has an ID of 42.

When I try to use the "relabel" command Bacula says:
Volume "June08-02" has VolStatus Append. It must be Purged or Recycled before relabeling.

Which takes us full circle back to my original question, how can recycle this volume?

Thanks again everyone for your insight and suggestions.


On Mon, Apr 20, 2009 at 12:48 AM, Timo Neuvonen <timo-news AT tee-en DOT net> wrote:
>> I successfully set the volume status to "Used" and then tried to prune
>> the
>> offending volume. Bacula asked if I wanted to modify the retention
>> period,
>> which is currently set to be 1 year. I chose yes and tried setting it to
>> 1
>> day. Then I "list volumes" and the volume still has the same retention
>> period in the pool (1 year).
>>
> Not sure of that. In 5 years of using bacula with over 200 tapes in
> use I have never changed the retention period when I modifyied the
> volume status. However I would never use only 1 day retention.
>
>> Next I tried to purge the volume and Bacula reponds with:
>> "0 Files on Volume "June08-02" purged from catalog."
>> I should also mention that originally the volumes showing up as an error
>> were added to the pool using "add" rather than label.
>> Any other ideas or suggestions I can try?
>
> These were the correct suggestions so what happened?
>

I may have missed a point here, but this is how I see this:

The volumes were "add"ed to the pool but never "label"ed, if there is no
autolabel enabled, the volumes do not actually exist yet anywhere but in the
catalog?

Are they supposed to be tape or disk volumes? My guess is disk?

Then, when trying to write into nonexistent volume, without autolabel
enabled, the volume status is set to "error". The purge procedure described
above was formally correct, and it reports "0 files purged". What else could
it do, if the volume (that doesn't even exist) was never written into, and
thus had no files in it? Ok, maybe the volume status should have been
changed, and in this special situation there may really exist a "feature"
that could be considered as a bug (I guess I've run into this also
sometimes, but never investigated it any more) of not changing the status.
IMHO, after running the purge command, the volume status should get set to
"purged" though there actually were nothing to purge. Or what do The Bacula
Gurus say about it?

So, if I didn't miss something important, I would recommend updating the
volume status to "append" and labeling the volume, and trying again. An not
to forget reset the retention period to something more decent than the
currenbt value of 1 day.

--
TiN



------------------------------------------------------------------------------
Stay on top of everything new and different, both inside and
around Java (TM) technology - register by April 22, and save
$200 on the JavaOne (SM) conference, June 2-5, 2009, San Francisco.
300 plus technical and hands-on sessions. Register today.
Use priority code J9JMT32. http://p.sf.net/sfu/p
_______________________________________________
Bacula-users mailing list
Bacula-users AT lists.sourceforge DOT net
https://lists.sourceforge.net/lists/listinfo/bacula-users

------------------------------------------------------------------------------
Stay on top of everything new and different, both inside and 
around Java (TM) technology - register by April 22, and save
$200 on the JavaOne (SM) conference, June 2-5, 2009, San Francisco.
300 plus technical and hands-on sessions. Register today. 
Use priority code J9JMT32. http://p.sf.net/sfu/p
_______________________________________________
Bacula-users mailing list
Bacula-users AT lists.sourceforge DOT net
https://lists.sourceforge.net/lists/listinfo/bacula-users