From nobody@FreeBSD.ORG Mon Nov 22 09:03:05 1999
Return-Path: <nobody@FreeBSD.ORG>
Received: by hub.freebsd.org (Postfix, from userid 32767)
	id 4231214C0A; Mon, 22 Nov 1999 09:03:05 -0800 (PST)
Message-Id: <19991122170305.4231214C0A@hub.freebsd.org>
Date: Mon, 22 Nov 1999 09:03:05 -0800 (PST)
From: jegjr@erols.com
Sender: nobody@FreeBSD.ORG
To: freebsd-gnats-submit@freebsd.org
Subject: tcopy reports incorrect values
X-Send-Pr-Version: www-1.0

>Number:         15048
>Category:       bin
>Synopsis:       tcopy reports incorrect values
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-bugs
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Mon Nov 22 09:10:00 PST 1999
>Closed-Date:    Wed Dec 22 08:36:04 PST 1999
>Last-Modified:  Wed Dec 22 08:38:03 PST 1999
>Originator:     John grimes
>Release:        3.2 Release
>Organization:
>Environment:
# dump -0 -B 4000000 -f /dev/nrsa0 /
# tcopy
>Description:
Whenever I perform a dump, and then try to use tcopy to verify, tcopy
always adds a 0 to 1K (1024 -> 10240) and truncates the last digit
from the number of records.  I have provided a copy of a dump output and
tcopy output below.  

OBTW: From dmesg:

ahc0: <Adaptec 2940 Ultra SCSI adapter> rev 0x00 int a irq 9 on pci0.10.0
ahc0: aic7880 Wide Channel A, SCSI Id=7, 16/255 SCBs

and

sa0 at ahc0 bus 0 target 4 lun 0
sa0: <Seagate STT8000N 3.22> Removable Sequential Access SCSI-2 device
sa0: 10.000MB/s transfers (10.000MHz, offset 15)

******************************************************************* 

This is the output from dump:

# dump -0 -B 4000000 -f /dev/nrsa0 /
  DUMP: Date of this level 0 dump: Mon Nov 22 11:46:10 1999
  DUMP: Date of last level 0 dump: the epoch
  DUMP: Dumping /dev/rwd2s1a (/) to /dev/nrsa0
  DUMP: mapping (Pass I) [regular files]
  DUMP: mapping (Pass II) [directories]
  DUMP: estimated 30996 tape blocks on 0.01 tape(s).
  DUMP: dumping (Pass III) [directories]
  DUMP: dumping (Pass IV) [regular files]
  DUMP: DUMP: 31144 tape blocks on 1 volumes(s)
  DUMP: finished in 63 seconds, throughput 494 KBytes/sec
  DUMP: Closing /dev/nrsa0
  DUMP: DUMP IS DONE

Dump reports 31144 tape blocks

The output from tcopy: 

# tcopy
file 0: block size 10240: 3114 records
file 0: eof after 3114 records: 31887360 bytes

tcopy adds a 0 to block size and truncates 31144 to 3114

>How-To-Repeat:
Do a dump, then use tcopy to verify.
>Fix:


>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->closed 
State-Changed-By: phk 
State-Changed-When: Wed Dec 22 08:36:04 PST 1999 
State-Changed-Why:  
Since 9-track tapes dump has used a 10k blocksize as default.  I'm not sure 
why it reports in 1k blocks, but know that changing the output format af 
dump affects many backup tools like amanda so inertia is very significant. 
Anyway, try to specify -b 1 to dump if you really want 1K block size. 
>Unformatted:
