Subject: Re: bacula and NetBSDd st device -- eom confusion
To: Sverre Froyen <>
From: Andy Ruhl <>
List: tech-pkg
Date: 11/02/2005 14:48:46
On 11/2/05, Sverre Froyen <> wrote:
> Hi,
> I've been testing sysutils/bacula (1.36.3nb2) on NetBSD (i368 2.0.2_STABL=
> from mid September).  I've run into what looks like an incompatibility in
> tape positioning between bacula and NetBSD's st device.  The scenario is =
> follows:
>         1) Run one backup job
>         2) Restore the backup
>         3) Immediately run a second backup job
>         4 )Attempt to restore the second backup
> The second restore fails because there is an empty file (EOF mark) betwee=
n the
> first and second backup on the tape.  This extra EOF mark is not there if
> step (2) is skipped or if the tape is unmounted and remounted between ste=
> (2) and (3).  It looks like bacula reads past the second EOF at the end o=
> the tape in step (2), sets an internal end-of-tape flag (ST_EOT), and the=
> assumes that it is already positioned correctly (because of the end-of-ta=
> flag) at the start of step (3).
> Here is my device config from bacula-sd.conf:
> Device {
>   Name =3D DDS-3
>   Description =3D "DDS-3 for NetBSD"
>   Media Type =3D DDS-3
>   Archive Device =3D /dev/nrst0
>   AutomaticMount =3D yes
>   Random Access =3D no
>   RemovableMedia =3D yes
>   AlwaysOpen =3D yes
>   Offline On Unmount =3D no
>   Hardware End of Medium =3D no
>   BSF at EOM =3D yes
>   Backward Space Record =3D yes
>   Fast Forward Space File =3D yes
>   Backward Space File =3D no
>   TWO EOF =3D yes
> }
> I have tried various other settings too but have not found one that does =
> show the problem.  BTW, the config passes btape test program.
> This is in reality a minor problem because (1) it is not a usual scenario=
> (2) because it can be easily remedied by an unmount / mount sequence.

I don't know what those tape options mean.

But this almost sounds like it's using the drive wrong, or the drive
is doing something unexpected. Sounds like data isn't appending
properly to me. I've been wanting to look into this program for a
while, maybe I'll start doing that. Too bad my DDS3 drive is busted...