Not sure what is your issue there (bareos user on the system just have to 
belong to tape group)

here's a whole definition I use for myself


*cat /etc/bareos/bareos-sd.d/autochanger/autochanger-0.conf 
/etc/bareos/bareos-sd.d/device/tapedrive-[0,1].conf*
Autochanger {
  Name = "autochanger-0"
  # adapt this, to match your storage loader
  Changer Device = 
/dev/tape/by-id/scsi-1ADIC_Scalar_24_32A6A17932A6A17932A6A179-changer
  # an Autochanger can contain multiple drive devices
  Device = tapedrive-0
  Device = tapedrive-1
  Changer Command = "/usr/lib/bareos/scripts/mtx-changer %c %o %S %a %d"
}
Device {
    Name = "tapedrive-0"
    DeviceType = tape
    DriveIndex = 0
    Archive Device = /dev/tape/by-id/scsi-32036463934333846-nst
#    Archive Device = /dev/nst0
    MediaType = LTO8
    AutoChanger = yes
    AutomaticMount = yes
    MaximumFileSize = 10GB
    Maximum Concurrent Jobs = 1
    Drive Tape Alert Enabled = yes
    Drive Crypto Enabled = yes
    Query Crypto Status = yes
}
Device {
    Name = "tapedrive-1"
    DeviceType = tape
    DriveIndex = 1
    Archive Device = /dev/tape/by-id/scsi-32037353139353635-nst
#    Archive Device = /dev/nst1
    MediaType = LTO8
    AutoChanger = yes
    AutomaticMount = yes
    MaximumFileSize = 10GB
    Maximum Concurrent Jobs = 1
    Drive Tape Alert Enabled = yes
    Drive Crypto Enabled = yes
    Query Crypto Status = yes
}


*ls -lh /dev/tape/by-id/*
total 0
lrwxrwxrwx. 1 root root  9 Apr 13 10:16 
scsi-1ADIC_Scalar_24_32A6A17932A6A17932A6A179 -> ../../sg5
lrwxrwxrwx. 1 root root  9 Apr 13 10:16 
scsi-1ADIC_Scalar_24_32A6A17932A6A17932A6A179-changer -> ../../sg5
lrwxrwxrwx. 1 root root  9 Apr 13 10:16 scsi-32036463934333846 -> ../../st0
lrwxrwxrwx. 1 root root 10 Apr 13 10:16 scsi-32036463934333846-nst -> 
../../nst0
lrwxrwxrwx. 1 root root  9 Apr 13 10:16 scsi-32037353139353635 -> ../../st1
lrwxrwxrwx. 1 root root 10 Apr 13 10:16 scsi-32037353139353635-nst -> 
../../nst1
lrwxrwxrwx. 1 root root  9 Apr 13 10:16 scsi-32A6A17932A6A17932A6A179 -> 
../../sg5
lrwxrwxrwx. 1 root root  9 Apr 13 10:16 scsi-6F94D0386F -> ../../st0
lrwxrwxrwx. 1 root root 10 Apr 13 10:16 scsi-6F94D0386F-nst -> ../../nst0
lrwxrwxrwx. 1 root root  9 Apr 13 10:16 scsi-7519575675 -> ../../st1
lrwxrwxrwx. 1 root root 10 Apr 13 10:16 scsi-7519575675-nst -> ../../nst1

 *lsscsi -g*
[0:0:0:0]    disk    QEMU     QEMU HARDDISK    2.5+  /dev/sda   /dev/sg0
[0:0:0:1]    disk    QEMU     QEMU HARDDISK    2.5+  /dev/sdb   /dev/sg1
[3:0:0:0]    cd/dvd  QEMU     QEMU DVD-ROM     2.5+  /dev/sr0   /dev/sg2
[7:0:0:0]    mediumx ADIC     Scalar 24        D.00  /dev/sch0  /dev/sg5
[8:0:0:0]    tape    IBM      ULT3580-TD9      HB91  /dev/st0   /dev/sg3
[9:0:0:0]    tape    IBM      ULT3580-TD9      HB91  /dev/st1   /dev/sg4

on the director the autochanger storage is defined like this
*cat /etc/bareos/bareos-dir.d/storage/autochanger-0.conf*
Storage {
  Name = autochanger-0
  Address  = bareos-sd
  Password = "alwayssecret"
  Device = autochanger-0
  Media Type = LTO8
  Auto Changer = yes
  Maximum Concurrent Jobs = 2
}
I hope this will help you to understand what's happen on your side.
in /etc/bareos/mtx-changer you can also activate debug mode to log 
commands, visible then in /var/log/bareos/mtx.log
On Friday, 10 April 2026 at 21:55:02 UTC+2 Gregory West wrote:

> Finally got what I think is all correct.    I was able to stop bareos-sd 
> and run the btape test.   Everything worked fine in the test.    When I 
> restart bareos-sd and go into bconsole then issue the command : update 
> slots I get the following error:
> *update slots
> Automatically selected Catalog: MyCatalog
> Using Catalog "MyCatalog"
> Automatically selected Storage: Tape
> Connecting to Storage daemon Tape at backup:9103 ...
> 3306 Issuing autochanger "slots" command.
> Device "autochanger-0" has 0 slots.
> No slots in changer to scan.
> *
> Not sure why I am getting this.   I tried all the tests at the command 
> prompt everything worked fine there.    Any suggestions?   Probably a 
> permissions issue, but no idea where to look for it.
> On Thursday, April 9, 2026 at 1:35:33 PM UTC-5 Gregory West wrote:
>
>> OK making a lot of progress here!!!!    Have to thank you for your 
>> insights.     Managed to do a test with btape.   Looks like it passed.  
>>  When it asked to test the autochanger I said yes and got the following 
>> error:
>> Do you wish to continue with the Autochanger test? (y/n): y
>> === Autochanger test ===
>> 3301 Issuing autochanger "loaded" command.
>> 3991 Bad autochanger command: /usr/lib/bareos/scripts/mtx-changer 
>> /dev/sg0 loaded 1 /dev/tape/by-id/scsi-35001438004d2b339-nst 0
>> 3991 result="mtx: Request Sense: Long Report=yes
>> ": ERR=Child exited with code 1
>> You must correct this error or the Autochanger will not work.
>> *
>> Can anyone see something obvious?    Will keep beating the crap out of 
>> this.
>>
>> Greg
>> On Thursday, April 9, 2026 at 12:35:14 PM UTC-5 Gregory West wrote:
>>
>>> Here is the results from the ID list:
>>> root@backup:~# ls /dev/tape/by-id/
>>> scsi-35001438004d2b338  scsi-35001438004d2b338-changer 
>>>  scsi-35001438004d2b339  scsi-35001438004d2b339-nst  scsi-HU1205LUW6 
>>>  scsi-HU1205LUW6-nst  scsi-MXA225Z00B
>>>
>>> From looking at the list the ID would be:  scsi-35001438004d2b339-nst.  
>>>  Or am I totally wrong here?
>>>
>>> Greg
>>> On Thursday, April 9, 2026 at 12:18:17 PM UTC-5 Gregory West wrote:
>>>
>>>> Thank you for that information, I was wondering before.    I have 
>>>> updates the TapeDrives.conf
>>>> Device {
>>>>   Name = tapedrive-0
>>>>   DeviceType = tape
>>>>   DriveIndex = 0
>>>>   ArchiveDevice = /dev/nst0
>>>> .....
>>>> and autochanger-0.conf
>>>> Autochanger {
>>>> Name = autochanger-0
>>>> Changer Device = /dev/sg0
>>>> Device = tapedrive-0
>>>> Changer Command = "/usr/lib/bareos/scripts/mtx-changer %c %o %S %a %d"
>>>> }
>>>> Quick question should the device in the autochanger-0.conf be 
>>>> 'tapedrive-0' (the name of the first tape drive) or TapeDrives (the name 
>>>> of 
>>>> the config file)   In time I will have more than one tape drive.
>>>>
>>>> On Thursday, April 9, 2026 at 3:03:23 AM UTC-5 Bruno Friedmann 
>>>> (bruno-at-bareos) wrote:
>>>>
>>>>> You can't have both tape device and autochanger pointing to the same 
>>>>> scsi target here you are using /dev/sg0
>>>>> Either the changer is sg0 and the drive maybe sg1 
>>>>>
>>>>> The tape drive should point the the non-streaming device (usually 
>>>>> /dev/nst0 or better to use it's unique id)
>>>>> /dev/tape/by-id/XXXXX
>>>>>
>>>>>
>>>>> On Wednesday, 8 April 2026 at 20:50:34 UTC+2 Gregory West wrote:
>>>>>
>>>>>> I found one issue in the content of the /autochangers dir.   An extra 
>>>>>> .conf file that should not be there.   File deleted bareos-sd restarted 
>>>>>> now 
>>>>>> getting the following error:
>>>>>> 3910 Unable to open device ""tapedrive-0" (/dev/sg0)": 
>>>>>> ERR=backends/generic_tape_device.cc:130 Unable to open device 
>>>>>> "tapedrive-0" 
>>>>>> (/dev/sg0): ERR=Invalid argument
>>>>>>
>>>>>> On Wednesday, April 8, 2026 at 1:43:55 PM UTC-5 Gregory West wrote:
>>>>>>
>>>>>>> I am new to Bareos, and using an autochanger.   And yes I am a 
>>>>>>> gluten for punishment.  I have the following config files (see below).  
>>>>>>>  When I do a  * label -> 2: Tape bconsole seems to just sit there.  
>>>>>>>  Obviously I  have something wrong in my configs.  I just can not 
>>>>>>> figure 
>>>>>>> what.   Any assistance would be great.
>>>>>>>
>>>>>>> Greg
>>>>>>> /etc/bareos/bareos-dir.d/storage/Tape.conf
>>>>>>> Storage {
>>>>>>>   Name = Tape
>>>>>>>   Address = backup                # N.B. Use a fully qualified name 
>>>>>>> here (do not use "localhost" here).
>>>>>>>   Password = "  the ultra secret password  "
>>>>>>>   Device = autochanger-0
>>>>>>>   Media Type = LTO
>>>>>>>   Auto Changer = yes
>>>>>>> }
>>>>>>>
>>>>>>> /etc/bareos/bareos-sd.d/autochanger/autochanger-0.conf
>>>>>>> Autochanger {
>>>>>>> Name = autochanger-0
>>>>>>> Changer Device = /dev/sg0
>>>>>>> Device = tapedrive-0
>>>>>>> Changer Command = "/usr/lib/bareos/scripts/mtx-changer %c %o %S %a 
>>>>>>> %d"
>>>>>>> }
>>>>>>>
>>>>>>> /etc/bareos/bareos-sd.d/device/tapedrives.conf
>>>>>>> Device {
>>>>>>>   Name = tapedrive-0
>>>>>>>   DeviceType = tape
>>>>>>>   DriveIndex = 0
>>>>>>>   ArchiveDevice = /dev/sg0
>>>>>>>   MediaType = LTO
>>>>>>>   AutoChanger = yes # default: no
>>>>>>>   AutomaticMount = yes # default: no
>>>>>>>   MaximumFileSize = 10GB # default: 1000000000 (1GB)
>>>>>>>   LabelMedia = yes
>>>>>>>   RemovableMedia = yes
>>>>>>>   Autoselect = yes
>>>>>>> }
>>>>>>>
>>>>>>

-- 
You received this message because you are subscribed to the Google Groups 
"bareos-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion visit 
https://groups.google.com/d/msgid/bareos-users/4bc39516-c0c9-4bf8-9d80-30759f73ab64n%40googlegroups.com.

Reply via email to