On 5/29/2013 7:41 PM, Dimitri Maziuk wrote:
> Hi all,
>
> I got vchanger working down to section 10 of the howto. I can maually
> run (as bacula user)
>
> /etc/bacula/vchanger /etc/bacula/vchanger.conf slots
> 180
>
> Yet in bconsole:
>
> *update slots
> Automatically selected Catalog: MyCatalog
> Using Catalog "MyCatalog"
> Automatically selected Storage: changer1
> Connecting to Storage daemon changer1 at rendena.nmrfam.wisc.edu:9103 ...
> Connecting to Storage daemon changer1 at rendena.nmrfam.wisc.edu:9103 ...
> 3306 Issuing autochanger "slots" command.
> Device "Vchanger1" has 0 slots.
> No slots in changer to scan.
> *
>
> I can't see what's missing. Any hints?

First, remove the RemovableMedia=yes line from the Vchanger-drive Device 
in bacula-sd.conf. That causes Bacula to search for any file on 
ArchiveDevice that may be appendable and usable for the job. With 
vchanger, a specific file is mapped to a slot, so the search is not wanted.

Remember that vchanger will be run as the same uid:gid that bacula-sd 
runs as. So /etc/bacula/vchanger must be executable by that user. 
/etc/bacula/vchanger.conf must be readable, the vchanger work_dir and 
all magazine filesystems must be writable by that user. Check filesystem 
permissions. Also, if you use seLinux, ensure that /etc/bacula/vchanger 
has needed permissions. Set logfile= in vchanger.conf to a file writable 
by the uid:gid bacula-sd runs as and log_level=7 to get detailed logging 
from vchanger that might point out the problem.

My guess is permissions. As root, use the -u and -g switches to run 
vchanger manually and force the same uid:gid that bacula-sd runs as. A 
simple su bacula may not run with the same permissions.


>
> ----------------------------------------------------------
> bacula-sd:
>
> Autochanger {
>      Name = Vchanger1
>      Device = Vchanger-drive
>      Changer Command = "/etc/bacula/vchanger %c %o %S %a %d"
>      Changer Device = "/etc/bacula/vchanger.conf"
> }
> Device {
>      Name = Vchanger-drive
>      DriveIndex = 0
>      Autochanger = yes
>      Device Type = File
>      Media Type = BDRSizedFile
>      Archive Device = /var/spool/bacula/changer1/0/drive0
>      LabelMedia = no
>      Random Access = yes
>      AutomaticMount = yes
>      RemovableMedia = yes
>      Maximum Network Buffer Size = 65536
>      Spool Directory = "/var/spool/bacula"
> }
>
> bacula-dir:
>
> Storage {
>      Name = "changer1"
>      Address = ...
>      SDPort = 9103
>      Password = ...
>      Device = Vchanger1
>      Media Type = BDRSizedFile
>      Autochanger = yes
>      Maximum Concurrent Jobs = 20
> }
>
>
>
>
> ------------------------------------------------------------------------------
> Introducing AppDynamics Lite, a free troubleshooting tool for Java/.NET
> Get 100% visibility into your production application - at no cost.
> Code-level diagnostics for performance bottlenecks with <2% overhead
> Download for free and get started troubleshooting in minutes.
> http://p.sf.net/sfu/appdyn_d2d_ap1
>
>
> _______________________________________________
> Bacula-users mailing list
> Bacula-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/bacula-users


------------------------------------------------------------------------------
Introducing AppDynamics Lite, a free troubleshooting tool for Java/.NET
Get 100% visibility into your production application - at no cost.
Code-level diagnostics for performance bottlenecks with <2% overhead
Download for free and get started troubleshooting in minutes.
http://p.sf.net/sfu/appdyn_d2d_ap1
_______________________________________________
Bacula-users mailing list
Bacula-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users

Reply via email to