Running multiple autochangers

547 views
Skip to first unread message

David Pearce

unread,
Dec 29, 2015, 3:49:49 PM12/29/15
to bareos-users
We've been running a single Dell ML6000 autochanger with two internal LTO-4 drives for some time. We have a second autochanger (a duplicate of the first one) attached to the same computer.

Every time I have tried to make this work, I never can. If someone can guide me, I'd sure appreciate it. If I try to run a job against "tape2", I get this error message.
Storage daemon didn't accept Device "Autochanger1" because:
3924 Device "Autochanger1" not in SD Device resources or no matching Media Type.


Here are the configuration file bits:

bareos-sd.conf

Autochanger {
Name = Autochanger0
Device = Drive-0, Drive-1
Changer Command = "/etc/bareos/scripts/mtx-changer %c %o %S %a %d"
Changer Device = /dev/tape/by-id/scsi-1ADIC_A0C0057818_LLA
}

Device {
Name = Drive-0
Drive Index = 0
Media Type = ULTRIUM-LTO-4
Archive Device = /dev/tape/by-id/scsi-3500308c09c552000-nst
Changer Device = /dev/tape/by-id/scsi-1ADIC_A0C0057818_LLA
Device Type = Tape
AutomaticMount = yes;
AlwaysOpen = yes;
RemovableMedia = yes;
RandomAccess = no;
AutoChanger = yes
Check Labels = yes
LabelMedia = yes
Label Type = ANSI
Alert Command = "sh -c '/usr/sbin/smartctl -H -d scsi -l error %c'"
Maximum Spool Size = 225gb
Maximum Job Spool Size = 100gb
Spool Directory = /dspool
}

Device {
Name = Drive-1
Drive Index = 1
Media Type = ULTRIUM-LTO-4
Archive Device = /dev/tape/by-id/scsi-3500308c09c552004-nst
Changer Device = /dev/tape/by-id/scsi-1ADIC_A0C0057818_LLA
Device Type = Tape
AutomaticMount = yes;
AlwaysOpen = yes;
RemovableMedia = yes;
RandomAccess = no;
AutoChanger = yes
Check Labels = yes
LabelMedia = yes
Label Type = ANSI
Alert Command = "sh -c '/usr/sbin/smartctl -H -d scsi -l error %c'"
Maximum Spool Size = 225gb
Maximum Job Spool Size = 100gb
Spool Directory = /dspool
}

Autochanger {
Name = Autochanger1
Device = Drive-2, Drive-3
Changer Command = "/etc/bareos/scripts/mtx-changer %c %o %S %a %d"
Changer Device = /dev/tape/by-id/scsi-1ADIC_A0C0048024_LLA
}

Device {
Name = Drive-2
Drive Index = 2
Media Type = ULTRIUM-LTO-4b
Archive Device = /dev/tape/by-id/scsi-3500308c09d3ab000-nst
Changer Device = /dev/tape/by-id/scsi-1ADIC_A0C0048024_LLA
Device Type = Tape
AutomaticMount = yes;
AlwaysOpen = yes;
RemovableMedia = yes;
RandomAccess = no;
AutoChanger = yes
Check Labels = yes
LabelMedia = yes
Label Type = ANSI
Alert Command = "sh -c '/usr/sbin/smartctl -H -d scsi -l error %c'"
Maximum Spool Size = 100gb
Maximum Job Spool Size = 60gb
Spool Directory = /dspool
}

Device {
Name = Drive-3
Drive Index = 3
Media Type = ULTRIUM-LTO-4b
Archive Device = /dev/tape/by-id/scsi-3500308c09d3ab004-nst
Changer Device = /dev/tape/by-id/scsi-1ADIC_A0C0048024_LLA
Device Type = Tape
AutomaticMount = yes;
AlwaysOpen = yes;
RemovableMedia = yes;
RandomAccess = no;
AutoChanger = yes
Check Labels = yes
LabelMedia = yes
Label Type = ANSI
Alert Command = "sh -c '/usr/sbin/smartctl -H -d scsi -l error %c'"
Maximum Spool Size = 100gb
Maximum Job Spool Size = 60gb
Spool Directory = /dspool
}


bareos.dir.conf:

Storage {
Name = tape
Address = gideon2.wycliffe.org
SDPort = 9103
#Maximum Concurrent Jobs = 20
Maximum Concurrent Jobs = 8
#DP Maximum Concurrent Jobs = 8
Password = "Lx7GIUfP10XOcONOypXzSTUenl86rvnmB"
Device = Autochanger0
Media Type = ULTRIUM-LTO-4
Autochanger = yes
}

Storage {
Name = tape2
Address = gideon2.wycliffe.org
SDPort = 9103
#Maximum Concurrent Jobs = 20
Maximum Concurrent Jobs = 8
#DP Maximum Concurrent Jobs = 8
Password = "Lx7GIUfP10XOcONOypXzSTUenl86rvnmB"
Device = Autochanger1
Media Type = ULTRIUM-LTO-4b
Autochanger = yes
}


If I ask for a storage status, I can get this:

Device status:
Autochanger "Autochanger0" with devices:
"Drive-0" (/dev/tape/by-id/scsi-3500308c09c552000-nst)
"Drive-1" (/dev/tape/by-id/scsi-3500308c09c552004-nst)
Autochanger "Autochanger1" with devices:
"Drive-2" (/dev/tape/by-id/scsi-3500308c09d3ab000-nst)
"Drive-3" (/dev/tape/by-id/scsi-3500308c09d3ab004-nst)

Device "Drive-0" (/dev/tape/by-id/scsi-3500308c09c552000-nst) is not open.
Drive 0 is not loaded.
==

Device "Drive-1" (/dev/tape/by-id/scsi-3500308c09c552004-nst) is not open.
Drive 1 is not loaded.
==

Device "Drive-2" (/dev/tape/by-id/scsi-3500308c09d3ab000-nst) is not open.
Drive 2 is not loaded.
==

Device "Drive-3" (/dev/tape/by-id/scsi-3500308c09d3ab004-nst) is not open.
Drive 3 is not loaded.
==
====

---> Device "Drive-2" did have a tape in it, despite what the status said.

David Pearce

unread,
Dec 29, 2015, 4:17:50 PM12/29/15
to bareos-users
More info: If I run this:
# mt -f /dev/tape/by-id/scsi-3500308c09d3ab000-nst status
SCSI 2 tape drive:
File number=0, block number=0, partition=0.
Tape block size 0 bytes. Density code 0x46 (LTO-4).
Soft error count since last status=0
General status bits on (41010000):
BOT ONLINE IM_REP_EN

Which is correct for the drive.


If I run this:
# mtx -f /dev/tape/by-id/scsi-1ADIC_A0C0057818_LLA inquiry
Product Type: Medium Changer
Vendor ID: 'ADIC '
Product ID: 'Scalar i500 '
Revision: '572G'
Attached Changer API: No

# mtx -f /dev/tape/by-id/scsi-1ADIC_A0C0048024_LLA inquiry
Product Type: Medium Changer
Vendor ID: 'ADIC '
Product ID: 'Scalar i500 '
Revision: '585G'
Attached Changer API: No

This is correct for the autochanger.

But if I try to mount a tape in that drive, I get this:
*mount
The defined Storage resources are:
1: File
2: tape
3: tape2
Select Storage resource (1-3): 3
Select Drive:
1: Drive 0
2: Drive 1
Select drive (1-2): 1
Enter autochanger slot:
Connecting to Storage daemon tape2 at gideon2.wycliffe.org:9103 ...
3999 Device "Autochanger1" not found or could not be opened.

David Pearce

unread,
Dec 29, 2015, 4:32:00 PM12/29/15
to bareos-users
Another clue that shows "Autochanger1" works sometimes:

*label barcodes
Using Catalog "MyCatalog"
The defined Autochanger Storage resources are:
1: tape
2: tape2
Select Storage resource (1-2): 2


Connecting to Storage daemon tape2 at gideon2.wycliffe.org:9103 ...

Select Drive:
1: Drive 0
2: Drive 1
Select drive (1-2): 1

Connecting to Storage daemon tape2 at gideon2.wycliffe.org:9103 ...

3306 Issuing autochanger "slots" command.
Device "Autochanger1" has 36 slots.


Connecting to Storage daemon tape2 at gideon2.wycliffe.org:9103 ...

3306 Issuing autochanger "list" command.
The following Volumes will be labeled:
Slot Volume
==============
1 WBT019
Do you want to label these Volumes? (yes|no): yes
Defined Pools:
1: Default
2: File
3: Scratch
4: Weekly
5: Daily
6: Monthly
7: blahblah-onetime
8: Manual
9: Weekly-file
10: Daily-file
11: Monthly-file
Select the Pool (1-11): 5


Connecting to Storage daemon tape2 at gideon2.wycliffe.org:9103 ...

Sending label command for Volume "WBT019" Slot 1 ...


3999 Device "Autochanger1" not found or could not be opened.

Label command failed for Volume WBT019.

Marco van Wieringen

unread,
Dec 30, 2015, 5:17:39 AM12/30/15
to bareos...@googlegroups.com
On 12/29/15 09:49 PM, David Pearce wrote:
> We've been running a single Dell ML6000 autochanger with two internal LTO-4 drives for some time. We have a second autochanger (a duplicate of the first one) attached to the same computer.
>
> Every time I have tried to make this work, I never can. If someone can guide me, I'd sure appreciate it. If I try to run a job against "tape2", I get this error message.
> Storage daemon didn't accept Device "Autochanger1" because:
> 3924 Device "Autochanger1" not in SD Device resources or no matching Media Type.
>
>
> Here are the configuration file bits:
>

I think the SD raises this error for multiple errors so it might sometime
be somewhat besides the truth some times.


>
> Autochanger {
> Name = Autochanger1
> Device = Drive-2, Drive-3
> Changer Command = "/etc/bareos/scripts/mtx-changer %c %o %S %a %d"
> Changer Device = /dev/tape/by-id/scsi-1ADIC_A0C0048024_LLA
> }
>
> Device {
> Name = Drive-2
> Drive Index = 2
This makes no sense Drive Index is per changer e.g. probably should be 0

> Media Type = ULTRIUM-LTO-4b
> Archive Device = /dev/tape/by-id/scsi-3500308c09d3ab000-nst
> Changer Device = /dev/tape/by-id/scsi-1ADIC_A0C0048024_LLA
This makes also no sense when you have it in your changer definition.

> Device Type = Tape
> AutomaticMount = yes;
> AlwaysOpen = yes;
> RemovableMedia = yes;
> RandomAccess = no;
> AutoChanger = yes
> Check Labels = yes
> LabelMedia = yes
> Label Type = ANSI
> Alert Command = "sh -c '/usr/sbin/smartctl -H -d scsi -l error %c'"
> Maximum Spool Size = 100gb
> Maximum Job Spool Size = 60gb
> Spool Directory = /dspool
> }
>
> Device {
> Name = Drive-3
> Drive Index = 3
This makes no sense Drive Index is per changer e.g. probably should be 1

> Media Type = ULTRIUM-LTO-4b
> Archive Device = /dev/tape/by-id/scsi-3500308c09d3ab004-nst
> Changer Device = /dev/tape/by-id/scsi-1ADIC_A0C0048024_LLA
This makes also no sense when you have it in your changer definition.

> Device Type = Tape
> AutomaticMount = yes;
> AlwaysOpen = yes;
> RemovableMedia = yes;
> RandomAccess = no;
> AutoChanger = yes
> Check Labels = yes
> LabelMedia = yes
> Label Type = ANSI
Are you sharing the drives that you use the ANSI labeling ?

> Alert Command = "sh -c '/usr/sbin/smartctl -H -d scsi -l error %c'"
> Maximum Spool Size = 100gb
> Maximum Job Spool Size = 60gb
> Spool Directory = /dspool
> }
>
>
>
>
> If I ask for a storage status, I can get this:
>
> Device status:
> Autochanger "Autochanger0" with devices:
> "Drive-0" (/dev/tape/by-id/scsi-3500308c09c552000-nst)
> "Drive-1" (/dev/tape/by-id/scsi-3500308c09c552004-nst)
> Autochanger "Autochanger1" with devices:
> "Drive-2" (/dev/tape/by-id/scsi-3500308c09d3ab000-nst)
> "Drive-3" (/dev/tape/by-id/scsi-3500308c09d3ab004-nst)
>
> Device "Drive-0" (/dev/tape/by-id/scsi-3500308c09c552000-nst) is not open.
> Drive 0 is not loaded.
> ==
>
> Device "Drive-1" (/dev/tape/by-id/scsi-3500308c09c552004-nst) is not open.
> Drive 1 is not loaded.
> ==
>
> Device "Drive-2" (/dev/tape/by-id/scsi-3500308c09d3ab000-nst) is not open.
> Drive 2 is not loaded.
> ==
>
> Device "Drive-3" (/dev/tape/by-id/scsi-3500308c09d3ab004-nst) is not open.
> Drive 3 is not loaded.
> ==
> ====
>
> ---> Device "Drive-2" did have a tape in it, despite what the status said.
>
That is for sure the problem with the drive index as you ask the library for
the content of drive index 2 e.g. the 3th drive which it probably doesn't have.

--
Marco van Wieringen marco.van...@bareos.com
Bareos GmbH & Co. KG Phone: +49-221-63069389
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, M. Außendorf, J. Steffens,
P. Storz, M. v. Wieringen

David Pearce

unread,
Dec 30, 2015, 9:47:36 AM12/30/15
to bareos-users
Thanks Marco. I fixed the drive index numbers.

I am still getting this error message:

orlbareos-dir JobId 195739: Fatal error:

Storage daemon didn't accept Device "Autochanger1" because:
3924 Device "Autochanger1" not in SD Device resources or no matching Media Type.

I tracked it down to reserve.c line 368 with this comment:

/*
* If we get here, there are no suitable devices available, which
* means nothing configured. If a device is suitable but busy
* with another Volume, we will not come here.
*/

As far as I know Autochanger1 is configured:

Autochanger {
Name = Autochanger1
Device = Drive-2, Drive-3
Changer Command = "/etc/bareos/scripts/mtx-changer %c %o %S %a %d"
Changer Device = /dev/tape/by-id/scsi-1ADIC_A0C0048024_LLA
}

What can I try?

David Pearce

unread,
Dec 30, 2015, 10:04:39 AM12/30/15
to bareos-users
In the "Device" documentation, I found this line:

Changer Device = <Strname>

The specified name-string must be the generic SCSI device name of the autochanger that corresponds to the normal read/write Archive Device specified in the Device resource. This generic SCSI device name should be specified if you have an autochanger or if you have a standard tape drive and want to use the Alert Command (see below). For example, on Linux systems, for an Archive Device name of /dev/nst0, you would specify /dev/sg0 for the Changer Device name.

I'm not using the generic name but what the fellow before me was using:
/dev/tape/by-id/scsi-3500308c09d3ab000-nst

I will try the "generic" name when some backups finish.

Marco van Wieringen

unread,
Dec 30, 2015, 10:50:22 AM12/30/15
to bareos...@googlegroups.com
As always you can try running the SD with debug level 150 or higher.
The reservation logic logs what it does at level 150. So if you run
bareos-sd -f -d 200 you should get quite some stuff that you can
try pinpointing to the reservation flow done in src/stored/reservation.c

b.t.w. don't bother posting that stuff here as unless you have a clear
smoking gun I'm not going to look at it.

I'm still not sure if you get bitten by the ANSI labels and check labels
not so sure that is a often used code path as most people don't use ANSI
labels as they only make sense when you share volumes with other backup
products as ANSI is the label format used by IBM.

David Pearce

unread,
Dec 30, 2015, 11:32:51 AM12/30/15
to bareos-users
Thanks for the great leads.

We're not using these tapes between applications. We used to run Bacula and Bareos in parallel. Maybe that is why we're using it.

If I drop the ANSI labeling from the configs, any chance of screwing up the restore of data from the ANSI labeled tapes?

David Pearce

unread,
Dec 30, 2015, 12:11:54 PM12/30/15
to bareos-users
Yipeeeee!

I ran bareos-sd with debugging and this message jumped out at me:

orlbacula-sd: reserve.c:628-0 chk MediaType device=ULTRIUM-LTO-4b request=ULTRIUM-LTO-4

I had been lead to believe that "Media Type" needed to be unique between two autochangers and that the actual value was arbitrary. So I used "ULTRIUM-LTO-4" on the working autochanger and "ULTRIUM-LTO-4b" on the second (non-working) autochanger.

I changed the bareos-sd.conf to use the same media type and now it works!

(pause)

Maybe I am celebrating too early. From the docs:

If you have an autochanger, you might want to name the Media Type in a way that is unique to the autochanger, unless you wish to possibly use the Volumes in other drives. You should also ensure to have unique Media Type names if the Media is not compatible between drives. This specification is required for all devices.

Marco van Wieringen

unread,
Dec 30, 2015, 12:29:13 PM12/30/15
to bareos...@googlegroups.com
Nope, check labels will try both types. And even when you disable that it
looks into the database what type of label was used on the volume. I wouldn't
use ANSI labels myself if not needed but it seems they were not part of your
actual problem.

Marco van Wieringen

unread,
Dec 30, 2015, 12:35:06 PM12/30/15
to bareos...@googlegroups.com
Yes you need two different types as by using one media type Bareos thinks
it can stick a volume that is in one storage into an other. At least we
have seen that go wrong on file based storage. I think your biggest challenge
is finding out why it tries reserving the wrong Media Type. I guess you did
make separate volumes and pools for the second changer, you should really never
put volumes of different storage into the same pool or you will be in for some
nasty surprises. Due to physical limitations you need to make sure that both
storages are fully independent as of course it cannot stick a volume physically
in one autochanger into a drive in the other.

David Pearce

unread,
Dec 30, 2015, 1:47:15 PM12/30/15
to bareos-users
I think you just hit the nail on the head. I have been trying to use the same volumes and pools in both changers and just changing the "Storage" parm in the Job definition.

My goal was to take our one autoloader that was handling daily (incremental), weekly (differential) and monthly (full) pools and move the daily backups to the second autoloader. This would allow me to stuff all of the daily tapes into one autoloader and never touch it again.

Please forgive my ignorance. I really am trying to understand how this works.

If I start a job where is species the "Daily" pool, Bareos won't search both autoloaders and a suitable "Daily" pool tape?

Marco van Wieringen

unread,
Dec 30, 2015, 2:23:39 PM12/30/15
to bareos...@googlegroups.com
I think you miss the fact that a certain volume is of a certain Media Type
in the catalog too so it will try using that Media Type on the wrong storage that
would explain the problem you saw before e.g. it using the wrong Media Type. You
might be able to get this to work but I guess its just asking for problems. Why
not just create a new pool for this autoloader and use the various pool overrides
you can do everywhere like in the run cmdline/schedule. So if you are physically
moving volumes from one library to an other you have to update the Media Type
in the catalog.

I guess I have given you now enough hints, back to my "holiday" mode again.

David Pearce

unread,
Dec 30, 2015, 3:18:49 PM12/30/15
to bareos-users
Macro, thanks for all of your help. I could not have done it without you.

Right now I have one pool dedicated to the new autoloader. I used the "Storage" parm in the pool definition to specify where to look for the volumes.

All of the other pools should use the first autoloader as before.

Hopefully this all works.

Reply all
Reply to author
Forward
0 new messages