Amanda-Users

Re: taper write error even though amcheck -sclt says ok.

2005-03-10 19:28:02
Subject: Re: taper write error even though amcheck -sclt says ok.
From: Kevin Dalley <kevin AT kelphead DOT org>
To: amanda-users AT amanda DOT org
Date: Thu, 10 Mar 2005 16:21:51 -0800
Try:
        sudo -u backup amcheck -tw Norstead

This verifies that the tape is writable.  If you are using the wrong
tape, it shouldn't try overwriting the tape.  The tape will be
rejected before that test.

How big is your tape?  Is your tape write protected?  Probably not, if
you managed to amlabel it.  Try "mt retension" on your tape.  That
will send your tape from one end to the other.  Sometimes tapes jam
partway through.  You might try writing to your tape using some other
way.  Try a different tape.  Try amflush to see whether you are
writing to the tape.

Your setup looks fine to me.  When everything works correctly, your
tape will eventually fill up.  On the next run of amdump, autoflush
will start writing to tape again, while amdump continues dumping to
your holding disk.  You don't need to run amflush.  With autoflush
turned on, you just run one amdump after another, filling the holding
disk to 3 times the number of tapes.

You don't need chg-manual.  I have run without it for months.  I also
use a patch which limits my total holding disk usage to the total
number of tapes, but that patch isn't completely necessary.

Bruce.Skinner AT drdc-rddc.gc DOT ca (Bruce S. Skinner) writes:

> Hi,
>
> I'm running amanda 2.4.4p2 on ubuntu linux (Warty) kernel v2.6.8.1.4 I
> have a new configuration called "Norstead"; I've amlabel'ed all the
> tapes; I put tape "Norstead01" in the drive; I run amcheck (sudo -u
> backup amcheck -sclt Norstead) which reports all is ok;
>
> I invoke amdump (sudo -u backup amdump Norstead) the estimates get
> done and dump sets start rolling onto my holding disk.  The smallest
> dump is alsike_boot at 28MB so it's done first and when taper attempts
> to write it says:
>
>   FAIL taper alsike alsike_boot 20050310 0 [out of tape].
>
> I'm running a DLT8000 with no tape changer, but have set "runtapes 3"
> with "autoflush on" on the assumption that when a tape gets full it
> will wait for me to load another and kick it with amflush.
>
> Any ideas what I've done/assumed wrong or what I should do next to
> sort this out.
>
>
> regards :-)
> BruceS
>
>
> /var/log/amanda/Norstead/log:
>
>   DISK planner alsike alsike_root
>   DISK planner alsike alsike_boot
>   DISK planner alsike alsike_archive_a
>   DISK planner alsike alsike_archive_b
>   DISK planner alsike alsike_home
>   START planner date 20050310
>   WARNING planner tapecycle (8) <= runspercycle (28)
>   INFO planner Adding new disk alsike:alsike_root.
>   INFO planner Adding new disk alsike:alsike_boot.
>   INFO planner Adding new disk alsike:alsike_archive_a.
>   INFO planner Adding new disk alsike:alsike_archive_b.
>   INFO planner Adding new disk alsike:alsike_home.
>   START driver date 20050310
>   START taper datestamp 20050310 label Norstead01 tape 0
>   FINISH planner date 20050310
>   STATS driver startup time 93.144
>   SUCCESS dumper alsike alsike_boot 20050310 0 [sec 2.967 kb 28284 kps 9532.0 
> orig-kb 31700]
>   INFO taper tape Norstead01 kb 32 fm 1 writing file: Input/output error
>   FAIL taper alsike alsike_boot 20050310 0 [out of tape]
>   ERROR taper no-tape [[cannot overwrite active tape Norstead01]]
>   WARNING driver going into degraded mode because of tape error.
>   SUCCESS dumper alsike alsike_archive_a 20050310 0 [sec 1440.600 kb 13208871 
> kps 9169.0 orig-kb 15927860]
>
> /etc/amanda/Norstead/amanda.conf:
>
>   #
>   # amanda.conf - NorsteadDailySet1
>   #
>   # If your configuration is called, say, "DailySet1", then this file
>   # normally goes in /etc/amanda/DailySet1/amanda.conf.
>   # for explanation of the parameters refer to amanda(8) and
>   # /usr/doc/amanda/WHATS.NEW.gz 
>   
>   org "NorsteadDailySet1"       # your organization name for reports
>   mailto "root"         # space separated list of operators at your site
>   dumpuser "backup"     # the user to run dumps under
>   
>   inparallel 4          # maximum dumpers that will run in parallel
>   netusage  600         # maximum net bandwidth for Amanda, in KB per sec
>   
>   # a filesystem is due for a full backup once every <dumpcycle> days
>   dumpcycle 4 weeks     # the number of days in the normal dump cycle
>   tapecycle 8 tapes     # the number of tapes in rotation
>   runtapes 3    # The maximum number of tapes used in a single run.  Note that
>                 # this is an upper bound on the number of tapes, and Amanda 
> may
>                 # use less.
>   
>   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
>   
>   #tpchanger "no-changer" # the tape-changer glue script, see TAPE.CHANGERS
>   tapedev       "/dev/nst0"     # the (no-rewind!) tape device.
>   tapetype DLT-IV               # what kind of tape it is (see tapetypes 
> below)
>   labelstr "^Norstead[0-9][0-9]*$"  # label constraint regex: all tapes
>                                   # must match.
>   taperalgo largestfit  # Do The largest dump image that will fit on the
>                         # current tape next.
>   
>   diskdir "/var/spool/amanda"  # where the holding disk is
>   disksize 130 GB       # how much space can we use on it
>   reserve 20            # Always set aside at least 20% of disksize for
>                         # incrementals.
>   autoflush on          # amdump run will flush the dump already on holding 
> disk
>                         # to tape.
>   
>     infofile "/var/lib/amanda/Norstead/curinfo"   # database filename
>   indexdir "/var/lib/amanda/Norstead/index"     # where the index files live
>   logfile  "/var/log/amanda/Norstead/log"       # log filename
>   
>   # tapetypes
>   define tapetype DLT-IV {
>       comment "Digital Linear Tape IV"
>       lbl-templ "/etc/amanda/DLT.ps"
>       length 40000 mbytes
>       filemark 8 kbytes
>       speed 6000 kbytes
>   }
>   
>   # dumptypes
>   define dumptype norstead-std-tar {
>       program "GNUTAR"
>       comment "partitions dumped with tar"
>       compress server fast
>       index
>       priority medium
>   }
>
>
>
> -- 
>
> Bruce S. Skinner
> Defence R&D Canada - Atlantic
> 9 Grove St.              <mailto:Bruce.Skinner AT drdc-rddc.gc DOT ca>
> P.O. Box 1012            <http://www.drdc-rddc.dnd.ca>
> Dartmouth  NS
> CANADA                    tel: (902) 426-3100 x205
> B2Y 3Z7                   fax: (902) 426-9654
>

-- 
Kevin Dalley
kevin AT kelphead DOT org