From cjohnson@camelot.com  Tue Apr  4 10:07:10 2000
Return-Path: <cjohnson@camelot.com>
Received: from galahad.camelot.com (Galahad.Camelot.com [192.55.203.135])
	by hub.freebsd.org (Postfix) with ESMTP id 1BC6A37B9A1
	for <FreeBSD-gnats-submit@freebsd.org>; Tue,  4 Apr 2000 10:07:10 -0700 (PDT)
	(envelope-from cjohnson@camelot.com)
Received: by galahad.camelot.com (Postfix, from userid 2455)
	id C6F2612C19; Tue,  4 Apr 2000 13:07:07 -0400 (EDT)
Message-Id: <20000404170707.C6F2612C19@galahad.camelot.com>
Date: Tue,  4 Apr 2000 13:07:07 -0400 (EDT)
From: cjohnson@camelot.com
Reply-To: cjohnson@camelot.com
To: FreeBSD-gnats-submit@freebsd.org
Subject: Restore does not handle bad or missing tapes well.
X-Send-Pr-Version: 3.2

>Number:         17791
>Category:       bin
>Synopsis:       Restore does not handle bad or missing tapes well.
>Confidential:   no
>Severity:       critical
>Priority:       medium
>Responsible:    iedowse
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Tue Apr  4 10:10:01 PDT 2000
>Closed-Date:    Fri Mar 1 13:37:03 PST 2002
>Last-Modified:  Fri Mar 01 13:44:03 PST 2002
>Originator:     Christopher T. Johnson
>Release:        FreeBSD 4.0-RELEASE i386
>Organization:
Paladin Software
>Environment:

FreeBSD 4.0-RELEASE with EXABYTE 8200

>Description:

Did full back up of 5GBytes of data onto 4 tapes using dump.
First two tapes are full with no errors.  3rd tape had IO error shortly
into writing.  Dump then asked for 4th tape and completed the dump to that
tape.

On restoring this data, when restore found the IO error on tape 3 it 
did not allow a method for moving on.  Selecting "continue" caused it to
retry over and over again.  Never moving past the error, never generating
an ENOSPACE (End of Tape) error.  When the question is answered "no" the
restore ends.

restore -Rf /dev/rsa0 demanded tape 3 again, it wouldn't let me put tape
4 into the drive.  Modifying /usr/src/sbin/restore/tape.c to make
'R' ask the user for the tape volume number.  This allowed me to move on
to the last tape which then told me about lots of missing files (Lost
on the dump or restore?)  Finally it read the last of tape four and ended
WITHOUT SETTING OWNERS OF PERMISSIONS!

>How-To-Repeat:

see description.

>Fix:

Well, this will get the data in but I don't like it at all.

RCS file: /usr/cvsroot/src/sbin/restore/tape.c,v
retrieving revision 1.16
diff -u -r1.16 tape.c
--- tape.c      1999/08/28 00:14:08     1.16
+++ tape.c      2000/04/03 06:13:57
@@ -315,7 +315,7 @@
 again:
        if (pipein)
                done(1); /* pipes do not get a second chance */
-       if (command == 'R' || command == 'r' || curfile.action != SKIP) {
+       if (command == 'r' || curfile.action != SKIP) {
                newvol = nextvol;
                wantnext = 1;
        } else {



>Release-Note:
>Audit-Trail:

From: "Christopher T. Johnson" <cjohnson@camelot.com>
To: freebsd-gnats-submit@FreeBSD.org, cjohnson@camelot.com
Cc:  
Subject: Re: bin/17791: Restore does not handle bad or missing tapes well.
Date: Wed, 05 Apr 2000 09:19:15 -0400

 As pointed out to me by a very nice person, to get the permissions of
 the
 directories reset correctly you load the first tape and do:
 
     restore -if /dev/rsa0
     add
     setmodes
     quit
 
 
 
Class-Changed-From-To: sw-bug->change-request 
Class-Changed-By: mjacob 
Class-Changed-When: Sun Oct 29 10:41:05 PST 2000 
Class-Changed-Why:  
This is a change request. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=17791 
Responsible-Changed-From-To: freebsd-bugs->mjacob 
Responsible-Changed-By: mjacob 
Responsible-Changed-When: Mon Oct 1 18:58:51 PDT 2001 
Responsible-Changed-Why:  
I might as well eventually look at this one. 
. 

http://www.FreeBSD.org/cgi/query-pr.cgi?pr=17791 
State-Changed-From-To: open->closed 
State-Changed-By: iedowse 
State-Changed-When: Fri Mar 1 13:37:03 PST 2002 
State-Changed-Why:  

This has been fixed in both -CURRENT and -STABLE; restore's handling 
of multi-volume dumps had a lot of bugs, most of which are hopefully 
now fixed. To get the fixed version you will need to either cvsup 
to -STABLE, or wait for 4.6-RELEASE. 


Class-Changed-From-To: change-request->sw-bug 
Class-Changed-By: iedowse 
Class-Changed-When: Fri Mar 1 13:37:03 PST 2002 
Class-Changed-Why:  
This really was a bug. 


Responsible-Changed-From-To: mjacob->iedowse 
Responsible-Changed-By: iedowse 
Responsible-Changed-When: Fri Mar 1 13:37:03 PST 2002 
Responsible-Changed-Why:  
I'm interested in any followups. 

http://www.FreeBSD.org/cgi/query-pr.cgi?pr=17791 
>Unformatted:
