Amanda-Users

Re: can only run amanda tests as root

2006-08-02 05:21:40
Subject: Re: can only run amanda tests as root
From: "Stephen Carter" <Stephen AT retnet.co DOT uk>
To: <amanda-users AT amanda DOT org>
Date: Wed, 02 Aug 2006 10:15:36 +0100
I found it.

It was udev causing the problems, which I can only thing must be a problem for 
many SuSE users running amanda with tape changers out there.

In /etc/udev/rules.d/50-udev-default.rules there is a line to create sg* 
devices like:
KERNEL=="sg*"       NAME="%k", GROUP="disk", MODE="640"

This was from a clean install of SLES 10, and will only give members of the 
disk group read access to /dev/sg* devices, which is why I couldn't run it as 
amanda. Removing the MODE comment (defaults to rw for both user & group) and a 
reboot fixed it.
 

Stephen Carter
Retrac Networking Limited
www: http://www.retnet.co.uk
Ph: +44 (0)7870 218 693
Fax: +44 (0)870 7060 056
CNA, CNE 6, CNS, CCNA, MCSE 2003


>>> "Stephen Carter" <Stephen AT retnet.co DOT uk> 08/02/06 9:33 AM >>> 
I figured that part out, and running mtx - f /dev/sg0 inquiry then again for 
sg1 showed that my drive was on sg0 and the autoloader was on sg1.

All the mtx and amtape commands work when being run as the root user, so I 
don't think this is a configuration file issue. I think it's more of a setup 
issue with users / perms but I just can't see it...
 

Stephen Carter
Retrac Networking Limited
www: http://www.retnet.co.uk
Ph: +44 (0)7870 218 693
Fax: +44 (0)870 7060 056
CNA, CNE 6, CNS, CCNA, MCSE 2003


>>> Brian Cuttler <brian AT wadsworth DOT org> 08/01/06 9:16 PM >>> 

The robot/picker/whatever is a different device on most systems
from the tape drive, I've seen it as a different device/SCSI ID
and as the same SCSI ID/different LUN, depending on the implementation.

You have to check the devices for the robot in this case.

On Tue, Aug 01, 2006 at 09:10:57PM +0100, Stephen Carter wrote:
> I've got my user amanda who is a member of the disk group, and although 
> permissions on all amanda files seem fine, when I try to run
> su amanda -  c "/usr/sbin/amtape DailySet1 show"
> 
> I get the error
> amtape: could not get changer info: no slots available
> 
> I can however run this successfully as root.
> 
> My tape device is /dev/sg0 and the changer is /dev/sg1. Both have permissions 
> root:disk (along with everything else in /dev it appears)
> 
> My amanda config files are in /etc/amanda/DailySet1 and amanda is the owner 
> of /etc/amanda and all files beneath that.
> 
> I'm running SLES 10 and installed Amanda through YaST which is v2.4.5
> 
> I also uninstalled that and tried doing it directly from source, with exactly 
> the same problem...
> 
> Any help would be great.
> 
> Thanks!
> 
> 
> Stephen Carter
> Retrac Networking Limited
> www: http://www.retnet.co.uk
> Ph: +44 (0)7870 218 693
> Fax: +44 (0)870 7060 056
> CNA, CNE 6, CNS, CCNA, MCSE 2003
> 
> 
> 
---
   Brian R Cuttler                 brian.cuttler AT wadsworth DOT org
   Computer Systems Support        (v) 518 486-  1697
   Wadsworth Center                (f) 518 473-  6384
   NYS Department of Health        Help Desk 518 473-  0773