Bug#728582: bacula-sd on kFreeBSD: unable to use tape drive

2017-09-25 Thread Carsten Leonhardt
Control: tags -1 + unreproducible

Hi,

FreeBSD has some notes about using bacula:

https://github.com/freebsd/freebsd-ports/blob/master/sysutils/bacula-server/files/pkg-message.server.in

In particular the following part:

> Due to lack of some features in the FreeBSD tape driver implementation
> you MUST add some OS dependent options to the bacula-sd.conf file:

>  Hardware End of Medium = no;
>  Backward Space Record  = no;
>  Backward Space File= no;

> With 2 filemarks at EOT (see man mt):
>   Fast Forward Space File = no;
>   BSF at EOM = yes;
>   TWO EOF= yes;

> With 1 filemarks at EOT (see man mt):
>   Fast Forward Space File = yes;
>   BSF at EOM = no;
>   TWO EOF   = no;

> NOTE: YOU CAN SWITCH EOT model ONLY when starting from scratch with
> EMPTY tapes."

Would you be able to confirm whether following this advice makes tape
drives useable under kFreeBSD?

Regards,

Carsten



Bug#728582: bacula-sd on kFreeBSD: unable to use tape drive

2016-09-22 Thread Carsten Leonhardt
Control: retitle -1 Add tape support for GNU/kFreeBSD
Control: severity -1 wishlist
Control: reassign bacula-sd

Hi,

as GNU/kFreeBSD is not fully supported by upstream, I consider this a
wishlist bug.

 - Carsten



Bug#728582: bacula-sd on kFreeBSD: unable to use tape drive

2015-11-10 Thread Carsten Leonhardt
Hi,

> But when using the bacula tools, tape access fails:
[...]
> 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.

do you have the possibility to test this again with the new bacula
7.0.5+dfsg-2 packages I released?

I have added better support for kFreeBSD, it might have had an effect on
the usability on tapes.

Thanks,

leo



Bug#728582: bacula-sd on kFreeBSD: unable to use tape drive

2013-11-03 Thread Florian Zagler
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
IBM ULTRIUM-TD3 5BG2 at scbus0 target 5 lun 0 (sa0,pass0)
DELL PV-124T 0031at 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.00A80at scbus3 target 0 lun 0 (ada2,pass4)
WDC WD30EFRX-68AX9N0 80.00A80at scbus4 target 0 lun 0 (ada3,pass5)
SAMSUNG SSD 830 Series CXM03B1Q  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