Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 17 Jun 2002 12:55:52 -0700 (PDT)
From:      Bryan Kropp <shiro@dimensional.com>
To:        freebsd-gnats-submit@FreeBSD.org
Subject:   misc/39439: tcopy will not duplicate tapes with block size larger than 64kbytes
Message-ID:  <200206171955.g5HJtqdO058544@www.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         39439
>Category:       misc
>Synopsis:       tcopy 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:
>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:
>Unformatted:

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-bugs" in the body of the message




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