On 4/26/2011 5:10 AM, Koenraad Lelong wrote: > ... >> It looks like you either did not create the volumes using vchanger's >> INITMAG command, or else you created them as root or some other user and >> it is a permissions problem. The volume files must be owned by (or at >> least read/write) for the user that the bacula-sd daemon runs as. >> > Hi Josh, > > I investigated and it seems bacula-sd and bacula-dir were compiled to > run as bacula:bacula. I initialized the "magazine" with > vchanger -u bacula -g disk /etc/bacula/c2.conf initmag 1 > > This results in > -rw-r----- 1 bacula disk 0 26 apr 09:34 c2_0001_0001 > -rw-r----- 1 bacula disk 0 26 apr 09:34 c2_0001_0002 > -rw-r----- 1 bacula disk 0 26 apr 09:34 c2_0001_0003 > -rw-r--r-- 1 bacula disk 7 26 apr 09:34 index > -rw-r--r-- 1 bacula disk 1 26 apr 09:34 loaded0 > > So I started again, now with > vchanger -u bacula -g bacula /etc/bacula/c2.conf initmag 1 > response : > magazine bay 1 has no magazine mounted > > Tried again with > vchanger -u bacula -g disk /etc/bacula/c2.conf initmag 1 > > This went fine. Then I chown'ed -R > /mnt/vchanger/49299ccc-6489-43f8-9536-d63dd3de9663 to bacula:bacula. > Again bconsole reported no slots to scan. > I don't understand anymore.
The partition itself must also have the correct owner and permissions. It should look like: # ls -la 49299ccc-6489-43f8-9536-d63dd3de9663 drwxrwx--- 3 bacula bacula 4096 26 apr 08:10 . drwxr-xr-x 3 root root 0 26 apr 08:10 .. -rw-r----- 1 bacula bacula 0 26 apr 09:34 c2_0001_0001 -rw-r----- 1 bacula bacula 0 26 apr 09:34 c2_0001_0002 -rw-r----- 1 bacula bacula 0 26 apr 09:34 c2_0001_0003 -rw-r--r-- 1 bacula bacula 7 26 apr 09:34 index -rw-r--r-- 1 bacula bacula 1 26 apr 09:34 loaded0 Likewise, the work directory, (determined by the work_dir= in the vchanger config), should have permissions such that bacula:bacula has read/write permissions for the directory and all files within it. Finally, make sure that the vchanger config file is readable by bacula:bacula. Then the best way to test is to run as user bacula.... # su bacula $ vchanger /path/to/vchanger.conf list 1:c2_0001_0001 2:c2_0001_0002 3:c2_0001_0003 You may have to temporarily change /etc/passwd to allow user bacula to run in a interactive shell. ------------------------------------------------------------------------------ WhatsUp Gold - Download Free Network Management Software The most intuitive, comprehensive, and cost-effective network management toolset available today. Delivers lowest initial acquisition cost and overall TCO of any competing solution. http://p.sf.net/sfu/whatsupgold-sd _______________________________________________ Bacula-users mailing list Bacula-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bacula-users