Issues with getting bareos to see the slots in autochanger

99 views
Skip to first unread message

Philip Dalrymple

unread,
Sep 29, 2023, 3:20:25 PM9/29/23
to bareos-users
I used bareos at my last company and just installed a qualstar Q40. 

The mtx-changer command works as I expect but the status slots storage does not
(see below) 

Any Ideas on troubleshoting?

my autochanger record is 

Autochanger {
  Name = QSTAR
  Changer Device = /dev/sch0
  Device = LTO8
  Changer Command = "/usr/bin/sudo /usr/lib/bareos/scripts/mtx-changer %c %o %S %a %d"

}

my device record is

Device {
  Name = LTO8
  Media Type = LTO8
  Device Type = Tape
  Archive Device = /dev/st0
  Label Media = no;                   # yes for disk
  Random Access = No;
  Automatic Mount = yes;               # when device opened, read it
  Removable Media = yes;
  Always Open = yes;
  Autochanger = yes;
  Maximum Concurrent Jobs = 1;
  Maximum Block Size = 1048576;         
}


-----------------------------mtx-changer 
➜  bareos-config git:(main) sudo /usr/lib/bareos/scripts/mtx-changer /dev/sch0 slots  
40
➜  bareos-config git:(main) sudo /usr/lib/bareos/scripts/mtx-changer /dev/sch0 listall
D:0:E
S:1:F:1E0001L8                            
S:2:F:1E0002L8                            
S:3:F:1E0003L8                            
S:4:F:1E0004L8                            
S:5:F:1E0005L8                            
S:6:F:1E0006L8                            
S:7:F:1E0007L8                            
S:8:F:1E0008L8                            
S:9:F:1E0009L8                            
S:10:F:1E0010L8                            
S:11:F:1E0011L8                            
S:12:F:1E0012L8                            
S:13:F:1E0013L8                            
S:14:F:1E0014L8                            
S:15:F:1E0015L8                            
S:16:F:1E0016L8                            
S:17:F:1E0017L8                            
S:18:F:1E0018L8                            
S:19:F:1E0019L8                            
S:20:F:1E0020L8                            
S:21:F:CLN001L1                            
S:22:F:CLN002L1                            
S:23:E
S:24:E
S:25:E
S:26:E
S:27:E
S:28:E
S:29:E
S:30:E
S:31:E
S:32:E
S:33:E
S:34:E
S:35:E
I:36:E
I:37:E
I:38:E
I:39:E
I:40:E

---------------------------- bconsol 

status slots storage
Automatically selected Storage: bstore-eds1-sd
Automatically selected Catalog: MyCatalog
Using Catalog "MyCatalog"
Connecting to Storage daemon bstore-eds1-sd at bstore-eds1.rhsys.co:9103 ...
3306 Issuing autochanger "slots" command.
Device "LTO8" has 0 slots.
No slots in changer to scan.
*

Philip Dalrymple

unread,
Sep 29, 2023, 3:20:31 PM9/29/23
to bareos-users

Philip Dalrymple

unread,
Sep 29, 2023, 3:25:12 PM9/29/23
to bareos-users
I enabled logging on the mtx-changer script and if I call it from the command line I see entries in the log but not if.... Wait I may need to add the user bareos to the sudoers

Let me try that

Philip Dalrymple

unread,
Sep 29, 2023, 3:25:18 PM9/29/23
to bareos-users
I enabled logging on the mtx-changer script and if I call it from the command line I see entries in the log but not if.... Wait I may need to add the user bareos to the sudoers

Let me try that

On Friday, September 29, 2023 at 3:20:31 PM UTC-4 Philip Dalrymple wrote:

Philip Dalrymple

unread,
Sep 29, 2023, 3:29:57 PM9/29/23
to bareos-users
OK THAT WAS IT

A line needs to be added to /etc/sudoers file to allow the user (or group) bareos to run the mx-changer script

Philip Dalrymple

unread,
Sep 29, 2023, 3:30:03 PM9/29/23
to bareos-users
OK THAT WAS IT

A line needs to be added to /etc/sudoers file to allow the user (or group) bareos to run the mx-changer script



Bruno Friedmann (bruno-at-bareos)

unread,
Oct 2, 2023, 4:11:49 AM10/2/23
to bareos-users
Usually bareos sd user is also member of "Tape" and Disk group which greatly simplify access to that kind of devices.

Philip Dalrymple

unread,
Oct 2, 2023, 6:28:16 AM10/2/23
to Bruno Friedmann (bruno-at-bareos), bareos-users
Yes but the default command (tape) had sudo in it so needed to be in the sudoers file, I had the same issue at my last company
but that was 5 years ago and I had forgotten.

--
You received this message because you are subscribed to a topic in the Google Groups "bareos-users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/bareos-users/W87HSH_Jd40/unsubscribe.
To unsubscribe from this group and all its topics, send an email to bareos-users...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/bareos-users/f7cc3801-13b0-4b09-a8bb-4779e0b354d5n%40googlegroups.com.


This email has been scanned by Inbound Shield.





--
Philip W. Dalrymple III <p...@rh-sys.com>
President & CTO
Rhodium Systems LLC

Andreas Rogge

unread,
Oct 9, 2023, 6:16:46 AM10/9/23
to bareos...@googlegroups.com
Am 02.10.23 um 12:28 schrieb Philip Dalrymple:
> Yes but the default command (tape) had sudo in it so needed to be in the
> sudoers file, I had the same issue at my last company
> but that was 5 years ago and I had forgotten.
You don't need sudo. The bareos user should be in the "tape" group and
thus doesn't need sudo to run mtx.

Best Regards,
Andreas
--
Andreas Rogge andrea...@bareos.com
Bareos GmbH & Co. KG Phone: +49 221-630693-86
http://www.bareos.com

Sitz der Gesellschaft: Köln | Amtsgericht Köln: HRA 29646
Komplementär: Bareos Verwaltungs-GmbH
Geschäftsführer: Stephan Dühr, Jörg Steffens, Philipp Storz
OpenPGP_0x00314758866BD59E.asc
OpenPGP_signature
Reply all
Reply to author
Forward
0 new messages