mtx-changer script does not return from load anymore

25 views
Skip to first unread message

Otto Brandstaetter

unread,
Mar 19, 2025, 3:22:44 PM3/19/25
to bareos-users
Hi, I have been using bareos with different hardware since several years - and I have some scripts, for example to re-initialize tapes.

In the past I used for example /usr/lib/bareos/scripts/mtx-changer /dev/sch0 load 8 /dev/tape/by-id/sch0-nst 0 after execution, the next command in the script was executed. 

But since somewhen (last year?) after execution the script shows done, but does not exit. Seems to be hardware-independant as I tried with a dell changer and a hpe changer. 

I am working on debian 12 with (now) bareos 24, installed it using apt from download.bareos.org/current/Debian_12 
Any help would be appreciated as I could not find anything regarding this... 
Cheers, Otto

Bruno Friedmann (bruno-at-bareos)

unread,
Mar 20, 2025, 6:18:13 AM3/20/25
to bareos-users
Hi Otto,

Mainly the changes in mtx-changer are in the following commit https://github.com/bareos/bareos/commit/68710b7960 
We remove the perl usage in favor of awk and a few cleanup. 
But nothing in terms of usage should have changed.

What might have been happened, is that you touch previous version (check also mtx-changer.conf) which would have not been upgraded by the installation package.
Would you mind to check this ?

Regards

Otto Brandstaetter

unread,
Mar 20, 2025, 7:58:38 AM3/20/25
to bareos-users

Hi Bruno,


thanks a lot for your answer. the script was up-to-date but digging a little bit into it made me to set debugging on. then I could see in the log:

20250320-11:53:05 Doing mt -f /dev/tape/by-id/sch0-nst status ...
20250320-11:53:05 /dev/tape/by-id/sch0-nst: No such file or directory

so i looked around a little bit and set the right device, now everything working again, THANKS!

what is a little bit confusing (for me) is that the script did not throw an error or something. I think this would be helpful as one could immediately find out that the device path is not correct.

Best regards and thanks again,

Otto

Bruno Friedmann (bruno-at-bareos)

unread,
Mar 20, 2025, 9:07:14 AM3/20/25
to bareos-users
With debug activated it should have log that in /var/log/bareos/mtx-error.log usually. also it might be in some /var/lib/bareos/mtx-err* 
Reply all
Reply to author
Forward
0 new messages