From owner-freebsd-bugs@FreeBSD.ORG Wed Apr 23 14:50:17 2003 Return-Path: Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id AA64537B401 for ; Wed, 23 Apr 2003 14:50:17 -0700 (PDT) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 7C43A43F75 for ; Wed, 23 Apr 2003 14:50:15 -0700 (PDT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.12.9/8.12.9) with ESMTP id h3NLoFUp087619 for ; Wed, 23 Apr 2003 14:50:15 -0700 (PDT) (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.12.9/8.12.9/Submit) id h3NLoFNN087617; Wed, 23 Apr 2003 14:50:15 -0700 (PDT) Resent-Date: Wed, 23 Apr 2003 14:50:15 -0700 (PDT) Resent-Message-Id: <200304232150.h3NLoFNN087617@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Nicholas Paufler Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 25EC037B401 for ; Wed, 23 Apr 2003 14:43:16 -0700 (PDT) Received: from asgard.incentre.net (asgard.incentre.net [206.75.213.14]) by mx1.FreeBSD.org (Postfix) with ESMTP id 665B543F3F for ; Wed, 23 Apr 2003 14:43:15 -0700 (PDT) (envelope-from npaufler@asgard.incentre.net) Received: from asgard.incentre.net (localhost [127.0.0.1]) by asgard.incentre.net (8.12.8p1/8.12.8) with ESMTP id h3NLi12g000605 for ; Wed, 23 Apr 2003 15:44:01 -0600 (MDT) (envelope-from npaufler@asgard.incentre.net) Received: (from npaufler@localhost) by asgard.incentre.net (8.12.8p1/8.12.8/Submit) id h3NLi1WR000604; Wed, 23 Apr 2003 15:44:01 -0600 (MDT) Message-Id: <200304232144.h3NLi1WR000604@asgard.incentre.net> Date: Wed, 23 Apr 2003 15:44:01 -0600 (MDT) From: Nicholas Paufler To: FreeBSD-gnats-submit@FreeBSD.org X-Send-Pr-Version: 3.113 Subject: kern/51332: QUIRK: BNCHMARK DLT1 requires SA_QUIRK_1FM X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: Nicholas Paufler List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 23 Apr 2003 21:50:18 -0000 >Number: 51332 >Category: kern >Synopsis: QUIRK: BNCHMARK DLT1 requires SA_QUIRK_1FM >Confidential: no >Severity: serious >Priority: medium >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Wed Apr 23 14:50:14 PDT 2003 >Closed-Date: >Last-Modified: >Originator: Nicholas Paufler >Release: FreeBSD 4.8-RELEASE i386 >Organization: The Internet Centre >Environment: System: FreeBSD asgard.incentre.net 4.8-RELEASE FreeBSD 4.8-RELEASE #3: Wed Apr 23 14:40:16 MDT 2003 root@asgard.incentre.net:/usr/src/sys/compile/ASGARD i386 camcontrol devlist: at scbus0 target 6 lun 0 (pass0,sa0) mt status: Mode Density Blocksize bpi Compression Current: same variable 0 IDRC ---------available modes--------- 0: same variable 0 IDRC 1: same variable 0 IDRC 2: same variable 0 IDRC 3: same variable 0 IDRC --------------------------------- Current Driver State: at rest. --------------------------------- File Number: 0 Record Number: 0 Residual Count 0 >Description: The Benchmark DLT1 drive (rebadged by Dell, among others) requires the SA_QUIRK_1FM Quirk. Two EOT filemarks are always written after every write, making restores non-obvious and causes some software (i.e. flexbackup) to break on restores. >How-To-Repeat: mt rewind (whatever commands you use to write data out to the tape, i.e. afio, pax, or some frontend utility like flexbackup) mt rewind (append another file, i.e. an incremental backup, using similar commands) mt rewind mt fsf 2 (that should bring you to the second file on the tape) (execute whatever commands to restore and it will fail. repeat the restore command imediately and it will work, because the position has advanced by one) mt geteotmodel shows: /dev/nsa0: the model is 2 filemarks at EOT >Fix: I applied the following patch to /usr/src/sys/cam/scsi/scsi_sa.c I belive that at least one of the TANDBERG devices already listed in Quirks is also using the Benchmark DLT1 tech. As I had no need to tweak the block size I left it at 0 (which I am assuming means don't force it to anything). Likewise I didn't need to play with the compression at all. After applying the patch, mt geteotmodel does still show 2 filemarks as being used, but it is quite obvious that only one is being written because mt is correctly able to position for reads and I am able to restore normally. Please let me know if I've missed anything. It took me a few days of work to track down what was happening (and a helpful suggestion from the flexbackup author) and I'd like to see this resolved. --- bnchmark.patch begins here --- --- scsi_sa.c Wed Apr 23 14:23:14 2003 +++ dlt.scsi_sa.c Wed Apr 23 14:27:58 2003 @@ -298,6 +298,10 @@ { T_SEQUENTIAL, SIP_MEDIA_REMOVABLE, "ARCHIVE", "VIPER 2525*", "*"}, SA_QUIRK_FIXED|SA_QUIRK_1FM, 1024 }, + { + { T_SEQUENTIAL, SIP_MEDIA_REMOVABLE, "BNCHMARK", + " DLT1 3213*", "*"}, SA_QUIRK_1FM, 0 + }, #if 0 { { T_SEQUENTIAL, SIP_MEDIA_REMOVABLE, "HP", --- bnchmark.patch ends here --- >Release-Note: >Audit-Trail: >Unformatted: