Bug 5245

Summary: SCSI tape driver returns i/o error on short block
Product: [Retired] Red Hat Linux Reporter: hughett
Component: kernelAssignee: Michael K. Johnson <johnsonm>
Status: CLOSED CURRENTRELEASE QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: 6.0CC: bcrl, reg.bugs, weinmann
Target Milestone: ---   
Target Release: ---   
Hardware: i386   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 1999-10-06 22:46:25 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description hughett 1999-09-20 15:01:37 UTC
The SCSI tape driver returns an i/o error if the block
length is not an exact multiple of 512 bytes.  This causes
problems when attempting to do a tar dump with the z option,
or a remote dump over the network (since a network read
will return only as many bytes as are currently available).

Example:

[hughett@chaplin hughett]$ dd if=/dev/zero of=/dev/nst0 \
bs=511 count=1
dd: /dev/nst0: Input/output error
1+0 records in
0+0 records out
[hughett@chaplin hughett]$ dd if=/dev/zero of=/dev/nst0 \
bs=512 count=1
1+0 records in
1+0 records out

A workaround for this problem is to write a filter that
read bytes until it gets a full block of 512 before writing
them out and that adds enough zero bytes at EOF to make
up a complete block.

Paul Hughett

Comment 1 Cristian Gafton 1999-10-06 22:46:59 UTC
assigned to dledford

Comment 2 Ben LaHaise 2002-06-03 21:46:20 UTC
Does this still happen in 2.4?  Please reopen if so.