Bacula-users

[Bacula-users] Per device Maximum Concurrent Jobs

2012-01-04 11:21:48
Subject: [Bacula-users] Per device Maximum Concurrent Jobs
From: Josh Fisher <jfisher AT pvct DOT com>
To: bacula-users <bacula-users AT lists.sourceforge DOT net>
Date: Wed, 04 Jan 2012 11:19:51 -0500
I'm having a bit of trouble understanding what is causing the below two 
jobs to fail. Job 25915 is a virtual full backup, job 25919 is a normal 
full backup. Both jobs are writing to a two drive autochanger. The 
virtual full job is writing to drive 0 and reading from drive 1. The 
normal full wants to write to drive 1, but since drive 1 is in use when 
it starts it blocks waiting for the drive to become available. That is 
as I would expect, but when the the virtual full unloads drive 1 to load 
the next needed volume, the normal full job wakes up and decides to load 
drive 1 with the volume it wants to use at the same time the virtual 
full job is loading its next tape. This I do not expect, particularly 
since the two drives both have  MaximumConcurrentJobs = 1 in 
bacula-sd.conf. Am I missing something, or is this a potential race 
condition bug?

#====  excerpt from log for job 25915

03-Jan 17:04 s3-dir JobId 25915: Start Virtual Backup JobId 25915, 
Job=josh.2012-01-03_17.04.27_54
03-Jan 17:04 s3-dir JobId 25915: Bootstrap records written to 
/var/spool/bacula/s3-dir.restore.17.bsr
03-Jan 17:05 s3-dir JobId 25915: Recycled volume "vchanger1_0004_0017"
03-Jan 17:05 s3-dir JobId 25915: Using Volume "vchanger1_0004_0017" from 
'Scratch' pool.
03-Jan 17:05 s3-dir JobId 25915: Using Device "usb-changer-1-drive-0"
03-Jan 17:05 s3-sd JobId 25915: 3307 Issuing autochanger "unload slot 116, 
drive 1" command.
03-Jan 17:05 s3-sd JobId 25915: 3304 Issuing autochanger "load slot 189, drive 
1" command.
03-Jan 17:05 s3-sd JobId 25915: 3305 Autochanger "load slot 189, drive 1", 
status is OK.
03-Jan 17:05 s3-sd JobId 25915: Ready to read from volume "vchanger1_0005_0039" 
on device "usb-changer-1-drive-1" (/var/spool/bacula/vchanger1/1/drive1).
03-Jan 17:05 s3-sd JobId 25915: 3307 Issuing autochanger "unload slot 33, drive 
0" command.
03-Jan 17:05 s3-sd JobId 25915: 3304 Issuing autochanger "load slot 117, drive 
0" command.
03-Jan 17:05 s3-sd JobId 25915: 3305 Autochanger "load slot 117, drive 0", 
status is OK.
03-Jan 17:05 s3-sd JobId 25915: Recycled volume "vchanger1_0004_0017" on device 
"usb-changer-1-drive-0" (/var/spool/bacula/vchanger1/0/drive0), all previous 
data lost.
03-Jan 17:05 s3-dir JobId 25915: Max Volume jobs=1 exceeded. Marking Volume 
"vchanger1_0004_0017" as Used.
03-Jan 17:05 s3-sd JobId 25915: Forward spacing Volume "vchanger1_0005_0039" 
tofile:block  0:213.
03-Jan 17:30 s3-sd JobId 25915: End of Volume at file 5 on device 
"usb-changer-1-drive-1" (/var/spool/bacula/vchanger1/1/drive1), Volume 
"vchanger1_0005_0039"
03-Jan 17:30 s3-sd JobId 25915: 3307 Issuing autochanger "unload slot 189, 
drive 1" command.
03-Jan 17:30 s3-sd JobId 25915: 3304 Issuing autochanger "load slot 27, drive 
1" command.
03-Jan 17:30 s3-sd JobId 25915: 3305 Autochanger "load slot 27, drive 1", 
status is OK.
03-Jan 17:30 s3-sd JobId 25915: Ready to read from volume "vchanger1_0003_0027" 
on device "usb-changer-1-drive-1" (/var/spool/bacula/vchanger1/1/drive1).
03-Jan 17:30 s3-sd JobId 25915: Forward spacing Volume "vchanger1_0003_0027" 
tofile:block  0:209.
03-Jan 17:30 s3-sd JobId 25915: End of Volume at file 0 on device 
"usb-changer-1-drive-1" (/var/spool/bacula/vchanger1/1/drive1), Volume 
"vchanger1_0003_0027"
03-Jan 17:30 s3-sd JobId 25915: Fatal error: acquire.c:72 Acquire read: 
num_writers=1 not zero. Job 25915 canceled.
03-Jan 17:30 s3-sd JobId 25915: Fatal error: mount.c:865 Cannot open 
Dev="usb-changer-1-drive-1" (/var/spool/bacula/vchanger1/1/drive1), 
Vol=vchanger1_0003_0027

#==== excerpt from log for job 25919

03-Jan 17:07 s3-dir JobId 25919: Start Backup JobId 25919, 
Job=access.2012-01-03_17.07.09_58
03-Jan 17:30 s3-dir JobId 25919: Recycled volume "vchanger1_0004_0018"
03-Jan 17:30 s3-dir JobId 25919: Using Volume "vchanger1_0004_0018" from 
'Scratch' pool.
03-Jan 17:30 s3-dir JobId 25919: Using Device "usb-changer-1-drive-1"
03-Jan 17:30 access-fd JobId 25919: shell command: run ClientRunBeforeJob 
"/usr/libexec/bacula/bacula_before"
03-Jan 17:30 s3-sd JobId 25919: 3307 Issuing autochanger "unload slot 27, drive 
1" command.
03-Jan 17:30 s3-sd JobId 25919: 3304 Issuing autochanger "load slot 118, drive 
1" command.
03-Jan 17:30 s3-sd JobId 25919: 3305 Autochanger "load slot 118, drive 1", 
status is OK.
03-Jan 17:30 s3-sd JobId 25919: Recycled volume "vchanger1_0004_0018" on device 
"usb-changer-1-drive-1" (/var/spool/bacula/vchanger1/1/drive1), all previous 
data lost.
03-Jan 17:30 s3-dir JobId 25919: Max Volume jobs=1 exceeded. Marking Volume 
"vchanger1_0004_0018" as Used.
03-Jan 17:30 s3-sd JobId 25919: Fatal error: block.c:439 Attempt to write on 
read-only Volume. dev="usb-changer-1-drive-1" 
(/var/spool/bacula/vchanger1/1/drive1)

#====  Configuration Files

# bacula-dir.conf
Storage {
   Name = USBChanger1
   Address = 192.168.1.7
   SDPort = 9103
   Password = "whatever"
   Device = usb-changer-1
   Media Type = File
   Autochanger = yes;
   Maximum Concurrent Jobs = 2
}
#==== end of bacula-dir.conf

# bacula-sd.conf
Autochanger {
   Name = usb-changer-1
   Device = usb-changer-1-drive-0,usb-changer-1-drive-1
   Changer Command = "/usr/local/bin/vchanger %c %o %S %a %d"
   Changer Device = "/etc/bacula/vchanger1.conf"
}

Device {
   Name = usb-changer-1-drive-0
   Drive Index = 0
   Autochanger = yes;
   Device Type = File
   Media Type = File
   Removable Media = no;
   Random Access = yes;
   Maximum Concurrent Jobs = 1
   Archive Device = "/var/spool/bacula/vchanger1/0/drive0"
   SpoolDirectory = /tmp/bacula/usb-changer-1-drive-0
}

Device {
   Name = usb-changer-1-drive-1
   Drive Index = 1
   Autochanger = yes;
   Device Type = File
   Media Type = File
   Removable Media = no;
   Random Access = yes;
   Maximum Concurrent Jobs = 1
   Archive Device = "/var/spool/bacula/vchanger1/1/drive1"
   SpoolDirectory = /tmp/bacula/usb-changer-1-drive-1
}
#==== end of bacula-sd.conf



------------------------------------------------------------------------------
Ridiculously easy VDI. With Citrix VDI-in-a-Box, you don't need a complex
infrastructure or vast IT resources to deliver seamless, secure access to
virtual desktops. With this all-in-one solution, easily deploy virtual 
desktops for less than the cost of PCs and save 60% on VDI infrastructure 
costs. Try it free! http://p.sf.net/sfu/Citrix-VDIinabox
_______________________________________________
Bacula-users mailing list
Bacula-users AT lists.sourceforge DOT net
https://lists.sourceforge.net/lists/listinfo/bacula-users

<Prev in Thread] Current Thread [Next in Thread>
  • [Bacula-users] Per device Maximum Concurrent Jobs, Josh Fisher <=