kern/51332: QUIRK: BNCHMARK DLT1 requires SA_QUIRK_1FM

Nicholas Paufler npaufler at incentre.net
Wed Apr 23 14:50:18 PDT 2003


>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 at asgard.incentre.net:/usr/src/sys/compile/ASGARD i386

camcontrol devlist:
<BNCHMARK DLT1 3213>               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:


More information about the freebsd-bugs mailing list