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.
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.
*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.
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?
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?
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?
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.