I have ready through all of the mail archives about autochanger
problems, but am still beating my head against an autochanger
problem.  Bacula is failing to realize it has the ability to
change tapes.  This is my first 1.38 install.  I have 3 other
1.36 installs working fine.  The syntax of the sd config files
changed slightly, so I'm guessing that's where I've gone wrong.

What works:
mtx commands on the command line
btape autochanger tests
label barcodes (even this worked just fine!)
jobs that don't require loading or unloading a tape

What doesn't work:
running any job that requires a tape other than what is
currently in the drive

I have tried changing permissions on the running daemons, but
I don't think that is the issue since "label barcodes" has
no problems.

My only hint is that the mtx.log file never shows anything
running a "list" command, only "loaded" commands.  It may not
know it has the tape because it never checks for a list, but I
don't know what would control that.  I would appreciate any help
anyone can offer.

This is on Fedora 4, and a Spectralogic 2K AIT-4 loader.


Here is the normal job log (for as far as it gets) with no tape loaded
in the drive:

27-Apr 16:26 nara-dir: Start Backup JobId 19, Job=nara_config_week_1.2006-04-27_16.26.00
27-Apr 16:26 nara-sd: 3301 Issuing autochanger "loaded drive 0" command.
27-Apr 16:26 nara-sd: 3302 Autochanger "loaded drive 0", result: nothing loaded.
27-Apr 16:26 nara-sd: 3301 Issuing autochanger "loaded drive 0" command.
27-Apr 16:26 nara-sd: 3302 Autochanger "loaded drive 0", result: nothing loaded.
27-Apr 16:26 nara-sd: Please mount Volume "BU6115" on Storage Device "Drive-0" (/dev/nst0) for Job nara_config_week_1.2006-04-27_16.26.00


Here is the mtx.log file:
20060427-16:25:46 Parms: /dev/sg0 loaded 0 /dev/nst0 0
20060427-16:25:46 Doing mtx -f /dev/sg0 0 -- to find what is loaded
20060427-16:26:00 Parms: /dev/sg0 loaded 0 /dev/nst0 0
20060427-16:26:00 Doing mtx -f /dev/sg0 0 -- to find what is loaded
20060427-16:26:00 Parms: /dev/sg0 loaded 0 /dev/nst0 0
20060427-16:26:00 Doing mtx -f /dev/sg0 0 -- to find what is loaded



Bacula should know that it can load the tape it is asking for.
(This was run as the bacula user.)

-bash-3.00$ /etc/bacula/mtx-changer /dev/sg0 list
1:BU6101
2:BU6102
3:BU6103
4:BU6104
5:BU6105
6:BU6106
7:BU6107
8:BU6108
9:BU6109
10:BU6110
11:BU6111
12:BU6112
13:BU6113
14:BU6114
15:BU6115



Here is my sd config:

Autochanger {
  Name = Autochanger
  Device = Drive-0
  Changer Command = "/etc/bacula/mtx-changer %c %o %S %a %d"
  Changer Device = /dev/sg0
}

Device {
  Name = Drive-0
  Drive Index = 0
  Media Type = AIT4
  Archive Device = /dev/nst0
  AutomaticMount = yes;
  AlwaysOpen = no;
  RemovableMedia = yes;
  Maximum Changer Wait = 600
  Backward Space Record = 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'"
}



Here is my dir config:

Storage {
  Name = "Autochanger"
  Address = nara                # N.B. Use a fully qualified name here
  SDPort = 9103
  Password = "[...]"
  Device = Autochanger
  Autochanger = yes
  MediaType = "AIT4"
}


Jobs are set to use Storage = "Autochanger".

Permissions on the running processes (I have also tried running the dir
as root):

root 7290 1 0 16:42 ? 00:00:00 /usr/sbin/bacula-fd -u root -g bacula -c /etc/bacula/bacula-fd.conf root 7304 1 0 16:42 ? 00:00:00 /usr/sbin/bacula-sd -u root -g disk -c /etc/bacula/bacula-sd.conf bacula 7329 1 0 16:42 ? 00:00:00 /usr/sbin/bacula-dir -u bacula -g bacula -c /etc/bacula/bacula-dir.conf


Permissions on key files:

basic [EMAIL PROTECTED] bacula]$ ls -la /dev/sg0 /dev/nst0 /etc/bacula/mtx-changer /usr/sbin/mtx
crw-rw----  1 bacula bacula  9, 128 Apr 25 14:35 /dev/nst0
crw-------  1 bacula bacula 21,   0 Apr 25 14:35 /dev/sg0
-rwxr-xr-x  1 root   disk      4854 Apr 27 16:42 /etc/bacula/mtx-changer
-rwxr-xr-x  1 root   root     20480 Mar  7  2005 /usr/sbin/mtx


Greg


A "-d 300" log for the above job follows.


nara-dir: job.c:171 =====Start Job=========
nara-dir: job.c:663 Created FileSet Config Set record 1
nara-dir: fd_cmds.c:187 Level=F last start time=
nara-dir: util.c:535 edit_job_codes: /etc/bacula/wbweekcheck 1 2
nara-dir: backup.c:152 JobId=19 JobLevel=F
nara-dir: backup.c:164 Open connection with storage daemon
nara-dir: msgchan.c:78 bnet_connect to Storage daemon nara:9103
nara-dir: bnet.c:781 Current host[ipv4:127.0.0.1:9103] All 
host[ipv4:127.0.0.1:9103]
nara-dir: bnet.c:1128 who=Storage daemon host=nara port=9103
nara-dir: cram-md5.c:97 cram-get: auth cram-md5 <[EMAIL PROTECTED]> ssl=0
nara-dir: cram-md5.c:114 sending resp to challenge: /kxQt6/9G4hMP61Kay+qhC
nara-dir: cram-md5.c:52 send: auth cram-md5 <[EMAIL PROTECTED]> ssl=0
nara-dir: cram-md5.c:68 Authenticate OK Bz9m5hA8w9/VJghq6C/ZhA
nara-dir: authenticate.c:129 >stored: 1000 OK auth
nara-dir: authenticate.c:136 <stored: 3000 OK Hello
nara-dir: msgchan.c:165 >stored: JobId=19 job=nara_config_week_1.2006-04-27_16.26.00 job_name=naraconfigweek1 client_name=nara-fd type=66 level=70 FileSet=ConfigSet NoAttr=0 SpoolAttr=0 FileSetMD5=09dGrRMZj2Iofm8Lv0/bEA SpoolData=0 WritePartAfterJob=0 PreferMountedVols=1

nara-dir: msgchan.c:167 <stored: 3000 OK Job SDid=1 SDtime=1146180354 Authorization=HPAN-FIHA-JPHD-NKLE-KMKM-LDHI-BACC-DDAG
nara-dir: msgchan.c:175 sd_auth_key=HPAN-FIHA-JPHD-NKLE-KMKM-LDHI-BACC-DDAG
nara-dir: msgchan.c:244 >stored: use device=Autochanger
nara-dir: catreq.c:105 catreq CatReq Job=nara_config_week_1.2006-04-27_16.26.00 FindMedia=1 pool_name=ConfigWeek1 media_type=AIT4
nara-dir: next_vol.c:49 CatReq FindMedia: PoolId=4, MediaType=AIT4
nara-dir: next_vol.c:65 catreq after find_next_vol ok=0 FW=0
nara-dir: next_vol.c:72 find_recycled_volume 0 FW=0
nara-dir: recycle.c:76 Enter recycle_oldest_purged_volume
nara-dir: recycle.c:94 Oldest mediaid=0
nara-dir: recycle.c:106 return 0  recycle_oldest_purged_volume end
nara-dir: recycle.c:76 Enter recycle_oldest_purged_volume
nara-dir: recycle.c:94 Oldest mediaid=0
nara-dir: recycle.c:106 return 0  recycle_oldest_purged_volume end
nara-dir: next_vol.c:65 catreq after find_next_vol ok=1 FW=0
nara-dir: next_vol.c:145 VolJobs=0 FirstWritten=0
nara-dir: catreq.c:84 Vol Info for nara_config_week_1.2006-04-27_16.26.00: 1000 OK VolName=BU6115 VolJobs=0 VolFiles=0 VolBlocks=0 VolBytes=1 VolMounts=0 VolErrors=0 VolWrites=0 MaxVolBytes=0 VolCapacityBytes=0 VolStatus=Append Slot=15 MaxVolJobs=0 MaxVolFiles=0 InChanger=0 VolReadTime=0 VolWriteTime=0 EndFile=0 EndBlock=0 VolParts=0 LabelType=0
nara-dir: msgchan.c:249 <stored: 3000 OK use device device=Drive-0
nara-dir: msgchan.c:286 Start SD msg_thread.
nara-dir: msgchan.c:332 Start msg_thread loop
nara-dir: msgchan.c:295 SD msg_thread started. use=2
nara-dir: backup.c:187 Storage daemon connection OK
nara-dir: bnet.c:781 Current host[ipv4:127.0.0.1:9102] All 
host[ipv4:127.0.0.1:9102]
nara-dir: bnet.c:1128 who=File daemon host=nara port=9102
nara-dir: fd_cmds.c:80 Opened connection with File daemon
nara-dir: cram-md5.c:97 cram-get: auth cram-md5 <[EMAIL PROTECTED]> ssl=0
nara-dir: cram-md5.c:114 sending resp to challenge: t/Y7Iz/dq85zEXcWqU/TYA
nara-dir: cram-md5.c:52 send: auth cram-md5 <[EMAIL PROTECTED]> ssl=0
nara-dir: cram-md5.c:68 Authenticate OK D0+EvFxhCVZpM8spS9ZidC
nara-dir: authenticate.c:229 >filed: 1000 OK auth
nara-dir: authenticate.c:238 <stored: 2000 OK Hello
nara-dir: fd_cmds.c:101 >filed: JobId=19 Job=nara_config_week_1.2006-04-27_16.26.00 SDid=1 SDtime=1146180354 Authorization=HPAN-FIHA-JPHD-NKLE-KMKM-LDHI-BACC-DDAG nara-dir: fd_cmds.c:103 <filed: 2000 OK Job i686-redhat-linux-gnu,redhat,(Stentz)nara-dir: fd_cmds.c:237 >filed: level = full mtime_only=0 nara-dir: catreq.c:105 catreq CatReq Job=nara_config_week_1.2006-04-27_16.26.00 FindMedia=1 pool_name=ConfigWeek1 media_type=AIT4
nara-dir: next_vol.c:49 CatReq FindMedia: PoolId=4, MediaType=AIT4
nara-dir: next_vol.c:65 catreq after find_next_vol ok=0 FW=0
nara-dir: next_vol.c:72 find_recycled_volume 0 FW=0
nara-dir: recycle.c:76 Enter recycle_oldest_purged_volume
nara-dir: recycle.c:94 Oldest mediaid=0
nara-dir: recycle.c:106 return 0  recycle_oldest_purged_volume end
nara-dir: recycle.c:76 Enter recycle_oldest_purged_volume
nara-dir: recycle.c:94 Oldest mediaid=0
nara-dir: recycle.c:106 return 0  recycle_oldest_purged_volume end
nara-dir: next_vol.c:65 catreq after find_next_vol ok=1 FW=0
nara-dir: next_vol.c:145 VolJobs=0 FirstWritten=0
nara-dir: catreq.c:84 Vol Info for nara_config_week_1.2006-04-27_16.26.00: 1000 OK VolName=BU6115 VolJobs=0 VolFiles=0 VolBlocks=0 VolBytes=1 VolMounts=0 VolErrors=0 VolWrites=0 MaxVolBytes=0 VolCapacityBytes=0 VolStatus=Append Slot=15 MaxVolJobs=0 MaxVolFiles=0 InChanger=0 VolReadTime=0 VolWriteTime=0 EndFile=0 EndBlock=0 VolParts=0 LabelType=0 nara-dir: catreq.c:105 catreq CatReq Job=nara_config_week_1.2006-04-27_16.26.00 FindMedia=1 pool_name=ConfigWeek1 media_type=AIT4
nara-dir: next_vol.c:49 CatReq FindMedia: PoolId=4, MediaType=AIT4
nara-dir: next_vol.c:65 catreq after find_next_vol ok=0 FW=0
nara-dir: next_vol.c:72 find_recycled_volume 0 FW=0
nara-dir: recycle.c:76 Enter recycle_oldest_purged_volume
nara-dir: recycle.c:94 Oldest mediaid=0
nara-dir: recycle.c:106 return 0  recycle_oldest_purged_volume end
nara-dir: recycle.c:76 Enter recycle_oldest_purged_volume
nara-dir: recycle.c:94 Oldest mediaid=0
nara-dir: recycle.c:106 return 0  recycle_oldest_purged_volume end
nara-dir: next_vol.c:65 catreq after find_next_vol ok=1 FW=0
nara-dir: next_vol.c:145 VolJobs=0 FirstWritten=0
nara-dir: catreq.c:84 Vol Info for nara_config_week_1.2006-04-27_16.26.00: 1000 OK VolName=BU6115 VolJobs=0 VolFiles=0 VolBlocks=0 VolBytes=1 VolMounts=0 VolErrors=0 VolWrites=0 MaxVolBytes=0 VolCapacityBytes=0 VolStatus=Append Slot=15 MaxVolJobs=0 MaxVolFiles=0 InChanger=0 VolReadTime=0 VolWriteTime=0 EndFile=0 EndBlock=0 VolParts=0 LabelType=0 nara-dir: catreq.c:105 catreq CatReq Job=nara_config_week_1.2006-04-27_16.26.00 FindMedia=1 pool_name=ConfigWeek1 media_type=AIT4
nara-dir: next_vol.c:49 CatReq FindMedia: PoolId=4, MediaType=AIT4
nara-dir: next_vol.c:65 catreq after find_next_vol ok=0 FW=0
nara-dir: next_vol.c:72 find_recycled_volume 0 FW=0
nara-dir: recycle.c:76 Enter recycle_oldest_purged_volume
nara-dir: recycle.c:94 Oldest mediaid=0
nara-dir: recycle.c:106 return 0  recycle_oldest_purged_volume end
nara-dir: recycle.c:76 Enter recycle_oldest_purged_volume
nara-dir: recycle.c:94 Oldest mediaid=0
nara-dir: recycle.c:106 return 0  recycle_oldest_purged_volume end
nara-dir: next_vol.c:65 catreq after find_next_vol ok=1 FW=0
nara-dir: next_vol.c:145 VolJobs=0 FirstWritten=0
nara-dir: catreq.c:84 Vol Info for nara_config_week_1.2006-04-27_16.26.00: 1000 OK VolName=BU6115 VolJobs=0 VolFiles=0 VolBlocks=0 VolBytes=1 VolMounts=0 VolErrors=0 VolWrites=0 MaxVolBytes=0 VolCapacityBytes=0 VolStatus=Append Slot=15 MaxVolJobs=0 MaxVolFiles=0 InChanger=0 VolReadTime=0 VolWriteTime=0 EndFile=0 EndBlock=0 VolParts=0 LabelType=0 nara-dir: catreq.c:105 catreq CatReq Job=nara_config_week_1.2006-04-27_16.26.00 FindMedia=1 pool_name=ConfigWeek1 media_type=AIT4
nara-dir: next_vol.c:49 CatReq FindMedia: PoolId=4, MediaType=AIT4
nara-dir: next_vol.c:65 catreq after find_next_vol ok=0 FW=0
nara-dir: next_vol.c:72 find_recycled_volume 0 FW=0
nara-dir: recycle.c:76 Enter recycle_oldest_purged_volume
nara-dir: recycle.c:94 Oldest mediaid=0
nara-dir: recycle.c:106 return 0  recycle_oldest_purged_volume end
nara-dir: recycle.c:76 Enter recycle_oldest_purged_volume
nara-dir: recycle.c:94 Oldest mediaid=0
nara-dir: recycle.c:106 return 0  recycle_oldest_purged_volume end
nara-dir: next_vol.c:65 catreq after find_next_vol ok=1 FW=0
nara-dir: next_vol.c:145 VolJobs=0 FirstWritten=0
nara-dir: catreq.c:84 Vol Info for nara_config_week_1.2006-04-27_16.26.00: 1000 OK VolName=BU6115 VolJobs=0 VolFiles=0 VolBlocks=0 VolBytes=1 VolMounts=0 VolErrors=0 VolWrites=0 MaxVolBytes=0 VolCapacityBytes=0 VolStatus=Append Slot=15 MaxVolJobs=0 MaxVolFiles=0 InChanger=0 VolReadTime=0 VolWriteTime=0 EndFile=0 EndBlock=0 VolParts=0 LabelType=0 nara-dir: util.c:535 edit_job_codes: /usr/sbin/bsmtp -h localhost -f "(Bacula) %r" -s "Bacula: Intervention needed for %j" %r



-------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Bacula-users mailing list
Bacula-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users

Reply via email to