What version of Bacula (btape) are you using? There was a logic error in btape that stopped reading after a certain number of bytes, because the first versions never expected to have a different block size. It seems to me that I fixed that long ago though.
Best regards, Kern On 09/17/2013 03:53 PM, Andreas Koch wrote: > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > Hello Kern, > > the problem is not so much the risk of errors, but that btape (and > correspondingly, Bacula) fails even the simplest of readback tests with > block sizes above 128KB. dd works perfectly well with multi-megabyte blocks, > both reading and writing. > > Here's the info I previously collected: > > btape cannot reliably handle anything larger than 128 KB (fails on reading, > see below). > > However, when I read (using dd) the tape that btape supposedly has written > _two_ files of 10000 blocks each (and then fails after reading 3616 of > them!), dd reads read _each_ of btape-written 10000-block ``files'' as > _three_ separate actual tape files (of 3616+3616+2768=10000 blocks). Note > that this specific test was performed with a block size of 512KB (see Device > definition from bacula-sd.conf, below). > > So, this might actually be a Bacula-specific problem after all. We see this > behavior consistently on two different HP LTO-5 drives, on two different SAS > HBAs (one using mpt2sas as driver, the other one with mvsas), and using two > different SAS cables. > > If you need additional info, please let me know how to proceed. > > Many thanks in advance, > Andreas > > > *** TRY BTAPE TEST, WILL FAIL ON READBACK > > gundabad ~ # btape -c /etc/bacula/bacula-sd.conf /dev/nst0 > Tape block granularity is 1024 bytes. > btape: butil.c:290 Using device: "/dev/nst0" for writing. > btape: btape.c:477 open device "LTO-4" (/dev/nst0): OK > *test > > === Write, rewind, and re-read test === > > I'm going to write 10000 records and an EOF > then write 10000 records and an EOF, then rewind, > and re-read the data to verify that it is correct. > > This is an *essential* feature ... > > btape: btape.c:1157 Wrote 10000 blocks of 524188 bytes. > btape: btape.c:609 Wrote 1 EOF to "LTO-4" (/dev/nst0) > btape: btape.c:1173 Wrote 10000 blocks of 524188 bytes. > btape: btape.c:609 Wrote 1 EOF to "LTO-4" (/dev/nst0) > btape: btape.c:1215 Rewind OK. > Got EOF on tape. > btape: btape.c:1233 Read block 3617 failed! ERR=Success > *q > btape: smartall.c:404 Orphaned buffer: btape 280 bytes at 15e55e8 from > jcr.c:362 > > *** NOW READ BTAPE-WRITTEN TAPE USING DD > > gundabad ~ # mt -f /dev/nst0 rewind > gundabad ~ # dd if=/dev/nst0 of=/dev/null bs=512k > 3616+0 records in > 3616+0 records out > 1895825408 bytes (1.9 GB) copied, 3.7062 s, 512 MB/s > gundabad ~ # dd if=/dev/nst0 of=/dev/null bs=512k > 3616+0 records in > 3616+0 records out > 1895825408 bytes (1.9 GB) copied, 3.7542 s, 505 MB/s > gundabad ~ # dd if=/dev/nst0 of=/dev/null bs=512k > 2768+0 records in > 2768+0 records out > 1451229184 bytes (1.5 GB) copied, 2.88829 s, 502 MB/s > gundabad ~ # dd if=/dev/nst0 of=/dev/null bs=512k > 3616+0 records in > 3616+0 records out > 1895825408 bytes (1.9 GB) copied, 3.75554 s, 505 MB/s > gundabad ~ # dd if=/dev/nst0 of=/dev/null bs=512k > 3616+0 records in > 3616+0 records out > 1895825408 bytes (1.9 GB) copied, 3.75338 s, 505 MB/s > gundabad ~ # dd if=/dev/nst0 of=/dev/null bs=512k > 2768+0 records in > 2768+0 records out > 1451229184 bytes (1.5 GB) copied, 2.88846 s, 502 MB/s > gundabad ~ # dd if=/dev/nst0 of=/dev/null bs=512k > 0+0 records in > 0+0 records out > 0 bytes (0 B) copied, 0.247548 s, 0.0 kB/s > > -----BEGIN PGP SIGNATURE----- > Version: GnuPG v1.4.14 (GNU/Linux) > Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ > > iEYEARECAAYFAlI4XrkACgkQk5ta2EV7Dox5qQCeIAL+9E6K9w0L7gL2KIXCsRDZ > mQ8AnAknUMOWpCpV8Vw2ZBMYRZ0JQ6IM > =E1lA > -----END PGP SIGNATURE----- > ------------------------------------------------------------------------------ LIMITED TIME SALE - Full Year of Microsoft Training For Just $49.99! 1,500+ hours of tutorials including VisualStudio 2012, Windows 8, SharePoint 2013, SQL 2012, MVC 4, more. BEST VALUE: New Multi-Library Power Pack includes Mobile, Cloud, Java, and UX Design. Lowest price ever! Ends 9/20/13. http://pubads.g.doubleclick.net/gampad/clk?id=58041151&iu=/4140/ostg.clktrk _______________________________________________ Bacula-users mailing list Bacula-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bacula-users