On Tue, May 3, 2011 at 11:05 AM, Josh Fisher <jfis...@pvct.com> wrote: > On 5/3/2011 5:55 AM, Koenraad Lelong wrote: >> ... >> # chmod 770 /mnt/vchanger/49299ccc-6489-43f8-9536-d63dd3de9663/ >> # ls -la /mnt/vchanger/49299ccc-6489-43f8-9536-d63dd3de9663/ >> totaal 196768 >> drwxrwx--- 6 bacula bacula 4096 3 mei 10:36 . >> drwxr-xr-x 3 root root 0 3 mei 10:51 .. >> drwx------ 2 bacula bacula 16384 21 apr 11:39 lost+found >> ... >>> ls -la /var/lib/bacula/c2/ >> totaal 12 >> drwxr-x--- 2 bacula bacula 4096 3 mei 11:29 . >> drwxr-xr-x 3 bacula bacula 4096 3 mei 11:29 .. >> -rw-r--r-- 1 bacula bacula 1 3 mei 11:29 bay1 >> -rw-r--r-- 1 bacula bacula 0 3 mei 11:29 state0 >> >> So I'm still stuck. >> Just for fun I tried again : >> # vchanger -u bacula -g bacula /etc/bacula/c2.conf initmag 1 >> magazine bay 1 has no magazine mounted >> # vchanger -u bacula -g disk /etc/bacula/c2.conf initmag 1 >> created magazine 1 in bay 1 >> [/mnt/vchanger/49299ccc-6489-43f8-9536-d63dd3de9663] >> >> So the disk-group can initialize the magazine, the bacula-group has >> problems. >> I looked at the udev-rules, but there is nothing there that rings a bell. > > So, bacula:bacula cannot write, but bacula:disk can, yet all accessed > directories appear to be owned by bacula:bacula? What group does the > bacula-sd daemon run as? On Fedora, it is typical for bacula-dir to run > as bacula:bacula, while bacula-sd runs as bacula:disk. Perhaps this is > an selinux thing? Maybe the simple solution is to change everything to > be owned by bacula:disk and run bacula-sd as bacula:disk.
Hi... I had the same error today in ubuntu server: ================ $ sudo vchanger -u bacula -g bacula /etc/bacula/disco_usb.conf initmag 1 magazine bay 1 has no magazine mounted $ sudo vchanger -u bacula -g tape /etc/bacula/disco_usb.conf initmag 1 magazine bay 1 has no magazine mounted $ sudo vchanger -u bacula -g disk /etc/bacula/disco_usb.conf initmag 1 magazine in bay 1 (/mnt/vchanger/29d9d497-62dd-4903-9054-a3fb9777b79d) already initialized as magazine 1 ================ bacula-dir and bacula-sd are working in "bacula" and "tape" groups respectively and all folders and files have this groups. ================= $ find /var/lib/bacula/ /var/log/bacula/ /var/bacula -not -group bacula -and -not -group tape /var/log/bacula/ ================= and after check the output of strace ================= $ sudo strace -s 100 vchanger -u bacula -g bacula /etc/bacula/disco_usb.conf initmag 1 stat64("/dev/sdc1", {st_mode=S_IFBLK|0660, st_rdev=makedev(8, 33), ...}) = 0 time(NULL) = 1309454624 stat64("/dev/sdc1", {st_mode=S_IFBLK|0660, st_rdev=makedev(8, 33), ...}) = 0 open("/dev/sdc1", O_RDONLY|O_LARGEFILE) = -1 EACCES (Permission denied) read(4, "", 1024) = 0 close(4) ================= I found that the problem is that vchanger try to access the device (/dev/sd*) directly and not the directory/mountpoint configured.. and how the script are running with a group (bacula/tape) that don't have access do /dev/sd*, the script don't work... =========== $ ls -ltr /dev/sd* brw-rw---- 1 root disk 8, 16 2011-06-28 11:16 /dev/sdb brw-rw---- 1 root disk 8, 0 2011-06-28 11:16 /dev/sda brw-rw---- 1 root disk 8, 1 2011-06-28 11:16 /dev/sda1 brw-rw---- 1 root disk 8, 17 2011-06-28 11:16 /dev/sdb1 brw-rw---- 1 root disk 8, 21 2011-06-28 11:16 /dev/sdb5 brw-rw---- 1 root disk 8, 18 2011-06-28 11:16 /dev/sdb2 brw-rw---- 1 root disk 8, 32 2011-06-30 12:10 /dev/sdc brw-rw---- 1 root disk 8, 33 2011-06-30 12:10 /dev/sdc1 =========== solution... mmm .. include bacula in disk group ?? attentive -- -- Victor Hugo dos Santos Linux Counter #224399 ------------------------------------------------------------------------------ All of the data generated in your IT infrastructure is seriously valuable. Why? It contains a definitive record of application performance, security threats, fraudulent activity, and more. Splunk takes this data and makes sense of it. IT sense. And common sense. http://p.sf.net/sfu/splunk-d2d-c2 _______________________________________________ Bacula-users mailing list Bacula-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bacula-users