From owner-freebsd-scsi@FreeBSD.ORG Wed Jan 16 17:20:24 2008 Return-Path: Delivered-To: freebsd-scsi@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0A6A816A41A for ; Wed, 16 Jan 2008 17:20:24 +0000 (UTC) (envelope-from M.S.Powell@salford.ac.uk) Received: from akis.salford.ac.uk (akis.salford.ac.uk [146.87.0.14]) by mx1.freebsd.org (Postfix) with SMTP id 7073413C4CE for ; Wed, 16 Jan 2008 17:20:23 +0000 (UTC) (envelope-from M.S.Powell@salford.ac.uk) Received: (qmail 43297 invoked by uid 98); 16 Jan 2008 17:20:21 +0000 Received: from 146.87.255.121 by akis.salford.ac.uk (envelope-from , uid 401) with qmail-scanner-2.01 (clamdscan: 0.90/5425. spamassassin: 3.1.8. Clear:RC:1(146.87.255.121):. Processed in 0.045401 secs); 16 Jan 2008 17:20:21 -0000 Received: from rust.salford.ac.uk (HELO rust.salford.ac.uk) (146.87.255.121) by akis.salford.ac.uk (qpsmtpd/0.3x.614) with SMTP; Wed, 16 Jan 2008 17:20:21 +0000 Received: (qmail 50178 invoked by uid 1002); 16 Jan 2008 17:20:19 -0000 Received: from localhost (sendmail-bs@127.0.0.1) by localhost with SMTP; 16 Jan 2008 17:20:19 -0000 Date: Wed, 16 Jan 2008 17:20:19 +0000 (GMT) From: "Mark Powell" To: Scott Long In-Reply-To: <59016B65-C533-47A4-9E9B-EA2AC8EAA1DF@samsco.org> Message-ID: <20080116171123.V48963@rust.salford.ac.uk> References: <20080115153046.U39949@rust.salford.ac.uk> <59016B65-C533-47A4-9E9B-EA2AC8EAA1DF@samsco.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: freebsd-scsi@freebsd.org Subject: Re: Opening a write-protected tape for writing X-BeenThere: freebsd-scsi@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SCSI subsystem List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 16 Jan 2008 17:20:24 -0000 On Wed, 16 Jan 2008, Scott Long wrote: > On Jan 15, 2008, at 8:33 AM, Mark Powell wrote: >> Hi, >> In 7.0-PRERELEASE, it seems that it is possible to open a write-protected >> tape for writing. Shouldn't this fail with an error? >> Cheers. > > Which device node are you opening? Scott, I was using /dev/esa0. Using star to perform a multi-volume backup and when prompted for tape 6 I mistakenly put in a write protected tape: ----- star: 3296971 blocks + 0 bytes (total of 216070291456 bytes = 211006144.00k). star: Total 16435725 blocks + 0 bytes (total of 1077131673600 bytes = 1051886400.00k). star: Mount volume #6 on '/dev/esa0' and hit star: 0 blocks + 0 bytes (total of 0 bytes = 0.00k). star: Total 16435725 blocks + 0 bytes (total of 1077131673600 bytes = 1051886400.00k). (sa0:ahc0:0:6:0): WRITE FILEMARKS. CDB: 10 0 0 0 2 0 (sa0:ahc0:0:6:0): CAM Status: SCSI Status Error (sa0:ahc0:0:6:0): SCSI Status: Check Condition (sa0:ahc0:0:6:0): DATA PROTECT asc:27,0 (sa0:ahc0:0:6:0): Write protected field replaceable unit: 30 (sa0:ahc0:0:6:0): Unretryable error (sa0:ahc0:0:6:0): failed to write terminating filemark(s) star: Mount volume #7 on '/dev/esa0' and hit ----- Star was able to open the tape O_RDWR, but of course only wrote 0 bytes and assumed EOT. This is on an Adaptec 2940U2W and IBM Ultrium LTO2 drive, but I suspect that has no bearing on this error? > Is this a regression from FreeBSD 6? Actually I'm not sure as I've never made that mistake before. I asked Joerg Schilling (star author) about this and he seemed to think it's a scsi driver bug. Cheers. -- Mark Powell - UNIX System Administrator - The University of Salford Information Services Division, Clifford Whitworth Building, Salford University, Manchester, M5 4WT, UK. Tel: +44 161 295 6843 Fax: +44 161 295 5888 www.pgp.com for PGP key