Amanda-Users

Re: amcheck reading label: Device or resource busy

2006-06-25 02:27:04
Subject: Re: amcheck reading label: Device or resource busy
From: Robert Grey <rgrey AT openinit DOT org>
To: amanda-users AT amanda DOT org
Date: Sat, 24 Jun 2006 23:18:06 -0700

On Jun 24, 2006, at 6:27 PM, Jon LaBadie wrote:

On Sat, Jun 24, 2006 at 05:46:27PM -0700, Robert Grey wrote:
I am setting up Amanda on a Gentoo box with an Overland LoaderXPress and can't seem to get past an amcheck issue. The amdump operation works fine
but amcheck gives this error:

amdump is working but amcheck is not?
I'd first check permissions on amcheck.
It should be root owned and setuid'ed.


setuid is set and the owner is root; this was set by the gentoo emerge (build) process:

dev64 daily # ls -la /usr/sbin/amcheck
-rws--x--- 1 root amanda 40640 Jun 23 00:08 /usr/sbin/amcheck

I am fairly sure the permissions are correct because amcheck running as amanda does switch the tapes after it can't work with the drive:

dev64 ~ # ls -la /dev/sg0
crw-rw---- 1 root tape 21, 0 Jun 23 00:43 /dev/sg0
dev64 ~ # ls -la /dev/changer
lrwxrwxrwx 1 root root 3 Jun 24 12:07 /dev/changer -> sg0
dev64 ~ # ls -la /dev/nst0
crw-rw---- 1 root tape 9, 128 Jun 23 00:43 /dev/nst0
dev64 ~ # ls -la /dev/tape
lrwxrwxrwx 1 root root 4 Jun 24 12:07 /dev/tape -> nst0
dev64 ~ # sudo -u amanda id
uid=87(amanda) gid=87(amanda) groups=26(tape),87(amanda)


-----------
Here is my amanda.conf:
-----------
org "daily"
mailto "<removed>" # space separated list of operators at your site
dumpuser "amanda"       # the user to run dumps under

is amanda user or amanda's group allowed to read the tape device?


see above


#
inparallel 4            # maximum dumpers that will run in parallel
netusage 1000 # maximum net bandwidth for Amanda, in KB per sec

# a filesystem is due for a full backup once every <dumpcycle> days

"at least" once every dumpcycle


dumpcycle 7 days        # the number of days in the normal dump cycle

where is runspercycle?, i.e. the number of times in 7 days
you will run amdump.


I am using the default which is the same as the dumpcycle; i.e. once a day.


tapecycle 8 tapes       # the number of tapes in rotation

Assuming runspercycle is 7, not a lot of safety in 1 tape more
than a dumpcycle.


You are probably correct, I will look into changing that. I think at one point it was 3 but got switched.



bumpsize 20 MB # minimum savings (threshold) to bump level 1 -> 2
bumpdays     1          # minimum days at each level
bumpmult     4          # threshold = bumpsize * (level-1)**bumpmult

# this is a symbol link to "/dev/nsto"

Is this correct, or is it really nst"0" (zero not ohh)?


It is zero, I added that comment to the email for clarity.


tapedev "/dev/tape"     # Linux @ tuck, important: norewinding

Typically I see this link as "ntape" -> nst0 and "tape" -> st0.
Make sure you are pointing to the correct device.


I am pointing to nst0, see above. Amdump seems to work fine with several entries in the disklist which I think suggests I am not using the rewinding (st0) device. I tried switching amanda.conf back to the device (/dev/nst0) away from the symbolic link (/dev/tape) and it didn't fix the problem.



tpchanger "chg-zd-mtx"   # the tape changer script

# this is a symbol link to "/dev/sg0"
changerdev "/dev/changer"    # the tape changer device
changerfile "/etc/amanda/daily/changer" # the tape change status

tapetype DLT-7000-IV # what kind of tape it is (see tapetypes
below)
labelstr "^DAILY[0-9][0-9]*$" # label constraint regex: all tapes must
match

# this is the local disk cache
holdingdisk home {
   comment "cache disk"
   directory "/var/spool/amanda/backup-store"
   use 2000MB
}

# Amanda needs a few MB of diskspace for the log and debug files,
# as well as a database. This stuff can grow large, so the conf directory
# isn't usually appropriate.

infofile "/var/spool/amanda/daily/lib/curinfo"  # database filename
logdir   "/var/spool/amanda/daily/log/"         # log directory
#logfile  "/var/spool/amanda/daily/log/log"         # log filename

# where the index files live
indexdir "/var/spool/amanda/daily/lib/index"

# tapetypes
define tapetype DLT {
   comment "DLT tape drives"
   length 20000 mbytes         # 20 Gig tapes
   filemark 2000 kbytes        # I don't know what this means

space wasted between end of one file and start of next on the tape.
Only significant if you have lots of tape files.


   speed 1500 kbytes
}

define tapetype DLT-8000-IV {
   comment "Overland LoaderXpress DLT"
   length 38042 mbytes
   filemark 114 kbytes
   speed 5865 kbytes
}

define tapetype DLT-7000-IV {
   comment "DLT7000 with DLTtape IV uncompressed"
   length 35000 mbytes

You believe the manufacturer's rating huh?


I actually copied that from somewhere as it matched my tape type. You might be able to tell I'm not an expert at this...


   filemark 8 kbytes
   speed 5000 kbytes
}

# dumptypes
------
and my changer.conf:
------
firstslot=2
lastslot=10
cleanslot=1
driveslot=0


End of included message <<<

--
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>