NOOB autochanger setup.

17 views
Skip to first unread message

Gregory West

unread,
Apr 8, 2026, 2:43:55 PM (22 hours ago) Apr 8
to bareos-users
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
}

Gregory West

unread,
Apr 8, 2026, 2:50:34 PM (22 hours ago) Apr 8
to bareos-users
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

Bruno Friedmann (bruno-at-bareos)

unread,
4:03 AM (9 hours ago) 4:03 AM
to bareos-users
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
Reply all
Reply to author
Forward
0 new messages