vom513 <vom...@gmail.com> writes: > I have been messing around with some tape drives on NetBSD. The one in > question now is a bit older (Sun branded HP DDS4) - but it was new old stock > right out of the factory box. It’s been cleaned as well. > > So under NetBSD - I can write to tape seemingly just fine. Reading back > (extracting) however goes south immediately. Using the stock tar I get > “damaged archive” and it gives up soon after starting the operation. > > I saw some old message of someone on FreeBSD having (what I thought > was) a similar issue to me - and they used GNU tar to work around > this. I built gtar from pkgsrc, but it fails in basically the same > way (albeit with a different “skipping to next header” type error). > > I put this same tape drive on an x86 PC running Debian Linux 12 and I get no > errors at all. It behaves exactly as I would expect. > > Is there something in NetBSD that precludes me from using this hardware > properly ?
(beware this is a little fuzzy) * With tapes, the size of a write leads to a block size on the tape. Unlike files, tapes have blocks written. If you read, and you read less, I think the rest of the block is lost. Therefore, you need a plan for a blocksize, and to always write that size, and always read it. * Because of the above, you need a program that will accumulate data and then write in the proper blocksize. * To avoid stop/start, you really want to have data in a buffer which can be filled faster than write speed. See Amanda, which does dumps to holding disk and then streams to tape, as an example. You left out of your message: the dmesg lines from the tape the command you ran to write the command you ran to read, and the error output