Hi Jukka,

Could you try the attached patch.

If it doesn't work, try the following command:
mt -f <dev> rewind
mt -f <dev> fsf 12
dd if=<dev> bs=32k count=1

Send me the output of the dd command.

Jean-Louis

On Fri, Jun 03, 2005 at 01:14:09PM +0200, Jukka Salmi wrote:
> Hi,
> 
> on a Amanda 2.4.4p4 system which ran fine for some months I noticed today
> amverify was still running after about 5 hours; normally it only takes some
> minutes to complete. I killed the process, and then received the so far
> missing verify report (which was about 3MB...). For some reasons a certain
> file system was checked over and over again:
> 
> ----- AMANDA VERIFY REPORT ---
> Tapes:  DAILY02 
> Errors found:
> aborted! 
>    
> amverify Daily
> Fri Jun  3 03:50:13 CEST 2005
>   
> Loading current slot...
> Using device file:/var/amanda/vtapes/Daily
> Volume DAILY02, Date 20050603
> Checked host1._pkgbuild_etc.20050603.1
> Checked host2._.20050603.1 
> Checked host1._pkgbuild_home.20050603.0
> Checked host2._usr.20050603.1
> Checked host1._src.20050603.1
> Checked host2._var.20050603.1
> Checked host2._etc.20050603.0
> Checked host1._.20050603.1
> Checked host1._etc.20050603.0
> Checked host1._var_spool_imap.20050603.1
> Checked host2._home.20050603.0
> Checked host1._opt.20050603.1
> Checked host1._opt.20050603.1
> Checked host1._opt.20050603.1
> Checked host1._opt.20050603.1
> Checked host1._opt.20050603.1
> [ ... about 70000 identical lines skipped ... ]
> Checked host1._opt.20050603.1
> Checked host1._opt.20050603.1
> Checked host1._opt.20050603.1
> aborted!
> ----- END OF AMANDA VERIFY REPORT -----
> 
> This is 100% reproducible. Unfortunately I can't find the source of the
> problem. Hints are welcome!
> 
> 
> TIA, Jukka
> 
> P.S.: this is on NetBSD 2.0 with Amanda built from pkgsrc, in case this
> matters.
> 
> -- 
> bashian roulette:
> $ ((RANDOM%6)) || rm -rf ~

-- 
Jean-Louis Martineau             email: [EMAIL PROTECTED] 
D�partement IRO, Universit� de Montr�al
C.P. 6128, Succ. CENTRE-VILLE    Tel: (514) 343-6111 ext. 3529
Montr�al, Canada, H3C 3J7        Fax: (514) 343-5834
--- amanda-2.4.4/restore-src/amrestore.c        2004-11-19 08:17:15.000000000 
-0500
+++ amanda-2.4.5/restore-src/amrestore.c        2004-11-19 13:12:30.000000000 
-0500
@@ -24,7 +24,7 @@
  * file named AUTHORS, in the root directory of this distribution.
  */
 /*
- * $Id: amrestore.c,v 1.28.2.4.4.3.2.10 2004/11/19 13:17:15 martinea Exp $
+ * $Id: amrestore.c,v 1.28.2.4.4.3.2.8.2.3 2004/11/19 18:12:30 martinea Exp $
  *
  * retrieves files from an amanda tape
  */
@@ -482,6 +482,7 @@
     char *e;
     char *err;
     char *label = NULL;
+    int count_error;
 
     for(fd = 3; fd < FD_SETSIZE; fd++) {
        /*
@@ -667,24 +668,28 @@
                        get_pname());
     }
 
-    while(file.type == F_TAPESTART || file.type == F_DUMPFILE) {
-       amfree(filename);
-       filename = make_filename(&file);
+    count_error=0;
+    while(count_error < 10) {
+       if(file.type == F_TAPEEND) break;
        found_match = 0;
-       for(me = match_list; me; me = me->next) {
-           if(disk_match(&file,me->datestamp,me->hostname,me->diskname) != 0) {
-               found_match = 1;
-               break;
+       if(file.type == F_DUMPFILE) {
+           amfree(filename);
+           filename = make_filename(&file);
+           for(me = match_list; me; me = me->next) {
+               if(disk_match(&file,me->datestamp,me->hostname,me->diskname) != 
0) {
+                   found_match = 1;
+                   break;
+               }
+           }
+           fprintf(stderr, "%s: %3d: %s ",
+                           get_pname(),
+                           file_number,
+                           found_match ? "restoring" : "skipping");
+           if(file.type != F_DUMPFILE) {
+               print_header(stderr, &file);
+           } else {
+               fprintf(stderr, "%s\n", filename);
            }
-       }
-       fprintf(stderr, "%s: %3d: %s ",
-                       get_pname(),
-                       file_number,
-                       found_match ? "restoring" : "skipping");
-       if(file.type != F_DUMPFILE) {
-           print_header(stderr, &file);
-       } else {
-           fprintf(stderr, "%s\n", filename);
        }
        if(found_match) {
            restore(&file, filename, isafile);
@@ -718,6 +723,7 @@
            if((tapedev = tape_open(tapename, 0)) < 0) {
                error("could not open %s: %s", tapename, strerror(errno));
            }
+           count_error++;
        } else {
            /*
             * If the last read got something (even an error), we can
@@ -726,6 +732,7 @@
            if(tapefd_fsf(tapedev, 1) < 0) {
                error("could not fsf %s: %s", tapename, strerror(errno));
            }
+           count_error=0;
        }
        file_number++;
        read_file_header(&file, isafile);
--- amanda-2.4.4/server-src/amverify.sh.in      2004-10-04 07:47:06.000000000 
-0400
+++ amanda-2.4.5/server-src/amverify.sh.in      2004-11-19 13:12:30.000000000 
-0500
@@ -1,6 +1,6 @@
 #! /bin/sh
 #
-#      $Id: amverify.sh.in,v 1.7.2.13.4.5.2.7 2004/10/04 11:47:06 martinea Exp 
$
+#      $Id: amverify.sh.in,v 1.7.2.13.4.5.2.6.2.2 2004/11/19 18:12:30 martinea 
Exp $
 #
 # (C) 1996 by ICEM Systems GmbH
 # Author: Axel Zinser ([EMAIL PROTECTED])
@@ -428,6 +428,7 @@
                FILE=`grep restoring $TEMP/amrestore.out \
                        | sed 's/^.*restoring //'`
                EOF=`grep "reached end of tape" $TEMP/amrestore.out`
+               EOI=`grep "reached end of information" $TEMP/amrestore.out`
                # amrestore:   0: restoring sundae._mnt_sol1_usr.19961127.1
                if [ X"$FILE" != X"" -a X"$RESULT" = X"0" ]; then
                        report "Checked $FILE"
@@ -436,6 +437,9 @@
                elif [ -n "$EOF" ]; then
                        report "End-of-Tape detected."
                        break
+               elif [ -n "$EOI" ]; then
+                       report "End-of-Information detected."
+                       break
                else
                        report "** Error detected ($FILE)"
                        echo "$VOLUME ($FILE):" >>$DEFECTS

Reply via email to