[pkg-bacula-devel] Bug#728582: bacula-sd on kFreeBSD: unable to use tape drive

Florian Zagler florianzagler at web.de
Sun Nov 3 10:15:16 UTC 2013


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 at vorlon:~# camcontrol devlist
<IBM ULTRIUM-TD3 5BG2>             at scbus0 target 5 lun 0 (sa0,pass0)
<DELL PV-124T 0031>                at scbus0 target 5 lun 1 (pass1,ch0)
<WDC WD1002FBYS-02A6B0 03.00C06>   at scbus1 target 0 lun 0 (ada0,pass2)
<WDC WD1002FBYS-02A6B0 03.00C06>   at scbus2 target 0 lun 0 (ada1,pass3)
<WDC WD30EFRX-68AX9N0 80.00A80>    at scbus3 target 0 lun 0 (ada2,pass4)
<WDC WD30EFRX-68AX9N0 80.00A80>    at scbus4 target 0 lun 0 (ada3,pass5)
<SAMSUNG SSD 830 Series CXM03B1Q>  at scbus6 target 0 lun 0 (ada4,pass6)
root at 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 at vorlon:~# mt -f /dev/nsa0 rewind
root at vorlon:~# mt -f /dev/nsa0 weof
root at vorlon:~# tar cvf /dev/nsa0 testfile20GB 
testfile20GB
root at vorlon:~# mt -f /dev/nsa0 rewind
root at vorlon:~# tar tvf /dev/nsa0
-rw-r--r-- root/root 21474836480 2013-11-03 09:41 testfile20GB
root at vorlon:~# 
root at vorlon:~# mt -f /dev/nsa0 rewind
root at vorlon:~# mt -f /dev/nsa0 weof


But when using the bacula tools, tape access fails:

root at 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 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 ...

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 at 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 stable
  APT policy: (700, 'stable'), (650, 'testing'), (600, 'unstable')
Architecture: kfreebsd-amd64 (x86_64)

Kernel: kFreeBSD 9.0-2-amd64
Locale: LANG=de_DE.UTF-8, LC_CTYPE=de_DE.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages bacula depends on:
ii  bacula-client  5.2.6+dfsg-9
ii  bacula-common  5.2.6+dfsg-9
ii  bacula-server  5.2.6+dfsg-9

bacula recommends no packages.

Versions of packages bacula suggests:
ii  bacula-doc  5.2.6-3

-- no debconf information



More information about the pkg-bacula-devel mailing list