]> git.wh0rd.org - dump.git/commitdiff
Make BREADEMAX adjustable with the -I option to dump.
authorStelian Pop <stelian@popies.net>
Sun, 11 Nov 2001 00:06:39 +0000 (00:06 +0000)
committerStelian Pop <stelian@popies.net>
Sun, 11 Nov 2001 00:06:39 +0000 (00:06 +0000)
CHANGES
THANKS
dump/dump.8.in
dump/dump.h
dump/main.c
dump/traverse.c

diff --git a/CHANGES b/CHANGES
index 755423f67fa321f2e67983b2502a009e8906f64d..cdb7894f6766e763c41a38c6f542abc9d5133e5b 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -1,4 +1,4 @@
-$Id: CHANGES,v 1.140 2001/10/02 09:41:24 stelian Exp $
+$Id: CHANGES,v 1.141 2001/11/11 00:06:39 stelian Exp $
 
 Changes between versions 0.4b24 and 0.4b25 (released ??????????????????)
 ========================================================================
 
 Changes between versions 0.4b24 and 0.4b25 (released ??????????????????)
 ========================================================================
@@ -6,6 +6,17 @@ Changes between versions 0.4b24 and 0.4b25 (released ??????????????????)
 1.     Added a mini howto from Patrick Walsh in the examples 
        directory.
 
 1.     Added a mini howto from Patrick Walsh in the examples 
        directory.
 
+2.     Minor man pages syntax corrections. Thanks to
+       Chris Danis <screechco@home.com> for reporting the bugs.
+
+3.     Added a script from David B. Peterson <dave@toppledwagon.com>
+       to the examples section. It features dumping several
+       filesystems to a remote tape drive upon ssh.
+
+4.     Added a patch provided by Richard Jones <rich@annexia.org>
+       which allows BRADEMAX (number of read errors tolerated by
+       dump) to be adjusted using the -I option.
+
 Changes between versions 0.4b23 and 0.4b24 (released September 12, 2001)
 ========================================================================
 
 Changes between versions 0.4b23 and 0.4b24 (released September 12, 2001)
 ========================================================================
 
diff --git a/THANKS b/THANKS
index 4e4b0f8155f6d706ca4ecff39cfdabf530c2f660..9336679a2637d49982642fe8e03fbb0875d7720f 100644 (file)
--- a/THANKS
+++ b/THANKS
@@ -1,4 +1,4 @@
-$Id: THANKS,v 1.47 2001/09/06 09:00:31 stelian Exp $
+$Id: THANKS,v 1.48 2001/11/11 00:06:39 stelian Exp $
 
 Dump and restore were written by the people of the CSRG at the University
 of California, Berkeley.
 
 Dump and restore were written by the people of the CSRG at the University
 of California, Berkeley.
@@ -29,6 +29,7 @@ Rob Cermak            cermak@ahab.rutgers.edu
 Isaac Chuang           ike@isl.stanford.edu
 Rainer Clasen          bj@ncc.cicely.de
 W. Reilly Cooley       wcooley@nakedape.cc
 Isaac Chuang           ike@isl.stanford.edu
 Rainer Clasen          bj@ncc.cicely.de
 W. Reilly Cooley       wcooley@nakedape.cc
+Chris Danis            screechco@home.com
 Abhijit Dasgupta       abhijit@ans.net
 John R. Dennison       gerdesas@users.sourceforge.net
 Andreas Dilger         adilger@turbolinux.com
 Abhijit Dasgupta       abhijit@ans.net
 John R. Dennison       gerdesas@users.sourceforge.net
 Andreas Dilger         adilger@turbolinux.com
@@ -44,6 +45,7 @@ Jean-Paul van der Jagt        jeanpaul@dutepp0.et.tudelft.nl
 Helmut Jarausch                jarausch@igpm.rwth-aachen.de
 Eric Jergensen         eric@dvns.com
 Jeff Johnson           jbj@redhat.com
 Helmut Jarausch                jarausch@igpm.rwth-aachen.de
 Eric Jergensen         eric@dvns.com
 Jeff Johnson           jbj@redhat.com
+Richard Jones           rich@annexia.org
 Charles Karney         karney@users.sourceforge.net
 Henry Katz             hkatz@hkatz.dialup.access.net
 Klaus Kudielka         kkudielk@cacofonix.nt.tuwien.ac.at
 Charles Karney         karney@users.sourceforge.net
 Henry Katz             hkatz@hkatz.dialup.access.net
 Klaus Kudielka         kkudielk@cacofonix.nt.tuwien.ac.at
@@ -60,6 +62,7 @@ Lukas Nellen          L.Nellen@ThPhys.Uni-Heidelberg.DE
 Nuno Oliveira          nuno@eq.uc.pt
 Brent Olson            night@halcyon.com
 Jerry Peters           gapeters@worldnet.att.net
 Nuno Oliveira          nuno@eq.uc.pt
 Brent Olson            night@halcyon.com
 Jerry Peters           gapeters@worldnet.att.net
+David B. Peterson      dave@toppledwagon.com
 Dave Platt             dplatt@snulbug.mtview.ca.us
 Kenneth Porter         shiva@well.com
 Graham Reed            greed@users.sourceforge.net
 Dave Platt             dplatt@snulbug.mtview.ca.us
 Kenneth Porter         shiva@well.com
 Graham Reed            greed@users.sourceforge.net
index b3171cacc55bfed1233288bbefe99d1a939225a6..fa0578b9bf209c19375e0b7dd9f386f546ae959f 100644 (file)
@@ -30,7 +30,7 @@
 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
 .\" SUCH DAMAGE.
 .\"
 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
 .\" SUCH DAMAGE.
 .\"
-.\"    $Id: dump.8.in,v 1.33 2001/11/10 23:50:59 stelian Exp $
+.\"    $Id: dump.8.in,v 1.34 2001/11/11 00:06:39 stelian Exp $
 .\"
 .Dd __DATE__
 .Dt DUMP 8
 .\"
 .Dd __DATE__
 .Dt DUMP 8
@@ -49,6 +49,7 @@
 .Op Fl f Ar file
 .Op Fl F Ar script
 .Op Fl h Ar level
 .Op Fl f Ar file
 .Op Fl F Ar script
 .Op Fl h Ar level
+.Op Fl I Ar nr errors
 .Op Fl j Ar compression level
 .Op Fl L Ar label
 .Op Fl Q Ar file
 .Op Fl j Ar compression level
 .Op Fl L Ar label
 .Op Fl Q Ar file
@@ -221,6 +222,15 @@ For security reasons,
 .Nm
 reverts back to the real user ID and the real group ID before 
 running the script.
 .Nm
 reverts back to the real user ID and the real group ID before 
 running the script.
+.It Fl I Ar nr errors
+By default,
+.Nm
+will ignore the first 32 read errors on the file
+system before asking for operator intervention. You can change this
+using this flag to any value. This is useful when running
+.Nm
+on an active filesystem where read errors simply indicate an
+inconsistency between the mapping and dumping passes.
 .It Fl j Ar compression level
 Compress every block to be written on the tape using bzlib library. This
 option will work only when dumping to a file or pipe or, when dumping
 .It Fl j Ar compression level
 Compress every block to be written on the tape using bzlib library. This
 option will work only when dumping to a file or pipe or, when dumping
@@ -382,7 +392,7 @@ end of tape,
 end of dump,
 tape write error,
 tape open error or
 end of dump,
 tape write error,
 tape open error or
-disk read error (if there is more than a threshold of 32).
+disk read error (if there is more than a threshold of nr errors).
 In addition to alerting all operators implied by the
 .Fl n
 key,
 In addition to alerting all operators implied by the
 .Fl n
 key,
@@ -514,7 +524,8 @@ abnormal termination is indicated with an exit code of 3.
 It might be considered a bug that this version of dump can only handle ext2
 filesystems.  Specifically, it does not work with FAT filesystems.
 .Pp
 It might be considered a bug that this version of dump can only handle ext2
 filesystems.  Specifically, it does not work with FAT filesystems.
 .Pp
-Fewer than 32 read errors on the filesystem are ignored. If noticing
+Fewer than 32 read errors (change this with -I)
+on the filesystem are ignored. If noticing
 read errors is important, the output from dump can be parsed to look for lines
 that contain the text 'read error'.
 .Pp
 read errors is important, the output from dump can be parsed to look for lines
 that contain the text 'read error'.
 .Pp
index 4f46fa446056a60537b18f01e0b163e93e09f8d1..5d22dbba3aab1b1e0fe5d4fead99b38b90acb643 100644 (file)
@@ -5,7 +5,7 @@
  *     Stelian Pop <pop@noos.fr>, 1999-2000
  *     Stelian Pop <pop@noos.fr> - Alcôve <www.alcove.fr>, 2000
  *
  *     Stelian Pop <pop@noos.fr>, 1999-2000
  *     Stelian Pop <pop@noos.fr> - Alcôve <www.alcove.fr>, 2000
  *
- *     $Id: dump.h,v 1.32 2001/08/16 15:24:21 stelian Exp $
+ *     $Id: dump.h,v 1.33 2001/11/11 00:06:39 stelian Exp $
  */
 
 /*-
  */
 
 /*-
@@ -77,6 +77,7 @@ extern int    bzipflag;       /* compression is done using bzlib */
 extern int     uflag;          /* update flag */
 extern int     Mflag;          /* multi-volume flag */
 extern int     qflag;          /* quit on errors flag */
 extern int     uflag;          /* update flag */
 extern int     Mflag;          /* multi-volume flag */
 extern int     qflag;          /* quit on errors flag */
+extern int      breademax;      /* maximum number of bread errors before we quit */
 extern char    *eot_script;    /* end of volume script fiag */
 extern int     diskfd;         /* disk file descriptor */
 extern int     tapefd;         /* tape file descriptor */
 extern char    *eot_script;    /* end of volume script fiag */
 extern int     diskfd;         /* disk file descriptor */
 extern int     tapefd;         /* tape file descriptor */
index 722ca71e1764bb5fd381818210011d26155fa5ca..e1d3db366f67da6e606b922263e438af8fd20852 100644 (file)
@@ -41,7 +41,7 @@
 
 #ifndef lint
 static const char rcsid[] =
 
 #ifndef lint
 static const char rcsid[] =
-       "$Id: main.c,v 1.60 2001/09/06 09:00:32 stelian Exp $";
+       "$Id: main.c,v 1.61 2001/11/11 00:06:39 stelian Exp $";
 #endif /* not lint */
 
 #include <config.h>
 #endif /* not lint */
 
 #include <config.h>
@@ -107,6 +107,7 @@ int bzipflag;       /* compression is done using bzlib */
 int    uflag;          /* update flag */
 int    Mflag;          /* multi-volume flag */
 int    qflag;          /* quit on errors flag */
 int    uflag;          /* update flag */
 int    Mflag;          /* multi-volume flag */
 int    qflag;          /* quit on errors flag */
+int     breademax = 32; /* maximum number of bread errors before we quit */
 char   *eot_script;    /* end of volume script fiag */
 int    diskfd;         /* disk file descriptor */
 int    tapefd;         /* tape file descriptor */
 char   *eot_script;    /* end of volume script fiag */
 int    diskfd;         /* disk file descriptor */
 int    tapefd;         /* tape file descriptor */
@@ -236,7 +237,7 @@ main(int argc, char *argv[])
 #endif /* USE_QFA */
 
        while ((ch = getopt(argc, argv,
 #endif /* USE_QFA */
 
        while ((ch = getopt(argc, argv,
-                           "0123456789aB:b:cd:e:E:f:F:h:"
+                           "0123456789aB:b:cd:e:E:f:F:h:I:"
 #ifdef HAVE_BZLIB
                            "j::"
 #endif
 #ifdef HAVE_BZLIB
                            "j::"
 #endif
@@ -333,6 +334,11 @@ main(int argc, char *argv[])
                        break;
 #endif /* HAVE_BZLIB */
 
                        break;
 #endif /* HAVE_BZLIB */
 
+               case 'I':
+                       breademax =
+                         numarg ("number of errors to ignore", 1L, 0L);
+                       break;
+
 #ifdef KERBEROS
                case 'k':
                        dokerberos = 1;
 #ifdef KERBEROS
                case 'k':
                        dokerberos = 1;
@@ -979,6 +985,7 @@ usage(void)
                "MnqSu"
                "] [-B records] [-b blocksize] [-d density]\n"
                "\t%s [-e inode#,inode#,...] [-E file] [-f file] [-h level] "
                "MnqSu"
                "] [-B records] [-b blocksize] [-d density]\n"
                "\t%s [-e inode#,inode#,...] [-E file] [-f file] [-h level] "
+               "[-I nr errors] "
 #ifdef HAVE_BZLIB
                "[-j zlevel] "
 #endif
 #ifdef HAVE_BZLIB
                "[-j zlevel] "
 #endif
index 975f6f82e3bf8957c28dd937a68a68ce05ffd905..ffcac8842cab2c9f4560ef7a5ccf845db26263ba 100644 (file)
@@ -41,7 +41,7 @@
 
 #ifndef lint
 static const char rcsid[] =
 
 #ifndef lint
 static const char rcsid[] =
-       "$Id: traverse.c,v 1.38 2001/08/17 09:55:09 stelian Exp $";
+       "$Id: traverse.c,v 1.39 2001/11/11 00:06:39 stelian Exp $";
 #endif /* not lint */
 
 #include <config.h>
 #endif /* not lint */
 
 #include <config.h>
@@ -1239,11 +1239,10 @@ getino(dump_ino_t inum)
 /*
  * Read a chunk of data from the disk.
  * Try to recover from hard errors by reading in sector sized pieces.
 /*
  * Read a chunk of data from the disk.
  * Try to recover from hard errors by reading in sector sized pieces.
- * Error recovery is attempted at most BREADEMAX times before seeking
+ * Error recovery is attempted at most breademax times before seeking
  * consent from the operator to continue.
  */
 int    breaderrors = 0;
  * consent from the operator to continue.
  */
 int    breaderrors = 0;
-#define        BREADEMAX 32
 
 void
 bread(daddr_t blkno, char *buf, int size)
 
 void
 bread(daddr_t blkno, char *buf, int size)
@@ -1282,9 +1281,9 @@ loop:
        else
                msg("short read error from %s: [block %d]: count=%d, got=%d\n",
                        disk, blkno, size, cnt);
        else
                msg("short read error from %s: [block %d]: count=%d, got=%d\n",
                        disk, blkno, size, cnt);
-       if (++breaderrors > BREADEMAX) {
+       if (++breaderrors > breademax) {
                msg("More than %d block read errors from %d\n",
                msg("More than %d block read errors from %d\n",
-                       BREADEMAX, disk);
+                       breademax, disk);
                broadcast("DUMP IS AILING!\n");
                msg("This is an unrecoverable error.\n");
                if (!query("Do you want to attempt to continue?")){
                broadcast("DUMP IS AILING!\n");
                msg("This is an unrecoverable error.\n");
                if (!query("Do you want to attempt to continue?")){