Bacula-users

Re: [Bacula-users] Bacula loses tape label?

2009-03-09 17:19:57
Subject: Re: [Bacula-users] Bacula loses tape label?
From: "Robert LeBlanc" <robert AT leblancnet DOT us>
To: "Robert LeBlanc" <robert AT leblancnet DOT us>, <Bacula-users AT lists.sourceforge DOT net>
Date: Mon, 9 Mar 2009 15:11:10 -0600

So it seems this is related to the library losing power and during the start-up it rewind the tape. Bacula then happily writes to the tape without knowing that it is not at the end of the data. To have bacula always check would be a pain because the best I can come up with is to rewind the tape and then forward to the end. To have that happen at every job would be a nightmare. Unfortunately I couldn’t find a way for the LTO drive to report which file it was positioned at, that sure would be helpful in this case.

 

It also seems that LTO keeps the last file record on the chip in the cartridge, so even if the bits are intact on the tape, the drive refuses to read them. Also when bcopy is run, it can’t find the Volume tag so it dies without trying to read anything. Although I could use btape and issue the scanblocks command it would read all the Bacula blocks on the tape. This makes me very confused about what exactly Bacula can and can’t read off the tape.

 

If anyone has any other ideas I can try, I’d like to hear them. Otherwise, I guess I’ll have to just recycle the volumes and hope that they didn’t need the data on the tapes.

 

Robert LeBlanc

Life Sciences Computer Support

Brigham Young University

leblanc AT byu DOT edu

(801)422-1882

 

From: Robert LeBlanc
Sent: Saturday, March 07, 2009 10:25 PM
To: Bacula-users AT lists.sourceforge DOT net
Subject: [Bacula-users] Bacula loses tape label?

 

I’ve and my third instance now where Bacula has lost the tape label. This seems to happen after a power outage (our tape library goes out, but the server is on UPS). What is really interesting is that when the power goes out, nothing is writing to the tape, but the tape is usually in the drive at the end of the data. When Bacula goes to write to the tape again, it tells me to insert the volume that is in the drive or label a new tape. I would just write a new label to it, but my understanding is that it also writes an EoF basically blanking the tape and losing all the data on it. Can someone give me an idea of how to get the data off or relabel the tape so that none of the data is lost? These are LTO4 tape and only using 100 GB or so; we are going to run through the tapes too fast if I just have to mark them as used. I’m also worried that I won’t be able to restore any data off them since the label can not be read. Here are the btape commands to read the labels from two of the tapes; I can’t remember the third tape that showed the problem.

 

Thanks,

Robert

 

btape: butil.c:285 Using device: "/dev/tape/drive2" for writing.

07-Mar 22:12 btape JobId 0: 3301 Issuing autochanger "loaded? drive 2" command.

07-Mar 22:12 btape JobId 0: 3302 Autochanger "loaded? drive 2", result is Slot 101.

btape: btape.c:372 open device "Drive-2" (/dev/tape/drive2): OK

*readlabel

btape: btape.c:422 Volume has no label.

 

Volume Label:

Id                : **error**VerNo             : 0

VolName           :

PrevVolName       :

VolFile           : 0

LabelType         : Unknown 0

LabelSize         : 0

PoolName          :

MediaType         :

PoolType          :

HostName          :

Date label written: -4712-01-01 at 00:00

*q

lsgw0:/home/leblanc# btape /dev/tape/drive2

Tape block granularity is 1024 bytes.

btape: butil.c:285 Using device: "/dev/tape/drive2" for writing.

07-Mar 22:22 btape JobId 0: 3301 Issuing autochanger "loaded? drive 2" command.

07-Mar 22:22 btape JobId 0: 3302 Autochanger "loaded? drive 2", result is Slot 105.

btape: btape.c:372 open device "Drive-2" (/dev/tape/drive2): OK

*readlabel

btape: btape.c:422 Volume has no label.

 

Volume Label:

Id                : **error**VerNo             : 0

VolName           :

PrevVolName       :

VolFile           : 0

LabelType         : Unknown 0

LabelSize         : 0

PoolName          :

MediaType         :

PoolType          :

HostName          :

Date label written: -4712-01-01 at 00:00

*

------------------------------------------------------------------------------
Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
-OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
-Strategies to boost innovation and cut costs with open source participation
-Receive a $600 discount off the registration fee with the source code: SFAD
http://p.sf.net/sfu/XcvMzF8H
_______________________________________________
Bacula-users mailing list
Bacula-users AT lists.sourceforge DOT net
https://lists.sourceforge.net/lists/listinfo/bacula-users
<Prev in Thread] Current Thread [Next in Thread>