Package: bacula
Version: 5.2.6+dfsg-9
Severity: important
Dear Maintainer and Developers,
bacula is unable to use tape drives on Debian kFreeBSD.
Using tape drives within bacula works with the Linux Kernel on amd64 and
sparc without any problem. Native FreeBSD with bacula works too.
bacula-sd is able to use disk storage without problems. But no tape drive.
This problem is only reproducable on kFreeBSD Systems!
The hardware works with kFreeBSD, I am able to use the tapedrive and the
changer with the mt, mtx and tar commands without problems.
Log of my test by hand:
root@vorlon:~# camcontrol devlist
at scbus0 target 5 lun 0 (sa0,pass0)
at scbus0 target 5 lun 1 (pass1,ch0)
at scbus1 target 0 lun 0 (ada0,pass2)
at scbus2 target 0 lun 0 (ada1,pass3)
at scbus3 target 0 lun 0 (ada2,pass4)
at scbus4 target 0 lun 0 (ada3,pass5)
at scbus6 target 0 lun 0 (ada4,pass6)
root@vorlon:~# mtx -f /dev/pass1 status
Storage Changer /dev/pass1:1 Drives, 16 Slots ( 0 Import/Export )
Data Transfer Element 0:Full (Storage Element 9 Loaded):VolumeTag = FZ0009L3
Storage Element 1:Full :VolumeTag=FZ0001L3
Storage Element 2:Full :VolumeTag=FZ0002L3
Storage Element 3:Full :VolumeTag=FZ0003L3
Storage Element 4:Full :VolumeTag=FZ0004L3
Storage Element 5:Full :VolumeTag=FZ0005L3
Storage Element 6:Full :VolumeTag=FZ0006L3
Storage Element 7:Full :VolumeTag=FZ0007L3
Storage Element 8:Full :VolumeTag=FZ0008L3
Storage Element 9:Empty
Storage Element 10:Full :VolumeTag=FZ0010L3
Storage Element 11:Full :VolumeTag=FZ0011L3
Storage Element 12:Full :VolumeTag=FZ0012L3
Storage Element 13:Full :VolumeTag=FZ0013L3
Storage Element 14:Full :VolumeTag=FZ0014L3
Storage Element 15:Full :VolumeTag=FZ0015L3
Storage Element 16:Full :VolumeTag=FZ0016L3
root@vorlon:~# mt -f /dev/nsa0 rewind
root@vorlon:~# mt -f /dev/nsa0 weof
root@vorlon:~# tar cvf /dev/nsa0 testfile20GB
testfile20GB
root@vorlon:~# mt -f /dev/nsa0 rewind
root@vorlon:~# tar tvf /dev/nsa0
-rw-r--r-- root/root 21474836480 2013-11-03 09:41 testfile20GB
root@vorlon:~#
root@vorlon:~# mt -f /dev/nsa0 rewind
root@vorlon:~# mt -f /dev/nsa0 weof
But when using the bacula tools, tape access fails:
root@vorlon:~# btape Drive-1
Tape block granularity is 1024 bytes.
btape: butil.c:290 Using device: "Drive-1" for writing.
03-Nov 10:28 btape JobId 0: 3301 Issuing autochanger "loaded? drive 0" command.
03-Nov 10:28 btape JobId 0: 3302 Autochanger "loaded? drive 0", result is Slot
9.
btape: btape.c:477 open device "Drive-1" (/dev/nsa0): OK
*test
=== Write, rewind, and re-read test ===
I'm going to write 1 records and an EOF
then write 1 records and an EOF, then rewind,
and re-read the data to verify that it is correct.
This is an *essential* feature ...
03-Nov 10:30 btape JobId 0: End of Volume "" at 0:0 on device "Drive-1"
(/dev/nsa0). Write of 64512 bytes got 0.
03-Nov 10:30 btape JobId 0: Error: Error writing final EOF to tape. This Volume
may not be readable.
dev.c:1557 ioctl MTWEOF error on "Drive-1" (/dev/nsa0).
ERR=Eingabe-/Ausgabefehler.
btape: btape.c:1151 Error writing block to device.
*q
03-Nov 10:30 btape: ERROR in dev.c:1662 dev.c:1661 I/O function "MTREW" not
supported on this device.
^C
root@vorlon:~#
Content of /etc/bacula/bacula-sd.conf (only tape and autochanger related):
Autochanger {
Name = pv124t
Device = Drive-1
Description = LTO-3 Library Dell PowerVault 124T
Changer Device = /dev/pass1
Changer Command = "/etc/bacula/scripts/mtx-changer %c %o %S %a %d"
}
Device {
Description = LTO-3 Library Dell PowerVault 124T
Archive Device = /dev/nsa0
Fast Forward Space File = no
TWO EOF = yes
AutoChanger = yes
Device Type = Tape
Name = Drive-1
Media Type = LTO-3
Drive Index = 0
RandomAccess = no;
RemovableMedia = yes;
AutomaticMount = yes; # when device opened, read it
AlwaysOpen = no;
# Offline On Unmount = no
Hardware End of Medium = yes
Backward Space Record = yes
Backward Space File = yes
Fast Forward Space File = yes
Forward Space File = yes
BSF at EOM = yes
Maximum File Size = 4GB
# 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'"
# Maximum Changer Wait = 300
Maximum Spool Size = 10G
Spool Directory = /srv/bacula-spooldir
}
-- System Information:
Debian Release: 7.2
APT prefers