How to configure a tape library with autochanger and tape drives in bareos?

3,004 views
Skip to first unread message

Paul Jähne

unread,
Jul 12, 2017, 9:21:03 AM7/12/17
to bareos-users
Hello,

I have a basically working BareOS installation. The test backup from section 6 of the manual works.

I now want to add tape storage to BareOS but it isn't showing up, e.g. in the WebGUI I only see the default file storage.

The package bareos-storage-tape is installed. Here is the configuration I added:

/etc/bareos/bareos-sd.d/autochanger/autochanger-0.conf:

```
Autochanger {
Name = "autochanger-0"
Changer Device = /dev/tape/by-id/scsi-1QUANTUM_D1H0332614_LLA
Device = tapedrive-0
Device = tapedrive-1
Changer Command = "/usr/lib/bareos/scripts/mtx-changer %c %o %S %a %d"
}
```

/etc/bareos/bareos-sd.d/device/tapedrive-0.conf:

```
Device {
Name = "tapedrive-0"
DeviceType = tape
DriveIndex = 0
ArchiveDevice = /dev/tape/by-id/scsi-3500308c38e0c9000-nst
MediaType = LTO
Check Labels = yes
AutoChanger = yes # default: no
AutomaticMount = yes # default: no
MaximumFileSize = 10GB # default: 1000000000 (1GB)
}
```

/etc/bareos/bareos-sd.d/device/tapedrive-1.conf:

```
Device {
Name = "tapedrive-1"
DeviceType = tape
DriveIndex = 1
ArchiveDevice = /dev/tape/by-id/scsi-3500308c38e0c9004-nst
MediaType = LTO
Check Labels = yes
AutoChanger = yes # default: no
AutomaticMount = yes # default: no
MaximumFileSize = 10GB # default: 1000000000 (1GB)
}
```

Afterwards I restarted the bareos-sd service.

The tape library is recognised by the OS and can be used, e. g. running the mtx-changer script works:

```
sudo /usr/lib/bareos/scripts/mtx-changer /dev/tape/by-id/scsi-1QUANTUM_D1H0332614_LLA list
1:000310
...
```

Can someone spot what is wrong or missing to get the tape library to show up in BareOS?

Environement: Ubuntu Server 16.04 with BareOS 16.2.4.

Regards

Paul

Jörg Steffens

unread,
Jul 12, 2017, 1:45:17 PM7/12/17
to bareos...@googlegroups.com
You must make this storage also known to the bareos-director.
The bareos-storage-tape packages comes also with the
/etc/bareos/bareos-dir.d/storage/Tape.conf.example configuration file,
with following contents:

Storage {
Name = Tape
Address = "Replace this by the Bareos Storage Daemon FQDN or IP address"
Password = "Replace this by the Bareos Storage Daemon director password"
Device = autochanger-0
Media Type = LTO
Auto Changer = yes
}

Just fill Address and Password to the same values as your File Storages
(assuming both are on the same storage daemon), reload the configuration
and it should work.
--
Jörg Steffens joerg.s...@bareos.com
Bareos GmbH & Co. KG Phone: +49 221 630693-91
http://www.bareos.com Fax: +49 221 630693-10

Sitz der Gesellschaft: Köln | Amtsgericht Köln: HRA 29646
Komplementär: Bareos Verwaltungs-GmbH
Geschäftsführer:
S. Dühr, M. Außendorf, Jörg Steffens, P. Storz

Paul Jähne

unread,
Jul 13, 2017, 1:36:06 AM7/13/17
to bareos-users
Thank you Jörg, that worked and the tape ressource is now showing up as a storage ressource.

One thing that is strange to me: on the Storage Devices overview tab on Autochanger it says no allthough status reports correctly as autochanger:

```
Device status:
Autochanger "autochanger-0" with devices:
"tapedrive-0" (/dev/tape/by-id/scsi-3500308c38e0c9000-nst)
"tapedrive-1" (/dev/tape/by-id/scsi-3500308c38e0c9004-nst)
```

Is this expected?

Paul Jähne

unread,
Jul 13, 2017, 3:29:57 AM7/13/17
to bareos-users
I figured it out: `Autochanger = yes` was missing in /etc/bareos/bareos-dir.d/storage/Tape.conf.

Christian Steinherr (DV-Betreuer Informatik)

unread,
Jul 13, 2017, 5:48:36 AM7/13/17
to bareos...@googlegroups.com
hm, my quantum device has this changer device the autochanger-section
Changer Device = /dev/sg6

and my device-section has:
Changer Device = /dev/sg6
Archive Device = /dev/st0

I don't know but are you sure you're doing the right adressing?
What does lssci say? I case yout autochanger is connected via scsi or sas.

Kind regards

Christian

Paul Jähne

unread,
Jul 13, 2017, 9:23:14 AM7/13/17
to bareos-users, e...@informatik.uni-augsburg.de
Hey Christian,

I'm not sure if I understood you correctly.

I use the device IDs instead of device names in my config files, just to be on the safe side in case something changes. The IDs I use are pointing to the correct devices (/dev/nst0, /dev/nst1 and /dev/sg2). They are all connected via SCSI.

After the addition of the address and password in the storage section and the auto changer option the tape library recognises the tapes correctly.

Christian Steinherr (DV-Betreuer Informatik)

unread,
Jul 14, 2017, 6:20:46 AM7/14/17
to Paul Jähne, bareos-users
Hey Paul,

ah okay, well i think a working setup with the real IDs is also fine.
Seems rule nr. 3 in computer science applies here: works for me ;-)

Yet i didn't have a problem with changing scsi-IDs, but it's a very static setup in my backupserver, so well, fix IDs could be
the better solution to be sure, so it's tied together.

Kind regards,

christian
Reply all
Reply to author
Forward
0 new messages