Hi all found a problem to write multiple jobs on a tape. When run first job on a new labeled tape, it finish ok. But when i try to run another job on this tape, appears this error:
* Volume "Diario-01" previously written, moving to end of data. * Error: Unable to position to end of data on device "HP-Drive" (/dev/rmt/0cbn): ERR=dev.c:1326 read error on "HP-Drive" (/dev:/rmt/0cbn). ERR=Error de E/S. Btape test appears to be OK # /opt/bacula/bin/btape -c bacula-sd.conf /dev/rmt/0cbn Tape block granularity is 1024 bytes. btape: butil.c:285 Using device: "/dev/rmt/0cbn" for writing. btape: btape.c:372 open device "HP-Drive" (/dev/rmt/0cbn): OK *test === Write, rewind, and re-read test === I'm going to write 1000 records and an EOF then write 1000 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:831 Wrote 1000 blocks of 64412 bytes. btape: btape.c:505 Wrote 1 EOF to "HP-Drive" (/dev/rmt/0cbn) btape: btape.c:847 Wrote 1000 blocks of 64412 bytes. btape: btape.c:505 Wrote 1 EOF to "HP-Drive" (/dev/rmt/0cbn) btape: btape.c:505 Wrote 1 EOF to "HP-Drive" (/dev/rmt/0cbn) btape: btape.c:856 Rewind OK. 1000 blocks re-read correctly. Got EOF on tape. 1000 blocks re-read correctly. === Test Succeeded. End Write, rewind, and re-read test === === Write, rewind, and position test === I'm going to write 1000 records and an EOF then write 1000 records and an EOF, then rewind, and position to a few blocks and verify that it is correct. This is an *essential* feature ... btape: btape.c:943 Wrote 1000 blocks of 64412 bytes. btape: btape.c:505 Wrote 1 EOF to "HP-Drive" (/dev/rmt/0cbn) btape: btape.c:959 Wrote 1000 blocks of 64412 bytes. btape: btape.c:505 Wrote 1 EOF to "HP-Drive" (/dev/rmt/0cbn) btape: btape.c:505 Wrote 1 EOF to "HP-Drive" (/dev/rmt/0cbn) btape: btape.c:968 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:999 Block 1000 re-read correctly. Reposition to file:block 1:0 Block 1001 re-read correctly. Reposition to file:block 1:600 Block 1601 re-read correctly. Reposition to file:block 1:999 Block 2000 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:475 Rewound "HP-Drive" (/dev/rmt/0cbn) btape: btape.c:1577 Wrote one record of 64412 bytes. btape: btape.c:1579 Wrote block to device. btape: btape.c:505 Wrote 1 EOF to "HP-Drive" (/dev/rmt/0cbn) btape: btape.c:1577 Wrote one record of 64412 bytes. btape: btape.c:1579 Wrote block to device. btape: btape.c:1577 Wrote one record of 64412 bytes. btape: btape.c:1579 Wrote block to device. btape: btape.c:505 Wrote 1 EOF to "HP-Drive" (/dev/rmt/0cbn) btape: btape.c:1577 Wrote one record of 64412 bytes. btape: btape.c:1579 Wrote block to device. btape: btape.c:1577 Wrote one record of 64412 bytes. btape: btape.c:1579 Wrote block to device. btape: btape.c:1577 Wrote one record of 64412 bytes. btape: btape.c:1579 Wrote block to device. btape: btape.c:505 Wrote 1 EOF to "HP-Drive" (/dev/rmt/0cbn) btape: btape.c:505 Wrote 1 EOF to "HP-Drive" (/dev/rmt/0cbn) btape: btape.c:372 open device "HP-Drive" (/dev/rmt/0cbn): OK btape: btape.c:475 Rewound "HP-Drive" (/dev/rmt/0cbn) btape: btape.c:1097 Now moving to end of medium. btape: btape.c:526 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:1577 Wrote one record of 64412 bytes. btape: btape.c:1579 Wrote block to device. btape: btape.c:505 Wrote 1 EOF to "HP-Drive" (/dev/rmt/0cbn) btape: btape.c:505 Wrote 1 EOF to "HP-Drive" (/dev/rmt/0cbn) btape: btape.c:475 Rewound "HP-Drive" (/dev/rmt/0cbn) Done appending, there should be no I/O errors Doing Bacula scan of blocks: 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 scanning the tape. We should be in file 4. I am at file 4. This is 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. === Write, backup, and re-read test === I'm going to write three records and an EOF then backup over the EOF and re-read the last record. Bacula does this after writing the last block on the tape to verify that the block was written correctly. This is not an *essential* feature ... btape: btape.c:475 Rewound "HP-Drive" (/dev/rmt/0cbn) btape: btape.c:710 Wrote first record of 64412 bytes. btape: btape.c:721 Wrote second record of 64412 bytes. btape: btape.c:732 Wrote third record of 64412 bytes. btape: btape.c:505 Wrote 1 EOF to "HP-Drive" (/dev/rmt/0cbn) btape: btape.c:505 Wrote 1 EOF to "HP-Drive" (/dev/rmt/0cbn) btape: btape.c:748 Backspaced over EOF OK. btape: btape.c:753 Backspace record OK. btape: btape.c:771 Block re-read correct. Test succeeded! === End Write, backup, and re-read test === === Forward space files test === This test is essential to Bacula. I'm going to write five files then test forward spacing btape: btape.c:475 Rewound "HP-Drive" (/dev/rmt/0cbn) btape: btape.c:1577 Wrote one record of 64412 bytes. btape: btape.c:1579 Wrote block to device. btape: btape.c:505 Wrote 1 EOF to "HP-Drive" (/dev/rmt/0cbn) btape: btape.c:1577 Wrote one record of 64412 bytes. btape: btape.c:1579 Wrote block to device. btape: btape.c:1577 Wrote one record of 64412 bytes. btape: btape.c:1579 Wrote block to device. btape: btape.c:505 Wrote 1 EOF to "HP-Drive" (/dev/rmt/0cbn) btape: btape.c:1577 Wrote one record of 64412 bytes. btape: btape.c:1579 Wrote block to device. btape: btape.c:1577 Wrote one record of 64412 bytes. btape: btape.c:1579 Wrote block to device. btape: btape.c:1577 Wrote one record of 64412 bytes. btape: btape.c:1579 Wrote block to device. btape: btape.c:505 Wrote 1 EOF to "HP-Drive" (/dev/rmt/0cbn) btape: btape.c:1577 Wrote one record of 64412 bytes. btape: btape.c:1579 Wrote block to device. btape: btape.c:1577 Wrote one record of 64412 bytes. btape: btape.c:1579 Wrote block to device. btape: btape.c:505 Wrote 1 EOF to "HP-Drive" (/dev/rmt/0cbn) btape: btape.c:1577 Wrote one record of 64412 bytes. btape: btape.c:1579 Wrote block to device. btape: btape.c:505 Wrote 1 EOF to "HP-Drive" (/dev/rmt/0cbn) btape: btape.c:505 Wrote 1 EOF to "HP-Drive" (/dev/rmt/0cbn) btape: btape.c:475 Rewound "HP-Drive" (/dev/rmt/0cbn) btape: btape.c:1311 Now forward spacing 1 file. We should be in file 1. I am at file 1. This is correct! btape: btape.c:1323 Now forward spacing 2 files. We should be in file 3. I am at file 3. This is correct! btape: btape.c:475 Rewound "HP-Drive" (/dev/rmt/0cbn) btape: btape.c:1336 Now forward spacing 4 files. We should be in file 4. I am at file 4. This is correct! btape: btape.c:1354 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 === * *Found some extrange messages on solaris logs* scsi: [ID 107833 kern.warning] WARNING: /[EMAIL PROTECTED],0/pci8086,[EMAIL PROTECTED]/pci8086,[EMAIL PROTECTED],3/pci103c,[EMAIL PROTECTED]/[EMAIL PROTECTED],0 (st3): Error for Command: reserve Error Level: Fatal scsi: [ID 107833 kern.notice] Requested Block: 0 Error Block: 0 scsi: [ID 107833 kern.notice] Vendor: HP Serial Number: , $DR-1 scsi: [ID 107833 kern.notice] Sense Key: Unit Attention scsi: [ID 107833 kern.notice] ASC: 0x28 (medium may have changed), ASCQ: 0x0, FRU: 0x0 *bacula-sd conf:* # # A Linux or Solaris tape drive # Device { Name = HP-Drive # Media Type = LTO3 Archive Device = /dev/rmt/0cbn # /dev/rmt/0 AutomaticMount = yes; # when device opened, read it AlwaysOpen = no; RemovableMedia = yes; RandomAccess = no; # Block Positioning = no # Recuperaciones mucho mas lentas Hardware End Of Medium = no TWO EOF = yes BSF at EOM = yes Fast Forward Space File = no # Changer Command = "/opt/bacula/bin/mtx-changer %c %o %S %a %d" # Changer Device = /dev/sg0 # AutoChanger = yes # Enable the Alert command only if you have the mtx package loaded # Alert Command = "sh -c 'tapeinfo -f %c |grep TapeAlert|cat'" # If you have smartctl, enable this, it has more info than tapeinfo # Alert Command = "sh -c 'smartctl -H -l error %c'" } Other relevant info: Bacula 2.2.8 Solaris 5.10 Any idea? -- Alberto Frontera Técnico de Sistemas Dpto. Servicios y Proyectos Brújula T. +34 971 433 909 - F. +34 971 433 910 www.brujula.es _________________________________ En el corazón de su negocio ------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ _______________________________________________ Bacula-users mailing list Bacula-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bacula-users