I have a CentOS 5 system, running Bacula-2.2.4 with MySQL database, and
Exabyte VXA-320 tape drive 1x10 1U autoloader.
I have a pool called "cycle", with a few tapes, and max volume duration
setting of 35 days. So, after this time expires, the previous tape will be
marked "used" although not full yet, and the oldest tape in the pool will be
recycled.
However, the new tape won't be mounted properly, after the old tape had
expired. This is what happens:
=====
01-Nov 01:05 dogbert-dir: Start Backup JobId 215,
Job=Backup-Dogbert.2007-11-01_01.05.00
01-Nov 01:05 dogbert-dir: Max configured use duration exceeded. Marking
Volume "CYCL-004" as Used.
01-Nov 01:05 dogbert-dir: Recycled volume "CYCL-001"
01-Nov 01:05 dogbert-dir: Using Device "VXA320"
01-Nov 01:05 dogbert-sd: 3301 Issuing autochanger "loaded? drive 0" command.
01-Nov 01:05 dogbert-sd: 3302 Autochanger "loaded? drive 0", result is Slot
4.
01-Nov 01:05 dogbert-sd: 3307 Issuing autochanger "unload slot 4, drive 0"
command.
01-Nov 01:05 dogbert-sd: 3304 Issuing autochanger "load slot 1, drive 0"
command.
01-Nov 01:06 dogbert-sd: 3305 Autochanger "load slot 1, drive 0", status is
OK.
01-Nov 01:06 dogbert-sd: 3301 Issuing autochanger "loaded? drive 0" command.
01-Nov 01:06 dogbert-sd: 3302 Autochanger "loaded? drive 0", result is Slot
1.
01-Nov 01:06 dogbert-sd: Backup-Dogbert.2007-11-01_01.05.00 Error:
block.c:990 Read error on fd=6 at file:blk 0:0 on device "VXA320"
(/dev/nst0). ERR=Input/output error.
01-Nov 01:06 dogbert-sd: 3301 Issuing autochanger "loaded? drive 0" command.
01-Nov 01:06 dogbert-sd: 3302 Autochanger "loaded? drive 0", result is Slot
1.
01-Nov 01:06 dogbert-sd: 3301 Issuing autochanger "loaded? drive 0" command.
01-Nov 01:06 dogbert-sd: 3302 Autochanger "loaded? drive 0", result is Slot
1.
01-Nov 01:06 dogbert-sd: Backup-Dogbert.2007-11-01_01.05.00 Error:
block.c:990 Read error on fd=6 at file:blk 0:0 on device "VXA320"
(/dev/nst0). ERR=Input/output error.
01-Nov 01:06 dogbert-sd: 3301 Issuing autochanger "loaded? drive 0" command.
01-Nov 01:06 dogbert-sd: 3302 Autochanger "loaded? drive 0", result is Slot
1.
01-Nov 01:06 dogbert-sd: 3301 Issuing autochanger "loaded? drive 0" command.
01-Nov 01:06 dogbert-sd: 3302 Autochanger "loaded? drive 0", result is Slot
1.
01-Nov 01:06 dogbert-sd: Backup-Dogbert.2007-11-01_01.05.00 Error:
block.c:990 Read error on fd=6 at file:blk 0:0 on device "VXA320"
(/dev/nst0). ERR=Input/output error.
01-Nov 01:06 dogbert-sd: 3301 Issuing autochanger "loaded? drive 0" command.
01-Nov 01:06 dogbert-sd: 3302 Autochanger "loaded? drive 0", result is Slot
1.
01-Nov 01:06 dogbert-sd: 3301 Issuing autochanger "loaded? drive 0" command.
01-Nov 01:06 dogbert-sd: 3302 Autochanger "loaded? drive 0", result is Slot
1.
01-Nov 01:06 dogbert-sd: Backup-Dogbert.2007-11-01_01.05.00 Error:
block.c:990 Read error on fd=6 at file:blk 0:0 on device "VXA320"
(/dev/nst0). ERR=Input/output error.
01-Nov 01:06 dogbert-sd: 3301 Issuing autochanger "loaded? drive 0" command.
01-Nov 01:06 dogbert-sd: 3302 Autochanger "loaded? drive 0", result is Slot
1.
01-Nov 01:06 dogbert-sd: 3301 Issuing autochanger "loaded? drive 0" command.
01-Nov 01:06 dogbert-sd: 3302 Autochanger "loaded? drive 0", result is Slot
1.
01-Nov 01:06 dogbert-sd: Backup-Dogbert.2007-11-01_01.05.00 Error:
block.c:990 Read error on fd=6 at file:blk 0:0 on device "VXA320"
(/dev/nst0). ERR=Input/output error.
01-Nov 01:06 dogbert-sd: Please mount Volume "CYCL-001" or label a new one
for:
Job: Backup-Dogbert.2007-11-01_01.05.00
Storage: "VXA320" (/dev/nst0)
Pool: Cycle
Media type: VXA3
01-Nov 02:06 dogbert-sd: Please mount Volume "CYCL-001" or label a new one
for:
Job: Backup-Dogbert.2007-11-01_01.05.00
Storage: "VXA320" (/dev/nst0)
Pool: Cycle
Media type: VXA3
01-Nov 04:05 dogbert-dir: Backup-Dogbert.2007-11-01_01.05.00 Fatal error:
Max wait time exceeded. Job canceled.
=====
Trying to start the job another time manually results in a similar
situation.
Mount- command from the bconsole (before the job is cancelled) repetitively
results in:
=====
01-Nov 15:58 dogbert-sd: 3301 Issuing autochanger "loaded? drive 0" command.
01-Nov 15:58 dogbert-sd: 3302 Autochanger "loaded? drive 0", result is Slot
1.
01-Nov 15:58 dogbert-sd: 3301 Issuing autochanger "loaded? drive 0" command.
01-Nov 15:58 dogbert-sd: 3302 Autochanger "loaded? drive 0", result is Slot
1.
01-Nov 15:58 dogbert-sd: Backup-Dogbert.2007-11-01_15.53.16 Error:
block.c:990 Read error on fd=6 at file:blk 0:0 on device "VXA320"
(/dev/nst0). ERR=Input/output error.
01-Nov 15:58 dogbert-sd: Please mount Volume "CYCL-001" or label a new one
for:
Job: Backup-Dogbert.2007-11-01_15.53.16
Storage: "VXA320" (/dev/nst0)
Pool: Cycle
Media type: VXA3
=====
Finally, typing commands
- release
- mount
makes the tape usable to bacula.
This has happened now at least 3 times, when the tape has expired. But I've
seen no problem running backups to other pools meanwhile, which requires the
autoloader to change tapes anyway.
I have an idea that this may have started after I changed
AlwaysOpen = yes;
to
AlwaysOpen = no;
in sd conf a few months ago. But it was really necessary, since I don't want
to have tapes being mounted all the time (a couple of sudden power losses
have ruined unnecessarily mounted tapes before)
However, I do have this line in sd conf:
AutomaticMount = yes;
Any ideas what is causing this / how to make things run more smoothly?
This is unfortunately slow to debug, since the problem appears about once in
a month...
==========
#
# Default Bacula Storage Daemon Configuration file
#
Storage { # definition of myself
Name = dogbert-sd
SDPort = 9103 # Director's port
WorkingDirectory = "/var/lib/bacula"
Pid Directory = "/var/run"
Maximum Concurrent Jobs = 20
}
Director {
Name = dogbert-dir
Password = xxxxxxxxxx
}
Director {
Name = dogbert-mon
Password = xxxxxxxxxxx
Monitor = yes
}
Autochanger {
Name = "Exabyte Autoloader"
Device = VXA320
Changer Command = "/etc/bacula/mtx-changer %c %o %S %a %d"
Changer Device = /dev/sg2
}
Device {
Name = "VXA320"
# Drive Index = 0
Media Type = VXA3
Archive Device = /dev/nst0 # Normal archive device
AutomaticMount = yes; # when device opened, read it
# AlwaysOpen = yes; # dropped 2007-08-27
AlwaysOpen = no;
RemovableMedia = yes;
LabelMedia = no;
Autochanger = yes;
# Enable the Alert command only if you have the mtx package loaded
Alert Command = "sh -c 'tapeinfo -f %c |grep TapeAlert|cat'"
}
Messages {
Name = Standard
director = dogbert-dir = all
}
==========
#
# Default Bacula Director Configuration file
#
Director {
Name = dogbert-dir
DIRport = 9101 # where we listen for UA connections
QueryFile = "/etc/bacula/query.sql"
WorkingDirectory = "/var/lib/bacula"
PidDirectory = "/var/run"
Maximum Concurrent Jobs = 1
Password = xxxxxxxxxxxx
Messages = Daemon
}
JobDefs {
Name = "DefaultJob"
Type = Backup
Level = Full
Storage = "Exabyte Autoloader"
Messages = Standard
Pool = Default
Priority = 10
Max Start Delay = 3 hours
Max Run Time = 3 hours
Max Wait Time = 3 hours
}
Job {
Name = "Backup-Dogbert"
JobDefs = "DefaultJob"
Client = dogbert-fd
FileSet = "FullSet-Dogbert"
Schedule = "WeeklyCycle"
Write Bootstrap = "/var/lib/bacula/dogbert.bsr"
RunAfterJob = "/etc/bacula/after_dogbert"
}
Job {
Name = "Backup-Dilbert"
JobDefs = "DefaultJob"
Client = dilbert-fd
FileSet = "FullSet-Dilbert"
Schedule = "WeeklyCycle"
WriteBootstrap = "/var/lib/bacula/dilbert.bsr"
}
Job {
Name = "Backup-Catbert"
JobDefs = "DefaultJob"
Client = catbert-fd
FileSet = "FullSet-Catbert"
Schedule = "ManualSchedule"
WriteBootstrap = "/var/lib/bacula/catbert.bsr"
}
Job {
Name = "Backup-Catalog"
JobDefs = "DefaultJob"
Client = dogbert-fd
FileSet="Catalog"
Schedule = "CatalogSchedule"
# This creates an ASCII copy of the catalog
RunBeforeJob = "/etc/bacula/make_catalog_backup bacula bacula"
# This deletes the copy of the catalog
#RunAfterJob = "/etc/bacula/delete_catalog_backup"
RunAfterJob = "/etc/bacula/after_catalog"
Write Bootstrap = "/var/lib/bacula/catalog.bsr"
Priority = 11 # run after main backup
}
Job {
Name = "RestoreFiles"
Type = Restore
Client=dogbert-fd
FileSet="FullSet-Dogbert"
Storage = "Exabyte Autoloader"
Pool = Default
Messages = Standard
Where = /tmp/bacula-restores
}
FileSet {
Name = "FullSet-Dogbert"
Include {
Options {
signature = MD5
aclsupport = yes
}
File = /
File = /boot
File = /home
File = /var
File = /samba
}
Exclude {
File = /proc
File = /tmp/000
File = /.journal
File = /.autofsck
File = /.autorelabel
}
}
FileSet {
Name = "FullSet-Dilbert"
Include {
Options {
signature = MD5
}
File = /
File = /boot
File = /home
File = /var
}
Exclude {
File = /proc
File = /tmp/000
File = /.journal
File = /.autofsck
File = /.autorelabel
}
}
FileSet {
Name = "FullSet-Catbert"
Include {
Options {
signature = MD5
}
File = C:/
}
}
FileSet {
Name = "Catalog"
Include {
Options {
signature = MD5
}
File = /var/lib/bacula/bacula.sql
}
Include {
Options {
signature = MD5
wildfile = "*.bsr"
}
Options {
exclude = yes
wildfile = "*"
}
File = /var/lib/bacula
}
}
#
# When to do the backups
Schedule {
Name = "ManualSchedule"
# Run = Never
}
Schedule {
Name = "WeeklyCycle"
Run = Pool=Cycle Level=Full on 1 at 01:05
Run = Pool=Cycle Level=Differential 2-31 tue thu sat at 01:05
}
Schedule {
Name = "CatalogSchedule"
Run = Pool=Cycle on 1 at 01:10
Run = Pool=Cycle 2-31 tue thu sat at 01:10
}
Client {
Name = dogbert-fd
Address = dogbert
FDPort = 9102
Catalog = MyCatalog
Password = xxxxxxxxxxxxx
File Retention = 5 years
Job Retention = 5 years
AutoPrune = yes # Prune expired Jobs/Files
}
Client {
Name = dilbert-fd
Address = dilbert
FDPort = 9102
Catalog = MyCatalog
Password = xxxxxxxxxxx
File Retention = 5 years
Job Retention = 5 years
AutoPrune = yes # Prune expired Jobs/Files
}
Client {
Name = catbert-fd
Address = catbert
FDPort = 9102
Catalog = MyCatalog
Password = xxxxxxxxx
File Retention = 5 years
Job Retention = 5 years
AutoPrune = yes # Prune expired Jobs/Files
}
Storage {
Name = "Exabyte Autoloader"
Address = dogbert # N.B. Use a fully qualified name here
SDPort = 9103
Password = xxxxxxxxx
Device = "Exabyte Autoloader"
MediaType = VXA3
AutoChanger = yes
}
Catalog {
Name = MyCatalog
dbname = bacula; user = bacula; password = xxxxxxxx
}
Messages {
Name = Standard
mailcommand = "/usr/sbin/bsmtp -h localhost -f \"\(Bacula\) %r\" -s
\"Bacula: %t %e of %c %l\" %r"
operatorcommand = "/usr/sbin/bsmtp -h localhost -f \"\(Bacula\) %r\" -s
\"Bacula: Intervention needed for %j\" %r"
mail = [EMAIL PROTECTED] = all, !skipped
operator = [EMAIL PROTECTED] = mount
console = all, !skipped, !saved
append = "/var/log/bacula/log" = all, !skipped
}
Messages {
Name = Daemon
mailcommand = "/usr/sbin/bsmtp -h localhost -f \"\(Bacula\) %r\" -s
\"Bacula daemon message\" %r"
mail = [EMAIL PROTECTED] = all, !skipped
console = all, !skipped, !saved
append = "/var/log/bacula/log" = all, !skipped
}
Pool {
Name = Default
Pool Type = Backup
Recycle = yes # Bacula can automatically recycle
Volumes
AutoPrune = yes # Prune expired volumes
Volume Retention = 90 days
Volume Use Duration = 35 days
# Accept Any Volume = yes # write on any volume in the pool
}
Pool {
Name = Cycle
Pool Type = Backup
Recycle = yes # Bacula can automatically recycle
Volumes
AutoPrune = yes # Prune expired volumes
Volume Retention = 90 days
Volume Use Duration = 35 days
# Accept Any Volume = yes # write on any volume in the pool
}
Pool {
Name = Archive
Pool Type = Backup
Recycle = no # Bacula can automatically recycle
Volumes
AutoPrune = yes # Prune expired volumes
Volume Retention = 5 years
Volume Use Duration = 90 days
# Accept Any Volume = yes # write on any volume in the pool
}
Console {
Name = dogbert-mon
Password = xxxxxxxxxxxxxx
CommandACL = status, .status
}
-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems? Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
Bacula-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bacula-users