Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 16 Jan 2008 17:20:19 +0000 (GMT)
From:      "Mark Powell" <M.S.Powell@salford.ac.uk>
To:        Scott Long <scottl@samsco.org>
Cc:        freebsd-scsi@freebsd.org
Subject:   Re: Opening a write-protected tape for writing
Message-ID:  <20080116171123.V48963@rust.salford.ac.uk>
In-Reply-To: <59016B65-C533-47A4-9E9B-EA2AC8EAA1DF@samsco.org>
References:  <20080115153046.U39949@rust.salford.ac.uk> <59016B65-C533-47A4-9E9B-EA2AC8EAA1DF@samsco.org>

next in thread | previous in thread | raw e-mail | index | archive | help
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 <RETURN>

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 <RETURN>
-----

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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20080116171123.V48963>