From owner-freebsd-scsi Thu Jan 18 14: 4:55 2001 Delivered-To: freebsd-scsi@freebsd.org Received: from h23.estsatnet (gw.estinc.com [216.216.240.51]) by hub.freebsd.org (Postfix) with ESMTP id 2FC0A37B400; Thu, 18 Jan 2001 14:04:38 -0800 (PST) Received: from localhost (IDENT:eric@localhost.localdomain [127.0.0.1]) by h23.estsatnet (8.9.3/8.9.3) with ESMTP id PAA10238; Thu, 18 Jan 2001 15:06:20 -0700 Date: Thu, 18 Jan 2001 15:06:20 -0700 (MST) From: Eric Lee Green X-Sender: eric@h23.estsatnet To: Mike Smith Cc: mjacob@feral.com, freebsd-scsi@FreeBSD.ORG Subject: Re: Troubles with Mammoth2 if there is a tape error In-Reply-To: <200101182023.f0IKNNQ00888@mass.osd.bsdi.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-scsi@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org On Thu, 18 Jan 2001, Mike Smith wrote: > > Well, I can annoy the frick out of even more people and declare that Deferred > > Media errors *also* make the tape state frozen (thus nuking dd and causeing > > you to do an EOM, REWIND or OFFLINE to get state back to a known place > > (actually, setting specific block position should do it too- need to remember > > to do this...).... Allowing setting specific block position to clear state would be useful for some backup programs, I think, ones that try to verify the current tape before moving to the next one. BRU Pro does not do that (it does the write, no matter how many tapes it takes, then does the verify starting back with the first tape, in an attempt to reduce the backup window), but I can see how people with standalone tape drives in particular would prefer a backup program that did the verify on a tape-by-tape basis. This would also allow the backup program to detirmine how many blocks of data actually did get written, so that it knows how many blocks (out of its buffer) need to be prepended to the next tape prior to starting to write new blocks of data. > A 'deferred media error' basically just tells you that the tape you've > just written is now junk (because it's corrupt), and the only correct > actions I can think of are: > > - eject and discard > - rewind, erase and retry The nastiness behind 'deferred media error' is that it means that data was reported written to the tape when it actually did not make it to the tape. This is Evil(tm). This means that the backup program lost data without knowing it. With BRU or afio that means you'd lose a block or two of data, maybe one or two files. With compressed or gzipped 'tar', that means the rest of the archive is unreadable. Now you know why I prefer afio or BRU to 'tar' for tape backups (if I didn't work for the BRU guys, I'd use afio). In any event, the important thing is that it gets reported as an error to the tape backup program as soon as possible. The tape backup program will then rewind the tape, eject it, and ask for the next tape (well, it'll rewind the tape and eject it if it's a tape program that's more sophisticated than 'tar' :-). . Whether the tape backup program starts rewriting from scratch or decides to continue where it left off (perhaps prepending the new data with some buffered data that was written at the end of the previous tape) is an issue for the applications writer. So yes, I think that a deferred media error making the tape state frozen would probably be preferred by tape backup software authors. Of course, if it happens to break *MY* software I'll be yelling as much as the rest of the crowd (grin). -- Eric Lee Green eric@estinc.com Software Engineer "The BRU Guys" Enhanced Software Technologies, Inc. http://www.estinc.com/ (602) 470-1115 voice (602) 470-1116 fax To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-scsi" in the body of the message