[EMAIL PROTECTED] wrote:
On Sun, Mar 04, 2007 at 10:28:29PM +0100, Arno Lehmann wrote:
On 3/3/2007 12:24 PM, Christoph Litauer wrote:
a few of my autochanger tapes have VolStatus: Error. This is because the
number of files in the catalogue didn't match the number of files on the
tape. I don't know why this happend, is it a known bug of version 1.38.9?
Not a known bug, I think.

I'm also seeing this using Bacula 2.0.1 on RHEL-4 with a jukebox
holding two LTO-3 drives.  It's an intermittent problem that I haven't
been able to reproduce reliably, so I haven't opened a bug report on
it yet.

Usually these errors happen in two situations:

Let me add a third: when a job terminates with a "Fatal" error (those
with a job status code of 'f'), rather than the more common "Error"
error (those with a job status of 'E').

Here's my situation: I'm backing up both servers and laptops using the
same hardware and software, but with different tape pools.  The
servers never encounter this failure condition; it happens to the
laptops about once every week or two.

After watching the situation for a while, it seems that the failure
pattern is that these file mismatch errors always occur after a fatal
client error, which in turn is caused when a job begins, writes some
data to tape, and is then unable to continue because the client
machine has been shut down or taken off the network.

When the tape is not properly "finished" by Bacula, for example because of a catalog, SD or DIR crash, or when you restart your Bacula server while jobs are running. Also, when the tape fills and the final EOF can't be written to tape that might cause this state.

The other possibility is an improper setting of the device parameters. These would be detected by btapes 'test' command most of the time.

When you change these settings and continue to use tapes started with different settings I *guess* the file count mismatch could happen, too.

Nevertheless: I need to reuse these errored tapes. Are they
automatically reused after alle jobs are purged? Is an errored tape
still used in recovers? How can I list all jobs on an errored tape?
Most important things first: You can use the query command to list all jobs on any volume.

These tapes are not automaticall reused (recycled), and as far as I know they are also not used for restores.

For restores, they should be useable, I've encountered that problem a while ago. The trick is to use the mt and dd command, to copy over the info from the bad tape to another and skip the missing files. With the help from this mailling list, here's what I did:

***************

Got it!

I did what you suggested. I took a blank tape and dd onto it the files I was interested in. Here's what I exactly did on the command line, then I'll explain:

----------
# Device /dev/nst0 -> Original Tape
# Device /dev/nst2 -> Blank Tape

mt -f /dev/nst0 rewind
mt -f /dev/nst2 rewind
dd if=/dev/nst0 bs=64512 of=/dev/nst2 # Copy of file 0
dd if=/dev/nst0 bs=64512 of=/dev/nst2 # Copy of file 1
dd if=/dev/nst0 bs=64512 of=/dev/nst2 # Copy of file 2
mt -f /dev/nst0 rewind
mt -f /dev/nst0 fsf 208
dd if=/dev/nst0 bs=64512 of=/dev/nst2 # Copy of file 208
dd if=/dev/nst0 bs=64512 of=/dev/nst2 # Copy of file 209
dd if=/dev/nst0 bs=64512 of=/dev/nst2 # Copy of file 210
dd if=/dev/nst0 bs=64512 of=/dev/nst2 # Copy of file 211
dd if=/dev/nst0 bs=64512 of=/dev/nst2 # Copy of file 212
dd if=/dev/nst0 bs=64512 of=/dev/nst2 # Copy of file 213
mt -f /dev/nst2 rewind
bls -v -V "GKN079" AutoLoader > /tmp/files

----------

I had to copy the first file (at least), but to make sure I copied the first 3, which contained the bacula label. Then using the mt command I positioned the tape to file 208 and using the dd command I copied files 208 through 213. I ran the bls command to view the contents, and everything was there. I also successfully restored the files I needed and their integrity checked out.

BTW how did you know to use the "bs=64512" option with the dd command? Where did you get the 64512 size from?

BTW thanks for the help Martin.

**************


If the error is only at the end of the tape data (which would be the most usual situation) you can simply update their status to used and they will be used for restores and recycling. If you're unsure, compare the output of bls with what the catalog tells you.

In the job reports for these tapes, you should usually find when this error occured. Most of the time, I find that when a tape is freshly loaded and positioned to the end of data, Baculas sanity checking finds the problem and marks the tape to be erroneous.

In these cases, I think it's safe to set the status to 'Used'.

If you encounter these problems regularly, I'd assume your setup is somehow malfunctioning. If, like I do, you run lots of tests of beta versions, or have hardware-related problems, you'll find many of these errors but they won't mean anything unexpected :-)

Arno


Thanks a lot in advance!

--
IT-Service Lehmann                    [EMAIL PROTECTED]
Arno Lehmann                  http://www.its-lehmann.de

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Bacula-users mailing list
Bacula-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Bacula-users mailing list
Bacula-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users

begin:vcard
fn;quoted-printable:Emery Gu=C3=A9vremont
n;quoted-printable:Gu=C3=A9vremont;Emery
org:Croesus Finansoft
adr:;;2 Place laval, Suite 510;Laval;PQ;H7N 5N6;Canada
email;internet:[EMAIL PROTECTED]
title;quoted-printable:Administrateur des syst=C3=A8mes
tel;work:450-662-6101
tel;cell:514-513-3416
x-mozilla-html:FALSE
version:2.1
end:vcard

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Bacula-users mailing list
Bacula-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users

Reply via email to