From owner-freebsd-questions@FreeBSD.ORG Thu Feb 3 13:25:30 2005 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 386F916A4CE for ; Thu, 3 Feb 2005 13:25:30 +0000 (GMT) Received: from sdf.lonestar.org (mx.freeshell.org [192.94.73.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9ABB843D31 for ; Thu, 3 Feb 2005 13:25:29 +0000 (GMT) (envelope-from pieckiel@sdf.lonestar.org) Received: from sdf.lonestar.org (IDENT:pieckiel@sverige.freeshell.org [192.94.73.4]) by sdf.lonestar.org (8.13.1/8.12.10) with ESMTP id j13DOeX9020704; Thu, 3 Feb 2005 13:24:40 GMT Received: (from pieckiel@localhost) by sdf.lonestar.org (8.13.1/8.12.8/Submit) id j13DOeHQ018676; Thu, 3 Feb 2005 08:24:40 -0500 (EST) Date: Thu, 3 Feb 2005 08:24:40 -0500 From: "Kevin A. Pieckiel" To: David Bear Message-ID: <20050203132440.GC8804@SDF.LONESTAR.ORG> Mail-Followup-To: David Bear , freebsd-questions@freebsd.org References: <20050202190345.GA8804@SDF.LONESTAR.ORG> <20050202192926.GB8804@SDF.LONESTAR.ORG> <20050203012221.GF17337@asu.edu> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20050203012221.GF17337@asu.edu> User-Agent: Mutt/1.4.2.1i cc: freebsd-questions@freebsd.org Subject: Re: gtar failing, please help! X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 03 Feb 2005 13:25:30 -0000 On Wed, Feb 02, 2005 at 06:22:21PM -0700, David Bear wrote: > since you are using a tape, have you checked with > dmesg (for kernel message about the tape) > mt errstat (cryptic output, but maybe someone here could help) I get this in my dmesg output: (sa0:ahc0:0:1:0): AutoSense Failed (sa0:ahc0:0:1:0): WRITE FILEMARKS. CDB: 10 0 0 0 2 0 (sa0:ahc0:0:1:0): CAM Status: SCSI Status Error (sa0:ahc0:0:1:0): SCSI Status: Check Condition (sa0:ahc0:0:1:0): ILLEGAL REQUEST asc:24,0 (sa0:ahc0:0:1:0): Invalid field in CDB: Command byte 3 bit 1 is invalid (sa0:ahc0:0:1:0): Unretryable error (sa0:ahc0:0:1:0): failed to write terminating filemark(s) (sa0:ahc0:0:1:0): tape is now frozen- use an OFFLINE, REWIND or MTEOM command to clear this state. Of course, I can't use an OFFLINE, REWIND, or MTEOM command: # mt rewind mt: /dev/nsa0: Invalid argument # mt offline mt: /dev/nsa0: Invalid argument # mt mteom mt: mteom: unknown command # camcontrol reset 2:1:0 Reset of 2:1:0 was successful # mt status Mode Density Blocksize bpi Compression Current: 0x28:X3.224 variable 37871 0x4 ---------available modes--------- 0: 0x28:X3.224 variable 37871 0x4 1: 0x28:X3.224 variable 37871 0x4 2: 0x28:X3.224 variable 37871 0x4 3: 0x28:X3.224 variable 37871 0x4 --------------------------------- Current Driver State: at rest. --------------------------------- File Number: 0 Record Number: 0 Residual Count 0 What's funny is that I tried using bsdtar for the same backup used to produce the results above and, although it appears the tar command worked (no error messages on terminal), the tape is inaccessible, just like when I use gtar. This also gets put in dmesg: (sa0:ahc0:0:1:0): AutoSense Failed (sa0:ahc0:0:1:0): tape is now frozen- use an OFFLINE, REWIND or MTEOM command to clear this state. Here are some other dmesg messages that came across during playing with this thing. Do I need to get my tape drive serviced? (sa0:ahc0:0:1:0): parity error detected in Data-in phase. SEQADDR(0x55) SCSIRATE(0x93) (sa0:ahc0:0:1:0): parity error detected in Data-in phase. SEQADDR(0x1a1) SCSIRATE(0x93) (sa0:ahc0:0:1:0): tape is now frozen- use an OFFLINE, REWIND or MTEOM command to clear this state. (sa0:ahc0:0:1:0): tape is now frozen- use an OFFLINE, REWIND or MTEOM command to clear this state. (sa0:ahc0:0:1:0): AutoSense Failed (sa0:ahc0:0:1:0): tape is now frozen- use an OFFLINE, REWIND or MTEOM command to clear this state. Occasionally I can get output from an mt errstat command: Last I/O Residual: 0 Last I/O Command: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 Last I/O Sense: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 Last Control Residual: 0 Last Control Command: 08 00 00 20 00 00 00 00 00 00 00 00 00 00 00 00 Last Control Sense: F0 00 08 00 00 20 00 18 00 00 00 00 00 05 00 00 00 00 00 81 00 80 00 1D 0E 00 00 00 0C 00 00 00 This stuff means nothing to me. > or rather try > > dd if=/dev/zero of=/dev/nsa0 bs=512 count=10000 > > then play with different bs and count number. This will show you what > your tape block size is -- and if your tape has some kind of crc > error at a block, will also stop consistently at the same location. Interestingly enough, I get ZERO errors with this, for any (valid) value for bs or count: # dd if=/dev/zero of=/dev/nsa0 bs=512 count=10000 10000+0 records in 10000+0 records out 5120000 bytes transferred in 9.709399 secs (527324 bytes/sec) # dd if=/dev/zero of=/dev/nsa0 bs=1024 count=10000 10000+0 records in 10000+0 records out 10240000 bytes transferred in 10.987526 secs (931966 bytes/sec) # dd if=/dev/zero of=/dev/nsa0 bs=2048 count=10000 10000+0 records in 10000+0 records out 20480000 bytes transferred in 11.537724 secs (1775047 bytes/sec) # dd if=/dev/zero of=/dev/nsa0 bs=4096 count=10000 10000+0 records in 10000+0 records out 40960000 bytes transferred in 11.511335 secs (3558232 bytes/sec) # dd if=/dev/zero of=/dev/nsa0 bs=8192 count=10000 10000+0 records in 10000+0 records out 81920000 bytes transferred in 11.398908 secs (7186653 bytes/sec) # dd if=/dev/zero of=/dev/nsa0 bs=16384 count=10000 10000+0 records in 10000+0 records out 163840000 bytes transferred in 12.226020 secs (13400927 bytes/sec) # dd if=/dev/zero of=/dev/nsa0 bs=32767 count=10000 10000+0 records in 10000+0 records out 327670000 bytes transferred in 14.960698 secs (21902053 bytes/sec) # dd if=/dev/zero of=/dev/nsa0 bs=65536 count=10000 10000+0 records in 10000+0 records out 655360000 bytes transferred in 18.496691 secs (35431202 bytes/sec) # dd if=/dev/zero of=/dev/nsa0 bs=65536 count=983040 983040+0 records in 983040+0 records out 64424509440 bytes transferred in 1710.457231 secs (37665081 bytes/sec) # mt status Mode Density Blocksize bpi Compression Current: 0x28:X3.224 variable 37871 0x4 ---------available modes--------- 0: 0x28:X3.224 variable 37871 0x4 1: 0x28:X3.224 variable 37871 0x4 2: 0x28:X3.224 variable 37871 0x4 3: 0x28:X3.224 variable 37871 0x4 --------------------------------- Current Driver State: at rest. --------------------------------- File Number: 1 Record Number: 0 Residual Count 0