From reading a few of the archives, getting an IDE Tape drive working in bacula is a real nightmare.
 
Welcome to my Nightmare ;)
 
Sorry if this looks like too much info but I always see flames about not including enough detail to help troubleshoot.
 
Anyway, I've started off at the "Testing Your Tape Drive With Bacula" page here:
 
I first looked for my drive
 
===============================================
[EMAIL PROTECTED] ~]# dmesg | grep TAPE
hdc: Seagate STT8000A, ATAPI TAPE drive
===============================================
 
Then loaded the ide-scsi driver
 
===============================================
[EMAIL PROTECTED] ~]# /sbin/modprobe ide-scsi
===============================================
 
Made sure it worked
 
===============================================
[EMAIL PROTECTED] ~]# mt -f /dev/nst0 status
SCSI 2 tape drive:
File number=0, block number=0, partition=0.
Tape block size 512 bytes. Density code 0x45 (QIC-3095-MC (TR-4)).
Soft error count since last status=0
General status bits on (41010000):
 BOT ONLINE IM_REP_EN
================================================
 
Ok, I'm ready to start test number one
 
=================================================
[EMAIL PROTECTED] ~]# mt -f /dev/nst0 erase
[EMAIL PROTECTED] ~]# mt -f /dev/nst0 rewind
[EMAIL PROTECTED] ~]# tar cvf /dev/nst0 .
./
./install.log
./.bashrc
./.bash_profile
./.gnupg/
./.gnupg/secring.gpg
./.gnupg/trustdb.gpg
./.gnupg/pubring.gpg~
./.gnupg/pubring.gpg
./.gnupg/gpg.conf
./.cpan/
./.cpan/sources/
./.cpan/sources/MIRRORED.BY
./.mysql_history
./.bash_logout
./.cshrc
./.bash_history
./.tcshrc
./anaconda-ks.cfg
./install.log.syslog
[EMAIL PROTECTED] ~]# mt -f /dev/nst0 rewind
[EMAIL PROTECTED] ~]# tar tvf /dev/nst0
drwxr-x--- root/root         0 2005-11-19 20:05:45 ./
-rw-r--r-- root/root     13431 2005-05-30 17:47:26 ./install.log
-rw-r--r-- root/root       176 2005-02-22 03:22:18 ./.bashrc
-rw-r--r-- root/root       191 2005-02-22 03:22:18 ./.bash_profile
drwx------ root/root         0 2005-11-21 23:29:40 ./.gnupg/
-rw------- root/root         0 2005-05-30 17:46:09 ./.gnupg/secring.gpg
-rw------- root/root      1200 2005-08-01 21:24:12 ./.gnupg/trustdb.gpg
-rw------- root/root      4010 2005-06-08 23:41:41 ./.gnupg/pubring.gpg~
-rw------- root/root      5263 2005-07-19 13:26:17 ./.gnupg/pubring.gpg
-rw------- root/root      8075 2005-05-30 17:46:09 ./.gnupg/gpg.conf
drwxr-xr-x root/root         0 2005-11-19 20:05:45 ./.cpan/
drwxr-xr-x root/root         0 2005-11-19 20:06:00 ./.cpan/sources/
-rw-r--r-- root/root    147970 2005-11-19 20:06:00 ./.cpan/sources/MIRRORED.BY
-rw------- root/root         0 2005-06-02 19:34:04 ./.mysql_history
-rw-r--r-- root/root        24 2005-02-22 03:22:18 ./.bash_logout
-rw-r--r-- root/root       100 2005-02-22 03:22:18 ./.cshrc
-rw------- root/root      3506 2005-11-20 21:39:53 ./.bash_history
-rw-r--r-- root/root       102 2005-02-22 03:22:18 ./.tcshrc
-rw-r--r-- root/root      1050 2005-05-30 17:47:27 ./anaconda-ks.cfg
-rw-r--r-- root/root      3281 2005-05-30 17:46:09 ./install.log.syslog
=======================================================
 
So far so good.
 
In bacula-dir.conf I placed
 
=======================================================
Storage {
  Name = Tarvan         
  Address = localhost         
  SDPort = 9103
  Password =        
  Device = /dev/nst0           
  Media Type = Tarvan         
}
====================================================
 
and in bacula-sd.conf I placed this (based on the OnStream tape drive
 
====================================================
Device {
  Name = Tarvan
  Description = "Tarvan drive on Linux"
  Media Type = Tarvan-4
  Archive Device = /dev/nst0
  AutomaticMount = yes;                 AlwaysOpen = yes
  Offline On Unmount = no
  Fast Forward Space File = no    #inserted this after test error
# The min/max blocksizes of 32768 are *required*
  Minimum Block Size = 32768
  Maximum Block Size = 32768
}
========================================================
 
Ok now to test it out
 
========================================================
[EMAIL PROTECTED] ~]# /usr/sbin/btape -c /etc/bacula/bacula-sd.conf /dev/nst0
Tape block granularity is 1024 bytes.
btape: butil.c:258 Using device: "/dev/nst0" for writing.
btape: btape.c:335 open_dev /dev/nst0 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:786 Wrote 1000 blocks of 32668 bytes.
btape: btape.c:465 Wrote 1 EOF to /dev/nst0
btape: btape.c:802 Wrote 1000 blocks of 32668 bytes.
btape: btape.c:465 Wrote 1 EOF to /dev/nst0
btape: btape.c:811 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:898 Wrote 1000 blocks of 32668 bytes.
btape: btape.c:465 Wrote 1 EOF to /dev/nst0
btape: btape.c:914 Wrote 1000 blocks of 32668 bytes.
btape: btape.c:465 Wrote 1 EOF to /dev/nst0
btape: btape.c:923 Rewind OK.
Reposition to file:block 0:4
22-Nov 18:34 btape: btape Error: block.c:264 Volume data error at 0:4! Wanted ID
: "BB02", got "". Buffer discarded.
btape: btape.c:979 Read block 5 failed! file=0 blk=4. ERR=Input/output error
 
btape: btape.c:989 This may be because the tape drive block size is not
 set to variable blocking as normally used by Bacula.
 Please see the Tape Testing chapter in the manual and
 look for using mt with defblksize and setoptions
If your tape drive block size is correct, then perhaps
 your SCSI driver is *really* stupid and does not
 correctly report the file:block after a FSF. In this
 case try setting:
    Fast Forward Space File = no
 in your Device resource.
=====================================================================
 
Yeek!
 
I have NFI about block size so I thought I would just throw in  Fast Forward Space File = no
as it suggested.
 
I ran the test again
 
======================================================================
=== 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:786 Wrote 1000 blocks of 32668 bytes.
btape: btape.c:465 Wrote 1 EOF to /dev/nst0
btape: btape.c:802 Wrote 1000 blocks of 32668 bytes.
btape: btape.c:465 Wrote 1 EOF to /dev/nst0
btape: btape.c:811 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:898 Wrote 1000 blocks of 32668 bytes.
btape: btape.c:465 Wrote 1 EOF to /dev/nst0
btape: btape.c:914 Wrote 1000 blocks of 32668 bytes.
btape: btape.c:465 Wrote 1 EOF to /dev/nst0
btape: btape.c:923 Rewind OK.
Reposition to file:block 0:4
btape: btape.c:979 Read block 5 failed! file=0 blk=4. ERR=Input/output error
 
btape: btape.c:989 This may be because the tape drive block size is not
 set to variable blocking as normally used by Bacula.
 Please see the Tape Testing chapter in the manual and
 look for using mt with defblksize and setoptions
If your tape drive block size is correct, then perhaps
 your SCSI driver is *really* stupid and does not
 correctly report the file:block after a FSF. In this
 case try setting:
    Fast Forward Space File = no
 in your Device resource.
=================================================================
 
Ok, I guess I really do need to do something about the block size.
 
Can anyone point me in the right direction from here??
 
 

Reply via email to