On Mon, 2005-09-26 at 13:19 +0200, Arno Lehmann wrote: > Hello, > > On 26.09.2005 11:45, Erik P. Olsen wrote: > ... > >>>First of all I like to understand what bacula is trying to tell me with > >>>these messages. Secondly can a wrong tape (not a bacula volume) cause > >>>this sort of errors and are the volumes which bacula would not accept > >>>now unusable for bacula forever? > >> > >>With a proper tape drive, it's rather hard to render a tape definitely > >>unusable.* > > > > I meant unusable for restores. I am sure the tape i physically OK: > > > >>I suspect that the tapes you insert are either not labeled by bacula or > >>you changed your tape block size settings in between. > > > > Maybe, but not by me. > > > >>In both cases, the easiest solution is to use the label command on them. > > > > Yes, but then the contents are gone. I suspect that somewhere bacula has > > recorded the volume as being in error and therefore will not use it. Can > > that happen? > > It can happen, it does happen, but then the label is still on the tape, > bacula reads it, and reports that it won't use taht tape pecause it's > marked as being in error. By the way - you can also list the tapes and > their states as recorded in the catalog. > > >>If you are absolutely sure that they contain a bacula label, the program > >>btape is a good first start to find out what is wrong with the tapes, > >>although, in your case, he output you give above shows clearly that > >>bacula can't read a volume label off the tapes. > >> > >>In this case, I have used dd and od with good results - something like > >>'dd if=/dev/nst0 count=1 bs=65536 | od -t x1c' and playing with block > >>sizes sometimes helped my find the block size on that tape. > > > > I'll check that and come back with what I find. I don't know the format > > of the bacula label but I assume it is the first file on the tape. > > Right. Usually, it looks something like this (without "x" output from od): > > > dd if=/media/extdvdrecorder/DVD-0005 bs=4k count=1 | od -t c > > 1+0 records in > > 1+0 records out > > 0000000 O 255 330 260 \0 \0 \0 274 \0 \0 \0 \0 B B 0 2 > "Magic" label is BB02 > > 0000020 \0 \0 \0 004 C 4 372 274 377 377 377 376 \0 \0 \0 001 > > 0000040 \0 \0 \0 230 B a c u l a 1 . 0 i > > 0000060 m m o r t a l \n \0 \0 \0 \0 \v \0 004 001 > "Bacula 1.0 immortal" - textual tape label type and version > > 0000100 223 274 ( 247 5 \0 004 001 223 274 ) 305 342 \0 \0 \0 > > 0000120 \0 \0 \0 \0 \0 \0 \0 \0 \0 \0 \0 \0 \0 D V D > > 0000140 - 0 0 0 5 \0 \0 T e s t D V D \0 B > > 0000160 a c k u p \0 D V D \0 e l f \0 e l > > 0000200 f - s d \0 V e r . 1 . 3 7 . 3 > Volume name, pool, type etc. - you recognize these, usually. > > 0000220 7 2 4 A u g u s t 2 0 0 5 > > 0000240 \0 B u i l d S e p 2 2 0 > > 0000260 0 5 1 3 : 0 1 : 1 0 \0 \n 346 341 220 > > 0000300 \0 \0 374 \0 \0 \0 ! 227 B B 0 2 \0 \0 \0 004 > > 0000320 C 4 372 274 \0 \0 \0 ( 377 377 377 376 \0 \0 ) > > 0000340 h A A C 033 3 w + E 2 n Z w > > 0000360 O 5 / Q k h + W n 7 N d Z D / d > > 0000400 J y K \0 \t \0 P 034 g O I G k B > > If something like that is *not* on your tape's first block, you are in > trouble... Now, I've had a case where bacula itself overwrote the tape > label with data blocks (I helped a lot, though...;-), but apart from > that time I never had a backup volume damaged by bacula.
Reading first block showed: 0000000 002 272 241 270 \0 \0 \0 277 \0 \0 \0 \0 B B 0 2 0000020 \0 \0 \0 001 C . x \n 377 377 377 376 \0 \0 \0 \0 0000040 \0 \0 \0 233 B a c u l a 1 . 0 i 0000060 m m o r t a l \n \0 \0 \0 \0 \v \0 004 001 0000100 033 310 354 026 334 \0 004 001 033 320 343 p 321 \0 \0 \0 0000120 \0 \0 \0 \0 \0 \0 \0 \0 \0 \0 \0 \0 \0 B a c 0000140 u l a 0 2 \0 \0 D e f a u l t \0 B 0000160 a c k u p \0 D D S - 4 \0 e p o . 0000200 d k \0 e p o - s d \0 V e r . 1 0000220 . 3 6 . 3 2 2 A p r i l 2 0000240 0 0 5 \0 B u i l d S e p 1 2 0000260 2 0 0 5 0 0 : 0 9 : 5 2 \0 \0 0000300 \0 \0 \0 \0 \0 \0 \0 \0 \0 \0 \0 \0 \0 \0 \0 \0 So the volume _is_ OK. Next challenge, how do I find and remove the error flag from the catalog? > > By the way - the data blocks are similarly easy to recognize, so you can > see if you can identify bacula data on the tapes at all. If it all looks > like random data it probably is random data, i.e. what you read with a > broken drive or off an unused tape... > > Keep in mind that dd | od is only what I'd call a last resort - btape is > better suited to inspect tapes, but it only gives useful results when it > can recognize the block headers, while finding them is easier for humans :-) > > >>Arno > >> > >>* Proper tape drive means "everything except DDS" :-) No worries, that > >>was partly a joke. > > > > The part which is not a joke worries me nevertheless. About a year ago I > > had a head crash at the same time as my tape drive decided to brake > > down. In order to recover the system I had to buy a new drive to read my > > backup tapes, so I am stuck with a fairly new tape drive that I wish was > > of another type :( > > Then you understand why I'm rather sure that, if your tapes are > unreadable, it's not baculas fault but a broken tape or tape drive... Oh, I am fairly sure that both tapes and drive are OK. -- Regards, Erik P. Olsen ------------------------------------------------------- SF.Net email is sponsored by: Tame your development challenges with Apache's Geronimo App Server. Download it for free - -and be entered to win a 42" plasma tv or your very own Sony(tm)PSP. Click here to play: http://sourceforge.net/geronimo.php _______________________________________________ Bacula-users mailing list Bacula-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bacula-users