Thanks, it seems to be working:

btape -c bacula-sd.conf /dev/nst0
Tape block granularity is 1024 bytes.
btape: butil.c:290-0 Using device: "/dev/nst0" for writing.
btape: btape.c:478-0 open device "Quantum LTO-8 HH" (/dev/nst0): OK
*

Does it mean I should disable bacula-sd service on startup?

On the legacy system that I'm replacing (Debian 7 / Bacula 5.2.6 / LTO-4) it's running and auto starts on boot:

service bacula-sd status
[ ok ] bacula-sd is running.

runlevel
N 2

ls -l /etc/rc2.d | grep bacula
lrwxrwxrwx 1 root root  19 Jul  4  2019 S02bacula-sd -> ../init.d/bacula-sd
lrwxrwxrwx 1 root root  19 Jul  4  2019 S04bacula-fd -> ../init.d/bacula-fd
lrwxrwxrwx 1 root root 25 Jul 4 2019 S19bacula-director -> ../init.d/bacula-director


On 27/02/2023 16:14, Bill Arlofski via Bacula-users wrote:
On 2/27/23 09:03, Adam Weremczuk wrote:
Hi all,

My env: Debian 11 / Bacula 9.6.7 / LTO-8. Fresh installation.

The server has just been rebooted and I'm unable to complete a tape test:

btape -c bacula-sd.conf /dev/nst0
Tape block granularity is 1024 bytes.
btape: butil.c:290-0 Using device: "/dev/nst0" for writing.
btape: device.c:319-0 dev open failed: tape_dev.c:169 Unable to open
device "Quantum LTO-8 HH" (/dev/nst0): ERR=Device or resource busy
27-Feb 15:57 btape JobId 0: Fatal error: device.c:319 dev open failed:
tape_dev.c:169 Unable to open device "Quantum LTO-8 HH" (/dev/nst0):
ERR=Device or resource busy
btape: butil.c:198-0 Cannot open "Quantum LTO-8 HH" (/dev/nst0)
27-Feb 15:57 btape JobId 0: Fatal error: butil.c:198 Cannot open
"Quantum LTO-8 HH" (/dev/nst0)

Hello Adam,

Please make sure that the bacula-sd process is not running. It is probable that it is locking the drive so that other processes cannot access it.


lsof -w | grep /dev/nst
bacula-sd   997                     bacula    3r CHR
9,128       0t0        218 /dev/nst0
bacula-sd   997  1024 bacula-sd     bacula    3r CHR
9,128       0t0        218 /dev/nst0

^^^^^  And here is the proof ^^^^^ :)


cat /etc/bacula/bacula-sd.conf | grep /dev | grep -v ^#
    Archive Device = /dev/nst0
    Changer Device = /dev/st0

Additionally, you will not set a changer device for a stand-alone tape drive.  The human is the "Changer Device" in these cases. :)


What's the reason for my error and how to fix it?

Please see above. :)


Best regards,
Bill



_______________________________________________
Bacula-users mailing list
Bacula-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users


_______________________________________________
Bacula-users mailing list
Bacula-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users

Reply via email to