From owner-freebsd-bugs Mon Jun 17 13:31: 1 2002 Delivered-To: freebsd-bugs@hub.freebsd.org Received: from freefall.freebsd.org (freefall.FreeBSD.org [216.136.204.21]) by hub.freebsd.org (Postfix) with ESMTP id 8CC5237B42C for ; Mon, 17 Jun 2002 13:30:04 -0700 (PDT) Received: (from gnats@localhost) by freefall.freebsd.org (8.11.6/8.11.6) id g5HKU4f23498; Mon, 17 Jun 2002 13:30:04 -0700 (PDT) (envelope-from gnats) Received: from nwww.freebsd.org (www.FreeBSD.org [216.136.204.117]) by hub.freebsd.org (Postfix) with ESMTP id 1C88837B40B for ; 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 ; 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 To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-1.0 Subject: misc/39439: tcopy will not duplicate tapes with block size larger than 64kbytes Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org >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