Subject: dumping multiple files to a Tandberg SLR50
To: None <>
From: Marko Schuetz <>
List: current-users
Date: 02/13/2004 22:44:22
Content-Type: Text/Plain; charset=us-ascii
Content-Transfer-Encoding: 7bit

I tried writing multiple dumps to a single tape in a Tandberg SLR50,
which is reported as

st0 at scsibus1 target 6 lun 0: <TANDBERG, MLR3, 0404> tape removable
st0: density code 48, 512-byte blocks, write-enabled
st0: sync (50.00ns offset 15), 16-bit (40.000MB/s) transfers

With the obvious sequence

dump -0auf /dev/nrst0 /
dump -0auf /dev/nrst0 /var

the second dump is aborted with a write error.

Feb 13 17:17:42 fettklops /netbsd: st0(siop1:0:6:0):  Check Condition on CDB: 0x0a 00 00 28 00 00
Feb 13 17:17:42 fettklops /netbsd:     SENSE KEY:  Illegal Request
Feb 13 17:17:42 fettklops /netbsd:    INFO FIELD:  10240
Feb 13 17:17:42 fettklops /netbsd:      ASC/ASCQ:  Write Append Error
Feb 13 17:17:42 fettklops /netbsd: 
Feb 13 17:17:44 fettklops /netbsd: st0(siop1:0:6:0):  Check Condition on CDB: 0x10 00 00 00 02 00
Feb 13 17:17:44 fettklops /netbsd:     SENSE KEY:  Illegal Request
Feb 13 17:17:44 fettklops /netbsd:    INFO FIELD:  2
Feb 13 17:17:44 fettklops /netbsd:      ASC/ASCQ:  Write Append Error

From the tape drive's Reference Manual:

  6.12.2. Write From a Position on the Tape
  When Write Data or Filemark commands are continuously given from
  Beginning Of Tape, the Drive will write data and Filemarks continu-
  ously. No extra handling is necessary.
  If the cartridge is not written continuously from Beginning Of Tape, but
  data is to be appended to an already written tape, the following must be

  -  The Host must position the tape at EOD (End Of Data) before the
     Write function can be executed.
     Positioning the tape at EOD means that the Drive has read past
     all the datablocks and Filemarks in front of the EOD, and also
     read past this position, resulting in the CHECK CONDITION
     with BLANK CHECK in the Sense Key.

So I tried a workaround:

dump -0auf /dev/nrst0 /
mt -f /dev/nrst0 eom
dump -0auf /dev/nrst0 /var

Testing this with 

mt -f /dev/nrst0 rewind
mt -f /dev/nrst0 fsf 2
restore tvf /dev/nrst0

produces the correct listing.

Some googling found this (german):

It seems FreeBSD offers an ioctl for the tape device which allows
selecting between different EOT behaviors. 

What kind of solution should be used on NetBSD?


Content-Type: application/pgp-signature
Content-Transfer-Encoding: 7bit

Version: GnuPG v1.2.3 (NetBSD)