From nobody@www.freebsd.org  Mon Jun 17 13:28:58 2002
Return-Path: <nobody@www.freebsd.org>
Received: from nwww.freebsd.org (www.FreeBSD.org [216.136.204.117])
	by hub.freebsd.org (Postfix) with ESMTP id 1C88837B40B
	for <freebsd-gnats-submit@FreeBSD.org>; Mon, 17 Jun 2002 13:28:58 -0700 (PDT)
Received: from www.freebsd.org (localhost [127.0.0.1])
	by nwww.freebsd.org (8.12.2/8.12.2) with ESMTP id g5HJtqhG058545
	for <freebsd-gnats-submit@FreeBSD.org>; Mon, 17 Jun 2002 12:55:52 -0700 (PDT)
	(envelope-from nobody@www.freebsd.org)
Received: (from nobody@localhost)
	by www.freebsd.org (8.12.2/8.12.2/Submit) id g5HJtqdO058544;
	Mon, 17 Jun 2002 12:55:52 -0700 (PDT)
Message-Id: <200206171955.g5HJtqdO058544@www.freebsd.org>
Date: Mon, 17 Jun 2002 12:55:52 -0700 (PDT)
From: Bryan Kropp <shiro@dimensional.com>
To: freebsd-gnats-submit@FreeBSD.org
Subject: tcopy will not duplicate tapes with block size larger than 64kbytes
X-Send-Pr-Version: www-1.0

>Number:         39439
>Category:       bin
>Synopsis:       tcopy(1) will not duplicate tapes with block size larger than 64kbytes
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Mon Jun 17 13:30:03 PDT 2002
>Closed-Date:    
>Last-Modified:  Sun Sep 02 17:05:24 UTC 2012
>Originator:     Bryan Kropp
>Release:        4.5-RELEASE
>Organization:
StorageTek
>Environment:
FreeBSD orac.dimensional.com 4.5-RELEASE FreeBSD 4.5-RELEASE #4: Mon May 13 15:17:03 M
ST 2002     shiro@dimensional.com:/usr/src/sys/compile/MYKERNEL  i386      
>Description:
The tcopy program will not duplicate tapes with block sizes larger than 64kbytes.  This is simple to change, as the buffer allocated for tape block copying can be changed (one line in source code for tcopy).  In the past, 64k was a pretty large block size, but many modern tape drives from my company and others now recommend block sizes of 128k to 256k for maximum performance, so many tapes are written in these block sizes.      
>How-To-Repeat:
Simply create a tape on any tape drive with block sizes above 64k.

dd if=/dev/zero of=/dev/sa0 bs=256k

Then rewind and tcopy the tape.  Tape must be copied to another tape for the problem to show up, just tcopy /dev/sa0 will read the tape and see the blocksizes just fine.  It's when you tcopy /dev/sa0 /dev/sa1 that things fail.     
>Fix:
A good short term fix is simply to modify one line in tcopy.c

Change:  #define MAXREC  (64 * 1024)
To:      #define MAXREC  (256 * 1024)

This will allow larger tape block sizes to be written.  I have tried this with various STK tape drives with success after changing just this line and recompiling.
>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-bugs->eadler 
Responsible-Changed-By: eadler 
Responsible-Changed-When: Tue Jun 12 03:29:50 UTC 2012 
Responsible-Changed-Why:  
I'll take it. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=39439 
Responsible-Changed-From-To: eadler->freebsd-bugs 
Responsible-Changed-By: eadler 
Responsible-Changed-When: Sun Sep 2 17:05:21 UTC 2012 
Responsible-Changed-Why:  
I won't be looking at this PR for a while and I need to clear some out 
of my queue 

http://www.freebsd.org/cgi/query-pr.cgi?pr=39439 
>Unformatted:
