Amanda-Users

Re: [UPDATE] How to control which tape is next?

2003-10-23 04:46:00
Subject: Re: [UPDATE] How to control which tape is next?
From: Gene Heskett <gene.heskett AT verizon DOT net>
To: lucio AT pixel DOT it, amanda-users AT amanda DOT org
Date: Thu, 23 Oct 2003 04:40:44 -0400
On Thursday 23 October 2003 05:38, Lucio wrote:
>> > Check to see if some problem has truncated your tapelist file. 
>> > If a problem (e.g., no space left on a device) prevents the
>> > tapelist from being created or some other problem truncated the
>> > file, then you could expect to see a problem like this.  Check
>> > to see if there have been any drive faults or other system
>> > events at the time when Amanda started giving you strange
>> > results.
>>
>> I have created a patch, which seems not yet included in the
>> current sources, for similar errors:
>>
>> http://groups.yahoo.com/group/amanda-hackers/message/3769
>>
>> (but it seems that this is not the problem, as Lucio seems to
>> indicate that there ARE enough entries in the tapelist file. 
>> Maybe a permission problem?  Or looking at a file with the same
>> name but not the one as configured in amanda.conf?)
>
>The file is not truncated nor there are permission problems. There
> are five entries in the tapelist file and tapecycle is set to five
> tapes. Every entry matches the labelstr and every entry is marker
> as "reuse". The only strange thing is that the timestamp for each
> entry dates back to several days ago while the backup is due every
> night and the backup reports tell everything is ok every morning.
>
>There is a write permission problem on amanda.conf (root.root
> rw-r--r--), but I guess this has nothing to do with the tapelist,
> right?

Or everything maybe, since the user amanda:disk should own all files 
in that same directory.  The perms should look something like this:

[root@coyote root]# ls -l /usr/local/etc/amanda/DailySet1
total 48
-rw-r--r--    1 amanda   disk        20832 Aug  3 04:29 amanda.conf
-rw-r--r--    1 amanda   disk          693 Dec 24  2002 chg-scsi.conf
-rw-r--r--    1 amanda   disk         5502 Jul 13 09:16 disklist
-rw-------    1 amanda   disk          784 Oct 23 00:30 tapelist
-rw-------    1 amanda   disk          757 Jun 10 16:26 
tapelist.amlabel
-rw-------    1 amanda   disk          784 Oct 23 00:30 
tapelist.yesterday

This is beginning to look as if you have chowned things a bit somehow.  
Please chown them back to resemble the above.  This is possibly 
something that rpms may not handle properly.  When useing the 
tarballs, it is unpacked, configured, and built by amanda, then is 
installed by root, automaticly taking care of all required 
permissions when done in that manner.  It just works.

Likewise, your /usr/local/var/amanda/DailySet1 tree (or wherever the 
rpms keep the records) should also all belong to amanda:disk.  The 
executables, probably in /usr/local/libexec should look like this:

root@coyote root]# ls -l /usr/local/libexec
total 1904
-rwxr-xr-x    1 amanda   disk        57760 Oct 20 05:05 amandad
-rw-r--r--    1 amanda   disk          180 Oct 20 05:05 amcat.awk
-rwxr-xr-x    1 amanda   disk        52567 Oct 20 05:05 amcleanupdisk
-rwxr-xr-x    1 amanda   disk        59680 Oct 20 05:05 amidxtaped
-rwxr-xr-x    1 amanda   disk       114258 Oct 20 05:05 amindexd
-rwxr-xr-x    1 amanda   disk        46638 Oct 20 05:05 amlogroll
-rw-r--r--    1 amanda   disk        17439 Oct 20 05:05 amplot.awk
-rw-r--r--    1 amanda   disk         3283 Oct 20 05:05 amplot.g
-rw-r--r--    1 amanda   disk         3293 Oct 20 05:05 amplot.gp
-rwxr-xr-x    1 amanda   disk        52927 Oct 20 05:05 amtrmidx
-rwxr-xr-x    1 amanda   disk        51722 Oct 20 05:05 amtrmlog
-rwsr-x---    1 root     disk        47402 Oct 20 05:05 calcsize
-rwxr-xr-x    1 amanda   disk        11165 Oct 20 05:05 chg-chio
-rwxr-xr-x    1 amanda   disk        10066 Oct 20 05:05 chg-chs
-rwxr-xr-x    1 amanda   disk         5160 Oct 20 05:05 chg-juke
-rwxr-xr-x    1 amanda   disk         6769 Oct 20 05:05 chg-manual
-rwxr-xr-x    1 amanda   disk        13096 Oct 20 05:05 chg-mcutil
-rwxr-xr-x    1 amanda   disk         5596 Oct 20 05:05 chg-mtx
-rwxr-xr-x    1 amanda   disk        11962 Oct 20 05:05 chg-multi
-rwxr-xr-x    1 amanda   disk         1703 Oct 20 05:05 chg-null
-rwxr-xr-x    1 amanda   disk         4006 Oct 20 05:05 chg-rait
-rwxr-xr-x    1 amanda   disk         6691 Oct 20 05:05 chg-rth
-rwxr-xr-x    1 amanda   disk       401126 Oct 20 05:05 chg-scsi
-rwxr-xr-x    1 amanda   disk        37294 Oct 20 05:05 chg-zd-mtx
-rwxr-xr-x    1 amanda   disk        97207 Oct 20 05:05 driver
-rwsr-x---    1 root     disk        90217 Oct 20 05:05 dumper
-rwsr-x---    1 root     disk        41995 Oct 20 05:05 killpgrp
-rwxr-xr-x    1 amanda   disk         4848 Oct 20 05:05 patch-system
-rwsr-x---    1 root     disk        91428 Oct 20 05:05 planner
-rwsr-x---    1 root     disk        38963 Oct 20 05:05 rundump
-rwsr-x---    1 root     disk        40270 Oct 20 05:05 runtar
-rwxr-xr-x    1 amanda   disk        63188 Oct 20 05:05 selfcheck
-rwxr-xr-x    1 amanda   disk       121100 Oct 20 05:05 sendbackup
-rwxr-xr-x    1 amanda   disk        79728 Oct 20 05:05 sendsize
-rwxr-xr-x    1 amanda   disk        93117 Oct 20 05:05 taper
-rwxr-xr-x    1 amanda   disk        38129 Oct 20 05:05 versionsuffix

with only those shown as root above actually being owned by root.
Better yet, since you are determined to use rpms, go get the src.rpm 
from the site Matt Hyclak posted here yesterday? and follow the 
instructions there.

-- 
Cheers, Gene
AMD K6-III@500mhz 320M
Athlon1600XP@1400mhz  512M
99.27% setiathome rank, not too shabby for a WV hillbilly
Yahoo.com attornies please note, additions to this message
by Gene Heskett are:
Copyright 2003 by Maurice Eugene Heskett, all rights reserved.