Hi,

26.07.2007 00:47,, Craig White wrote::
> On Thu, 2007-07-26 at 00:11 +0200, Arno Lehmann wrote:
>> Hi,
>>
>> 25.07.2007 23:54,, Craig White wrote::
>>> the 'end_of_backup.sh' script doesn't successfully eject the tape.
>>>
>>> dmesg says:
>>> MTSETDRVBUFFER only allowed for root
>> This should not matter here.
>>
>>> bacula log says:
>>> 25-Jul 08:27 SRV1: RunAfter: /dev/tape: Permission denied
>>> 25-Jul 08:27 SRV1: RunAfter: /dev/tape: Permission denied
>> Are you sure /dev/tape is the device node for your tape drive?
>>
>>> # grep bacula /etc/group
>>> disk:x:6:root,bacula
>>> bacula:x:103:
>>>
>>> # cat end_of_backup.sh
>>> #! /bin/sh
>>> /etc/bacula/delete_catalog_backup
>>> mt rewind
>>> mt eject
>>> exit 0
>> Try lines like 'mt -f /dev/st0 rewind' (perhaps replacing rewind with 
>> rewoffl or offline) and use the device name you gave in your SD 
>> configuration.
>>
>>> # cat /etc/redhat-release
>>> CentOS release 4.5 (Final)
>>>
>>> # rpm -q bacula-mysql
>>> bacula-mysql-1.38.5-4
>>>
>>> How can I solve this short of adding bacula to 'root' group?
>> Adding the proper permission to the device node?
>>
>> Knowing which user the SD and the DIR runs as, and the exact 
>> permissions for your tape device would help, too...
>>
>> The former can be found out using, for example, ps or top while bacula 
>> is running, or by looking into the start script.
>>
>> The latter can be found out by
>> ls -l /dev/st* /dev/tape*
>> for example.
> ----
> Actually, I had been using /dev/nst0 (which is what I use in bacula-sd)
> but I was getting the same message which is why I went back to the
> distribution.
> 
> # ls -l /dev/nst0
> crw-rw----  1 root disk 9, 128 Jul  5 04:38 /dev/nst0
> 
> and I have changed end_of_backup.sh
> # cat end_of_backup.sh
> #! /bin/sh
> /etc/bacula/delete_catalog_backup
> mt -f /dev/nst0 rewind
> mt -f /dev/nst0 eject
> #mt rewind
> #mt eject
> exit 0
> 
> and I suppose that we will see tonight but I am certain that this is the
> setup that I have been using for the past week and it has never ejected
> a tape - and as you can see...the group 'disk' does indeed have rw
> privileges on /dev/nst0 and as demonstrated before, the disk group
> includes bacula user which is the user running bacula-sd.
> 
> # ps aux|grep bacula
> bacula   10779  0.0  0.1 39092 1824 ?        Ssl  08:04
> 0:00 /usr/sbin/bacula-sd -u bacula -g disk -c /etc/bacula/bacula-sd.conf

Ok, then it's time for some testing...

as the bacula user, with the tape drive unmounted from bacula (or the 
SD stopped), try
mt -f /dev/nst0 rewind
and
... eject

If that works - great. If it doesn't, you should at least get an error 
message. If it's 'permission denied' again, there's still something 
missing, though I wouldn't understand that :-)

If this works from the shell, I would recommend upgrading Bacula to 
the latest released version, because that should fix the group 
association problem I recall.

Arno

-- 
Arno Lehmann
IT-Service Lehmann
www.its-lehmann.de

-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/
_______________________________________________
Bacula-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bacula-users

Reply via email to