Amanda-Users

Re: Problem with changer

2006-05-09 09:47:24
Subject: Re: Problem with changer
From: Jon LaBadie <jon AT jgcomp DOT com>
To: amanda-users AT amanda DOT org
Date: Tue, 9 May 2006 09:43:05 -0400
On Tue, May 09, 2006 at 10:33:01AM +0200, Stefan MARTEL wrote:
> Quoting Salvatore Enrico Indiogine <hindiogine AT gmail DOT com>:
> 
> I have the same problem as Luis when i run amcheck
> Amanda Tape Server Host Check
> -----------------------------
> Holding disk /amanda/amandahold/test: 14245792 kB disk space  
> available, using 14245792 kB
> amcheck-server: could not get changer info: cannot determine first slot
> 
> And in my /tmp/amanda/mtx-zd-mtx.***.debug file i have :
> chg-zd-mtx: debug 1 pid 8275 ruid 1002 euid 1002: start at Tue May  9  
> 10:14:19 2006
> 10:14:19 Using config file /var/lib/amanda/test/changerfile.conf
> 10:14:19 Arg info:
>          $# = 1
>          $0 = "/usr/lib/amanda/chg-zd-mtx"
>          $1 = "-info"
> 10:14:19 Running: /usr/sbin/mtx status
> 10:14:19 Exit code: 1
>          Stderr:
> failed to set sg timeout - Operation not permitted
> 10:14:19 Exit (2) -> <none> cannot determine first slot
> chg-zd-mtx: pid 8356 finish time Tue May  9 10:14:19 2006
> 
> How can i change the permission (i don't run amcheck in "root") ?
> 

You shouldn't run amcheck as root, but it should be suid'ed,
and owned by root.

        $ ls -l /usr/sbin/amcheck
        -rwsr-x---  1 root disk 89212 Apr 22  2005 /usr/sbin/amcheck

To change the device, first note what device it is, say /dev/sg99, and
your tapedrive perhaps /dev/st88 and /dev/nst88.

Then logged in as user amanda (or "su - amanda"), the dash is important,
determine the group identity of the amanda user, perhaps:

        $ id
        uid=33(amanda) gid=6(disk) groups=6(disk)

So group 'disk' in this example.  Now make the changes to the device.
As root do:

        # chgrp disk /dev/sg99 dev/st88 /dev/nst88
        # chmod 660  /dev/sg99 dev/st88 /dev/nst88
        

-- 
Jon H. LaBadie                  jon AT jgcomp DOT com
 JG Computing
 4455 Province Line Road        (609) 252-0159
 Princeton, NJ  08540-4322      (609) 683-7220 (fax)

<Prev in Thread] Current Thread [Next in Thread>