Dear misc@, Have been using OpenBSD with Bacula (and LTO-4 tapes) with great success for many years.
Our bacula server just got upgraded to a Dell PowerEdge R420 with one LTO-5 tape unit. This server is running OpenBSD 5.6-stable. The problem is that bacula's btape(8) keeps giving me a "Reposition error" -- I have tried many different parameters, including "Use MTIOCGET= no", etc. (please see below the btape output) Anyone using OpenBSD, Bacula and LTO-5 units? Thanks! --Kor hw.vendor=Dell Inc. hw.product=PowerEdge R420 # dmesg | grep st0 st0 at scsibus5 targ 9 lun 0: <IBM, ULTRIUM-HH5, D2A1> SCSI4 1/sequential removable naa.50050763120e22e0 ======================================================================== /etc/bacula/bacula-sd.conf Device { Name = LTO-5 Media Type = LTO-5 Archive Device = /dev/nrst0 } ------------------------------------------------------------------------ # btape -c bacula-sd.conf /dev/nrst0 [142/1036] Tape block granularity is 1024 bytes. btape: butil.c:287-0 Using device: "/dev/nrst0" for writing. btape: btape.c:469-0 open device "LTO-5" (/dev/nrst0): 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:1153-0 Wrote 10000 blocks of 64412 bytes. btape: btape.c:604-0 Wrote 1 EOF to "LTO-5" (/dev/nrst0) btape: btape.c:1169-0 Wrote 10000 blocks of 64412 bytes. btape: btape.c:604-0 Wrote 1 EOF to "LTO-5" (/dev/nrst0) btape: btape.c:1211-0 Rewind OK. 10000 blocks re-read correctly. 10000 blocks re-read correctly. === Test Succeeded. End Write, rewind, and re-read test === btape: btape.c:1279-0 Block position test btape: btape.c:1291-0 Rewind OK. Reposition to file:block 0:4 Block 5 re-read correctly. Reposition to file:block 0:200 Block 201 re-read correctly. Reposition to file:block 0:9999 Block 10000 re-read correctly. Reposition to file:block 1:0 Block 10001 re-read correctly. Reposition to file:block 1:600 Block 10601 re-read correctly. Reposition to file:block 1:9999 Block 20000 re-read correctly. === Test Succeeded. End Write, rewind, and re-read test === === Append files test === This test is essential to Bacula. I'm going to write one record in file 0, two records in file 1, and three records in file 2 btape: btape.c:574-0 Rewound "LTO-5" (/dev/nrst0) btape: btape.c:1910-0 Wrote one record of 64412 bytes. btape: btape.c:1912-0 Wrote block to device. btape: btape.c:604-0 Wrote 1 EOF to "LTO-5" (/dev/nrst0) btape: btape.c:1910-0 Wrote one record of 64412 bytes. btape: btape.c:1912-0 Wrote block to device. btape: btape.c:1910-0 Wrote one record of 64412 bytes. btape: btape.c:1912-0 Wrote block to device. btape: btape.c:604-0 Wrote 1 EOF to "LTO-5" (/dev/nrst0) btape: btape.c:1910-0 Wrote one record of 64412 bytes. btape: btape.c:1912-0 Wrote block to device. btape: btape.c:1910-0 Wrote one record of 64412 bytes. btape: btape.c:1912-0 Wrote block to device. btape: btape.c:1910-0 Wrote one record of 64412 bytes. btape: btape.c:1912-0 Wrote block to device. btape: btape.c:604-0 Wrote 1 EOF to "LTO-5" (/dev/nrst0) btape: btape.c:469-0 open device "LTO-5" (/dev/nrst0): OK btape: btape.c:574-0 Rewound "LTO-5" (/dev/nrst0) btape: btape.c:1423-0 Now moving to end of medium. btape: btape.c:625-0 Moved to end of medium. We should be in file 3. I am at file 4. This is NOT correct!!!! Append test failed. Attempting again. Setting "Hardware End of Medium = no and "Fast Forward Space File = no and retrying append test. === Append files test === This test is essential to Bacula. I'm going to write one record in file 0, two records in file 1, and three records in file 2 btape: btape.c:574-0 Rewound "LTO-5" (/dev/nrst0) btape: btape.c:1910-0 Wrote one record of 64412 bytes. btape: btape.c:1912-0 Wrote block to device. btape: btape.c:604-0 Wrote 1 EOF to "LTO-5" (/dev/nrst0) btape: btape.c:1910-0 Wrote one record of 64412 bytes. btape: btape.c:1912-0 Wrote block to device. btape: btape.c:1910-0 Wrote one record of 64412 bytes. btape: btape.c:1912-0 Wrote block to device. btape: btape.c:604-0 Wrote 1 EOF to "LTO-5" (/dev/nrst0) btape: btape.c:1910-0 Wrote one record of 64412 bytes. btape: btape.c:1912-0 Wrote block to device. btape: btape.c:1910-0 Wrote one record of 64412 bytes. btape: btape.c:1912-0 Wrote block to device. btape: btape.c:1910-0 Wrote one record of 64412 bytes. btape: btape.c:1912-0 Wrote block to device. btape: btape.c:604-0 Wrote 1 EOF to "LTO-5" (/dev/nrst0) btape: btape.c:469-0 open device "LTO-5" (/dev/nrst0): OK btape: btape.c:574-0 Rewound "LTO-5" (/dev/nrst0) btape: btape.c:1423-0 Now moving to end of medium. btape: btape.c:622-0 tape_dev.c:614 read error on "LTO-5" (/dev/nrst0). ERR=Input/output error. We should be in file 3. I am at file 3. This is correct! Now the important part, I am going to attempt to append to the tape. btape: btape.c:1910-0 Wrote one record of 64412 bytes. btape: btape.c:1912-0 Wrote block to device. btape: btape.c:604-0 Wrote 1 EOF to "LTO-5" (/dev/nrst0) btape: btape.c:574-0 Rewound "LTO-5" (/dev/nrst0) Done appending, there should be no I/O errors Doing Bacula scan of blocks: 03-Mar 11:35 btape JobId 0: Error: block.c:429 Read error on fd=3 at file:blk 0:7 on device "LTO-5" (/dev/nrst0). ERR=Input/output error. Error reading block. ERR=block.c:429 Read error on fd=3 at file:blk 0:7 on device "LTO-5" (/dev/nrst0). ERR=Input/output error. Total files=0, blocks=7, bytes = 451,136 End scanning the tape. We should be in file 4. I am at file 0. This is NOT correct!!!! It looks like the append failed. Attempting again. Setting "BSF at EOM = yes" and retrying append test. === Append files test === This test is essential to Bacula. I'm going to write one record in file 0, two records in file 1, and three records in file 2 btape: btape.c:574-0 Rewound "LTO-5" (/dev/nrst0) btape: btape.c:1910-0 Wrote one record of 64412 bytes. btape: btape.c:1912-0 Wrote block to device. btape: btape.c:604-0 Wrote 1 EOF to "LTO-5" (/dev/nrst0) btape: btape.c:1910-0 Wrote one record of 64412 bytes. btape: btape.c:1912-0 Wrote block to device. btape: btape.c:1910-0 Wrote one record of 64412 bytes. btape: btape.c:1912-0 Wrote block to device. btape: btape.c:604-0 Wrote 1 EOF to "LTO-5" (/dev/nrst0) btape: btape.c:1910-0 Wrote one record of 64412 bytes. btape: btape.c:1912-0 Wrote block to device. btape: btape.c:1910-0 Wrote one record of 64412 bytes. btape: btape.c:1912-0 Wrote block to device. btape: btape.c:1910-0 Wrote one record of 64412 bytes. btape: btape.c:1912-0 Wrote block to device. btape: btape.c:604-0 Wrote 1 EOF to "LTO-5" (/dev/nrst0) btape: btape.c:469-0 open device "LTO-5" (/dev/nrst0): OK btape: btape.c:574-0 Rewound "LTO-5" (/dev/nrst0) btape: btape.c:1423-0 Now moving to end of medium. btape: btape.c:622-0 tape_dev.c:614 read error on "LTO-5" (/dev/nrst0). ERR=Input/output error. We should be in file 3. I am at file 3. This is correct! Now the important part, I am going to attempt to append to the tape. btape: btape.c:1910-0 Wrote one record of 64412 bytes. btape: btape.c:1912-0 Wrote block to device. btape: btape.c:604-0 Wrote 1 EOF to "LTO-5" (/dev/nrst0) btape: btape.c:574-0 Rewound "LTO-5" (/dev/nrst0) Done appending, there should be no I/O errors Doing Bacula scan of blocks: 03-Mar 11:35 btape JobId 0: Error: block.c:429 Read error on fd=3 at file:blk 0:7 on device "LTO-5" (/dev/nrst0). ERR=Input/output error. Error reading block. ERR=block.c:429 Read error on fd=3 at file:blk 0:7 on device "LTO-5" (/dev/nrst0). ERR=Input/output error. Total files=0, blocks=7, bytes = 451,136 End scanning the tape. We should be in file 4. I am at file 0. This is NOT correct!!!! Append test failed. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! Unable to correct the problem. You MUST fix this problem before Bacula can use your tape drive correctly Perhaps running Bacula in fixed block mode will work. Do so by setting: Minimum Block Size = nnn Maximum Block Size = nnn in your Storage daemon's Device definition. nnn must match your tape driver's block size, which can be determined by reading your tape manufacturers information, and the information on your kernel dirver. Fixed block sizes, however, are not normally an ideal solution. Some systems, e.g. OpenBSD, require you to set Use MTIOCGET= no in your device resource. Use with caution. * ======================================================================== /etc/bacula/bacula-sd.conf Device { Name = LTO-5 Media Type = LTO-5 Archive Device = /dev/nrst0 BSF at EOM = yes; } ------------------------------------------------------------------------ # btape -c bacula-sd.conf /dev/nrst0 Tape block granularity is 1024 bytes. btape: butil.c:287-0 Using device: "/dev/nrst0" for writing. btape: btape.c:469-0 open device "LTO-5" (/dev/nrst0): 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:1153-0 Wrote 10000 blocks of 64412 bytes. btape: btape.c:604-0 Wrote 1 EOF to "LTO-5" (/dev/nrst0) btape: btape.c:1169-0 Wrote 10000 blocks of 64412 bytes. btape: btape.c:604-0 Wrote 1 EOF to "LTO-5" (/dev/nrst0) btape: btape.c:1211-0 Rewind OK. 10000 blocks re-read correctly. 10000 blocks re-read correctly. === Test Succeeded. End Write, rewind, and re-read test === btape: btape.c:1279-0 Block position test btape: btape.c:1291-0 Rewind OK. Reposition to file:block 0:4 Block 5 re-read correctly. Reposition to file:block 0:200 Block 201 re-read correctly. Reposition to file:block 0:9999 Block 10000 re-read correctly. Reposition to file:block 1:0 Block 10001 re-read correctly. Reposition to file:block 1:600 Block 10601 re-read correctly. Reposition to file:block 1:9999 Block 20000 re-read correctly. === Test Succeeded. End Write, rewind, and re-read test === === Append files test === This test is essential to Bacula. I'm going to write one record in file 0, two records in file 1, and three records in file 2 btape: btape.c:574-0 Rewound "LTO-5" (/dev/nrst0) btape: btape.c:1910-0 Wrote one record of 64412 bytes. btape: btape.c:1912-0 Wrote block to device. btape: btape.c:604-0 Wrote 1 EOF to "LTO-5" (/dev/nrst0) btape: btape.c:1910-0 Wrote one record of 64412 bytes. btape: btape.c:1912-0 Wrote block to device. btape: btape.c:1910-0 Wrote one record of 64412 bytes. btape: btape.c:1912-0 Wrote block to device. btape: btape.c:604-0 Wrote 1 EOF to "LTO-5" (/dev/nrst0) btape: btape.c:1910-0 Wrote one record of 64412 bytes. btape: btape.c:1912-0 Wrote block to device. btape: btape.c:1910-0 Wrote one record of 64412 bytes. btape: btape.c:1912-0 Wrote block to device. btape: btape.c:1910-0 Wrote one record of 64412 bytes. btape: btape.c:1912-0 Wrote block to device. btape: btape.c:604-0 Wrote 1 EOF to "LTO-5" (/dev/nrst0) btape: btape.c:469-0 open device "LTO-5" (/dev/nrst0): OK btape: btape.c:574-0 Rewound "LTO-5" (/dev/nrst0) btape: btape.c:1423-0 Now moving to end of medium. btape: btape.c:625-0 Moved to end of medium. We should be in file 3. I am at file 3. This is correct! Now the important part, I am going to attempt to append to the tape. btape: btape.c:1910-0 Wrote one record of 64412 bytes. btape: btape.c:1912-0 Wrote block to device. btape: btape.c:604-0 Wrote 1 EOF to "LTO-5" (/dev/nrst0) btape: btape.c:574-0 Rewound "LTO-5" (/dev/nrst0) Done appending, there should be no I/O errors Doing Bacula scan of blocks: 03-Mar 11:41 btape JobId 0: Error: block.c:429 Read error on fd=3 at file:blk 0:7 on device "LTO-5" (/dev/nrst0). ERR=Input/output error. Error reading block. ERR=block.c:429 Read error on fd=3 at file:blk 0:7 on device "LTO-5" (/dev/nrst0). ERR=Input/output error. Total files=0, blocks=7, bytes = 451,136 End scanning the tape. We should be in file 4. I am at file 0. This is NOT correct!!!! The above Bacula scan should have output identical to what follows. Please double check it ... === Sample correct output === 1 block of 64448 bytes in file 1 End of File mark. 2 blocks of 64448 bytes in file 2 End of File mark. 3 blocks of 64448 bytes in file 3 End of File mark. 1 block of 64448 bytes in file 4 End of File mark. Total files=4, blocks=7, bytes = 451,136 === End sample correct output === If the above scan output is not identical to the sample output, you MUST correct the problem or Bacula will not be able to write multiple Jobs to the tape. === Forward space files test === This test is essential to Bacula. I'm going to write five files then test forward spacing btape: btape.c:574-0 Rewound "LTO-5" (/dev/nrst0) btape: btape.c:1910-0 Wrote one record of 64412 bytes. btape: btape.c:1912-0 Wrote block to device. btape: btape.c:604-0 Wrote 1 EOF to "LTO-5" (/dev/nrst0) btape: btape.c:1910-0 Wrote one record of 64412 bytes. btape: btape.c:1912-0 Wrote block to device. btape: btape.c:1910-0 Wrote one record of 64412 bytes. btape: btape.c:1912-0 Wrote block to device. btape: btape.c:604-0 Wrote 1 EOF to "LTO-5" (/dev/nrst0) btape: btape.c:1910-0 Wrote one record of 64412 bytes. btape: btape.c:1912-0 Wrote block to device. btape: btape.c:1910-0 Wrote one record of 64412 bytes. btape: btape.c:1912-0 Wrote block to device. btape: btape.c:1910-0 Wrote one record of 64412 bytes. btape: btape.c:1912-0 Wrote block to device. btape: btape.c:604-0 Wrote 1 EOF to "LTO-5" (/dev/nrst0) btape: btape.c:1910-0 Wrote one record of 64412 bytes. btape: btape.c:1912-0 Wrote block to device. btape: btape.c:1910-0 Wrote one record of 64412 bytes. btape: btape.c:1912-0 Wrote block to device. btape: btape.c:604-0 Wrote 1 EOF to "LTO-5" (/dev/nrst0) btape: btape.c:1910-0 Wrote one record of 64412 bytes. btape: btape.c:1912-0 Wrote block to device. btape: btape.c:604-0 Wrote 1 EOF to "LTO-5" (/dev/nrst0) btape: btape.c:574-0 Rewound "LTO-5" (/dev/nrst0) btape: btape.c:1637-0 Now forward spacing 1 file. We should be in file 1. I am at file 1. This is correct! btape: btape.c:1649-0 Now forward spacing 2 files. We should be in file 3. I am at file 3. This is correct! btape: btape.c:574-0 Rewound "LTO-5" (/dev/nrst0) btape: btape.c:1662-0 Now forward spacing 4 files. We should be in file 4. I am at file 4. This is correct! btape: btape.c:1680-0 Now forward spacing 1 more file. We should be in file 5. I am at file 5. This is correct! === End Forward space files test === * ======================================================================== /etc/bacula/bacula-sd.conf Device { Name = LTO-5 Media Type = LTO-5 Archive Device = /dev/nrst0 BSF at EOM = yes; Hardware End of Medium = no; Fast Forward Space File = no; } ------------------------------------------------------------------------ # btape -c bacula-sd.conf /dev/nrst0 Tape block granularity is 1024 bytes. btape: butil.c:287-0 Using device: "/dev/nrst0" for writing. btape: btape.c:469-0 open device "LTO-5" (/dev/nrst0): 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:1153-0 Wrote 10000 blocks of 64412 bytes. btape: btape.c:604-0 Wrote 1 EOF to "LTO-5" (/dev/nrst0) btape: btape.c:1169-0 Wrote 10000 blocks of 64412 bytes. btape: btape.c:604-0 Wrote 1 EOF to "LTO-5" (/dev/nrst0) btape: btape.c:1211-0 Rewind OK. 10000 blocks re-read correctly. 10000 blocks re-read correctly. === Test Succeeded. End Write, rewind, and re-read test === btape: btape.c:1279-0 Block position test btape: btape.c:1291-0 Rewind OK. Reposition to file:block 0:4 Block 5 re-read correctly. Reposition to file:block 0:200 Block 201 re-read correctly. Reposition to file:block 0:9999 Block 10000 re-read correctly. Reposition to file:block 1:0 btape: btape.c:1336-0 Reposition error. * ======================================================================== /etc/bacula/bacula-sd.conf Device { Name = LTO-5 Media Type = LTO-5 Archive Device = /dev/nrst0 BSF at EOM = yes; Hardware End of Medium = yes; Fast Forward Space File = no; } ------------------------------------------------------------------------ # btape -c bacula-sd.conf /dev/nrst0 Tape block granularity is 1024 bytes. btape: butil.c:287-0 Using device: "/dev/nrst0" for writing. btape: btape.c:469-0 open device "LTO-5" (/dev/nrst0): 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:1153-0 Wrote 10000 blocks of 64412 bytes. btape: btape.c:604-0 Wrote 1 EOF to "LTO-5" (/dev/nrst0) btape: btape.c:1169-0 Wrote 10000 blocks of 64412 bytes. btape: btape.c:604-0 Wrote 1 EOF to "LTO-5" (/dev/nrst0) btape: btape.c:1211-0 Rewind OK. 10000 blocks re-read correctly. 10000 blocks re-read correctly. === Test Succeeded. End Write, rewind, and re-read test === btape: btape.c:1279-0 Block position test btape: btape.c:1291-0 Rewind OK. Reposition to file:block 0:4 Block 5 re-read correctly. Reposition to file:block 0:200 Block 201 re-read correctly. Reposition to file:block 0:9999 Block 10000 re-read correctly. Reposition to file:block 1:0 btape: btape.c:1336-0 Reposition error. * ======================================================================== /etc/bacula/bacula-sd.conf Device { Name = LTO-5 Media Type = LTO-5 Archive Device = /dev/nrst0 BSF at EOM = yes; Hardware End of Medium = no; Fast Forward Space File = yes; } # btape -c bacula-sd.conf /dev/nrst0 Tape block granularity is 1024 bytes. btape: butil.c:287-0 Using device: "/dev/nrst0" for writing. btape: btape.c:469-0 open device "LTO-5" (/dev/nrst0): 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:1153-0 Wrote 10000 blocks of 64412 bytes. btape: btape.c:604-0 Wrote 1 EOF to "LTO-5" (/dev/nrst0) btape: btape.c:1169-0 Wrote 10000 blocks of 64412 bytes. btape: btape.c:604-0 Wrote 1 EOF to "LTO-5" (/dev/nrst0) btape: btape.c:1211-0 Rewind OK. 10000 blocks re-read correctly. 10000 blocks re-read correctly. === Test Succeeded. End Write, rewind, and re-read test === btape: btape.c:1279-0 Block position test btape: btape.c:1291-0 Rewind OK. Reposition to file:block 0:4 Block 5 re-read correctly. Reposition to file:block 0:200 Block 201 re-read correctly. Reposition to file:block 0:9999 Block 10000 re-read correctly. Reposition to file:block 1:0 Block 10001 re-read correctly. Reposition to file:block 1:600 Block 10601 re-read correctly. Reposition to file:block 1:9999 Block 20000 re-read correctly. === Test Succeeded. End Write, rewind, and re-read test === === Append files test === This test is essential to Bacula. I'm going to write one record in file 0, two records in file 1, and three records in file 2 btape: btape.c:574-0 Rewound "LTO-5" (/dev/nrst0) btape: btape.c:1910-0 Wrote one record of 64412 bytes. btape: btape.c:1912-0 Wrote block to device. btape: btape.c:604-0 Wrote 1 EOF to "LTO-5" (/dev/nrst0) btape: btape.c:1910-0 Wrote one record of 64412 bytes. btape: btape.c:1912-0 Wrote block to device. btape: btape.c:1910-0 Wrote one record of 64412 bytes. btape: btape.c:1912-0 Wrote block to device. btape: btape.c:604-0 Wrote 1 EOF to "LTO-5" (/dev/nrst0) btape: btape.c:1910-0 Wrote one record of 64412 bytes. btape: btape.c:1912-0 Wrote block to device. btape: btape.c:1910-0 Wrote one record of 64412 bytes. btape: btape.c:1912-0 Wrote block to device. btape: btape.c:1910-0 Wrote one record of 64412 bytes. btape: btape.c:1912-0 Wrote block to device. btape: btape.c:604-0 Wrote 1 EOF to "LTO-5" (/dev/nrst0) btape: btape.c:469-0 open device "LTO-5" (/dev/nrst0): OK btape: btape.c:574-0 Rewound "LTO-5" (/dev/nrst0) btape: btape.c:1423-0 Now moving to end of medium. btape: btape.c:625-0 Moved to end of medium. We should be in file 3. I am at file 3. This is correct! Now the important part, I am going to attempt to append to the tape. btape: btape.c:1910-0 Wrote one record of 64412 bytes. btape: btape.c:1912-0 Wrote block to device. btape: btape.c:604-0 Wrote 1 EOF to "LTO-5" (/dev/nrst0) btape: btape.c:574-0 Rewound "LTO-5" (/dev/nrst0) Done appending, there should be no I/O errors Doing Bacula scan of blocks: 03-Mar 11:52 btape JobId 0: Error: block.c:429 Read error on fd=3 at file:blk 0:7 on device "LTO-5" (/dev/nrst0). ERR=Input/output error. Error reading block. ERR=block.c:429 Read error on fd=3 at file:blk 0:7 on device "LTO-5" (/dev/nrst0). ERR=Input/output error. Total files=0, blocks=7, bytes = 451,136 End scanning the tape. We should be in file 4. I am at file 0. This is NOT correct!!!! The above Bacula scan should have output identical to what follows. Please double check it ... === Sample correct output === 1 block of 64448 bytes in file 1 End of File mark. 2 blocks of 64448 bytes in file 2 End of File mark. 3 blocks of 64448 bytes in file 3 End of File mark. 1 block of 64448 bytes in file 4 End of File mark. Total files=4, blocks=7, bytes = 451,136 === End sample correct output === If the above scan output is not identical to the sample output, you MUST correct the problem or Bacula will not be able to write multiple Jobs to the tape. === Forward space files test === This test is essential to Bacula. I'm going to write five files then test forward spacing btape: btape.c:574-0 Rewound "LTO-5" (/dev/nrst0) btape: btape.c:1910-0 Wrote one record of 64412 bytes. btape: btape.c:1912-0 Wrote block to device. btape: btape.c:604-0 Wrote 1 EOF to "LTO-5" (/dev/nrst0) btape: btape.c:1910-0 Wrote one record of 64412 bytes. btape: btape.c:1912-0 Wrote block to device. btape: btape.c:1910-0 Wrote one record of 64412 bytes. btape: btape.c:1912-0 Wrote block to device. btape: btape.c:604-0 Wrote 1 EOF to "LTO-5" (/dev/nrst0) btape: btape.c:1910-0 Wrote one record of 64412 bytes. btape: btape.c:1912-0 Wrote block to device. btape: btape.c:1910-0 Wrote one record of 64412 bytes. btape: btape.c:1912-0 Wrote block to device. btape: btape.c:1910-0 Wrote one record of 64412 bytes. btape: btape.c:1912-0 Wrote block to device. btape: btape.c:604-0 Wrote 1 EOF to "LTO-5" (/dev/nrst0) btape: btape.c:1910-0 Wrote one record of 64412 bytes. btape: btape.c:1912-0 Wrote block to device. btape: btape.c:1910-0 Wrote one record of 64412 bytes. btape: btape.c:1912-0 Wrote block to device. btape: btape.c:604-0 Wrote 1 EOF to "LTO-5" (/dev/nrst0) btape: btape.c:1910-0 Wrote one record of 64412 bytes. btape: btape.c:1912-0 Wrote block to device. btape: btape.c:604-0 Wrote 1 EOF to "LTO-5" (/dev/nrst0) btape: btape.c:574-0 Rewound "LTO-5" (/dev/nrst0) btape: btape.c:1637-0 Now forward spacing 1 file. We should be in file 1. I am at file 1. This is correct! btape: btape.c:1649-0 Now forward spacing 2 files. We should be in file 3. I am at file 3. This is correct! btape: btape.c:574-0 Rewound "LTO-5" (/dev/nrst0) btape: btape.c:1662-0 Now forward spacing 4 files. We should be in file 4. I am at file 4. This is correct! btape: btape.c:1680-0 Now forward spacing 1 more file. We should be in file 5. I am at file 5. This is correct! === End Forward space files test === * ======================================================================== /etc/bacula/bacula-sd.conf Device { Name = LTO-5 Media Type = LTO-5 Archive Device = /dev/nrst0 BSF at EOM = yes; Hardware End of Medium = yes; Fast Forward Space File = yes; } ------------------------------------------------------------------------ # btape -c bacula-sd.conf /dev/nrst0 Tape block granularity is 1024 bytes. btape: butil.c:287-0 Using device: "/dev/nrst0" for writing. btape: btape.c:469-0 open device "LTO-5" (/dev/nrst0): 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:1153-0 Wrote 10000 blocks of 64412 bytes. btape: btape.c:604-0 Wrote 1 EOF to "LTO-5" (/dev/nrst0) btape: btape.c:1169-0 Wrote 10000 blocks of 64412 bytes. btape: btape.c:604-0 Wrote 1 EOF to "LTO-5" (/dev/nrst0) btape: btape.c:1211-0 Rewind OK. 10000 blocks re-read correctly. 10000 blocks re-read correctly. === Test Succeeded. End Write, rewind, and re-read test === btape: btape.c:1279-0 Block position test btape: btape.c:1291-0 Rewind OK. Reposition to file:block 0:4 Block 5 re-read correctly. Reposition to file:block 0:200 Block 201 re-read correctly. Reposition to file:block 0:9999 Block 10000 re-read correctly. Reposition to file:block 1:0 Block 10001 re-read correctly. Reposition to file:block 1:600 Block 10601 re-read correctly. Reposition to file:block 1:9999 Block 20000 re-read correctly. === Test Succeeded. End Write, rewind, and re-read test === === Append files test === This test is essential to Bacula. I'm going to write one record in file 0, two records in file 1, and three records in file 2 btape: btape.c:574-0 Rewound "LTO-5" (/dev/nrst0) btape: btape.c:1910-0 Wrote one record of 64412 bytes. btape: btape.c:1912-0 Wrote block to device. btape: btape.c:604-0 Wrote 1 EOF to "LTO-5" (/dev/nrst0) btape: btape.c:1910-0 Wrote one record of 64412 bytes. btape: btape.c:1912-0 Wrote block to device. btape: btape.c:1910-0 Wrote one record of 64412 bytes. btape: btape.c:1912-0 Wrote block to device. btape: btape.c:604-0 Wrote 1 EOF to "LTO-5" (/dev/nrst0) btape: btape.c:1910-0 Wrote one record of 64412 bytes. btape: btape.c:1912-0 Wrote block to device. btape: btape.c:1910-0 Wrote one record of 64412 bytes. btape: btape.c:1912-0 Wrote block to device. btape: btape.c:1910-0 Wrote one record of 64412 bytes. btape: btape.c:1912-0 Wrote block to device. btape: btape.c:604-0 Wrote 1 EOF to "LTO-5" (/dev/nrst0) btape: btape.c:469-0 open device "LTO-5" (/dev/nrst0): OK btape: btape.c:574-0 Rewound "LTO-5" (/dev/nrst0) btape: btape.c:1423-0 Now moving to end of medium. btape: btape.c:625-0 Moved to end of medium. We should be in file 3. I am at file 3. This is correct! Now the important part, I am going to attempt to append to the tape. btape: btape.c:1910-0 Wrote one record of 64412 bytes. btape: btape.c:1912-0 Wrote block to device. btape: btape.c:604-0 Wrote 1 EOF to "LTO-5" (/dev/nrst0) btape: btape.c:574-0 Rewound "LTO-5" (/dev/nrst0) Done appending, there should be no I/O errors Doing Bacula scan of blocks: 03-Mar 11:56 btape JobId 0: Error: block.c:429 Read error on fd=3 at file:blk 0:7 on device "LTO-5" (/dev/nrst0). ERR=Input/output error. Error reading block. ERR=block.c:429 Read error on fd=3 at file:blk 0:7 on device "LTO-5" (/dev/nrst0). ERR=Input/output error. Total files=0, blocks=7, bytes = 451,136 End scanning the tape. We should be in file 4. I am at file 0. This is NOT correct!!!! The above Bacula scan should have output identical to what follows. Please double check it ... === Sample correct output === 1 block of 64448 bytes in file 1 End of File mark. 2 blocks of 64448 bytes in file 2 End of File mark. 3 blocks of 64448 bytes in file 3 End of File mark. 1 block of 64448 bytes in file 4 End of File mark. Total files=4, blocks=7, bytes = 451,136 === End sample correct output === If the above scan output is not identical to the sample output, you MUST correct the problem or Bacula will not be able to write multiple Jobs to the tape. === Forward space files test === This test is essential to Bacula. I'm going to write five files then test forward spacing btape: btape.c:574-0 Rewound "LTO-5" (/dev/nrst0) btape: btape.c:1910-0 Wrote one record of 64412 bytes. btape: btape.c:1912-0 Wrote block to device. btape: btape.c:604-0 Wrote 1 EOF to "LTO-5" (/dev/nrst0) btape: btape.c:1910-0 Wrote one record of 64412 bytes. btape: btape.c:1912-0 Wrote block to device. btape: btape.c:1910-0 Wrote one record of 64412 bytes. btape: btape.c:1912-0 Wrote block to device. btape: btape.c:604-0 Wrote 1 EOF to "LTO-5" (/dev/nrst0) btape: btape.c:1910-0 Wrote one record of 64412 bytes. btape: btape.c:1912-0 Wrote block to device. btape: btape.c:1910-0 Wrote one record of 64412 bytes. btape: btape.c:1912-0 Wrote block to device. btape: btape.c:1910-0 Wrote one record of 64412 bytes. btape: btape.c:1912-0 Wrote block to device. btape: btape.c:604-0 Wrote 1 EOF to "LTO-5" (/dev/nrst0) btape: btape.c:1910-0 Wrote one record of 64412 bytes. btape: btape.c:1912-0 Wrote block to device. btape: btape.c:1910-0 Wrote one record of 64412 bytes. btape: btape.c:1912-0 Wrote block to device. btape: btape.c:604-0 Wrote 1 EOF to "LTO-5" (/dev/nrst0) btape: btape.c:1910-0 Wrote one record of 64412 bytes. btape: btape.c:1912-0 Wrote block to device. btape: btape.c:604-0 Wrote 1 EOF to "LTO-5" (/dev/nrst0) btape: btape.c:574-0 Rewound "LTO-5" (/dev/nrst0) btape: btape.c:1637-0 Now forward spacing 1 file. We should be in file 1. I am at file 1. This is correct! btape: btape.c:1649-0 Now forward spacing 2 files. We should be in file 3. I am at file 3. This is correct! btape: btape.c:574-0 Rewound "LTO-5" (/dev/nrst0) btape: btape.c:1662-0 Now forward spacing 4 files. We should be in file 4. I am at file 4. This is correct! btape: btape.c:1680-0 Now forward spacing 1 more file. We should be in file 5. I am at file 5. This is correct! === End Forward space files test === * ========================================================================