[comp.unix.wizards] Writing file containing NULL byte with 'dd' to a Exabyte Tape

jensen@gt-eedsp.UUCP (P. Allen Jensen) (11/10/88)

I have been having a problem with an exabyte tape on a Multiflow/Trace
system.  When writing a binary file which contains bytes whose value
is NULL, I get a tape-write error.

          dd if=binary.data of=/dev/rmt5

Is this because of the representation of EOF or a bug of some kind ?
Tar and dump work fine, cp has the same problem as dd.

Any suggestions ?

Please respond via e-mail rather than a followup.

Thanks,
-- 
P. Allen Jensen
Georgia Tech, School of Electrical Engineering, Atlanta, GA  30332-0250
USENET: ...!{allegra,hplabs,ulysses}!gatech!gt-eedsp!jensen
INTERNET: jensen@gt-eedsp.gatech.edu

mike@ists (Mike Clarkson) (11/14/88)

In article <558@gt-eedsp.UUCP>, jensen@gt-eedsp.UUCP (P. Allen Jensen) writes:
> I have been having a problem with an exabyte tape on a Multiflow/Trace
> system.  When writing a binary file which contains bytes whose value
> is NULL, I get a tape-write error.
> 
>           dd if=binary.data of=/dev/rmt5
> 
> Is this because of the representation of EOF or a bug of some kind ?
> Tar and dump work fine, cp has the same problem as dd.

The exabyte uses 1024 byte fixed blocks.

Is your dd defaulting to an odd number of 512 blocks?


Try specifying bs=2b or some such incantation.

Mike.

-- 
Mike Clarkson					mike@ists.UUCP
Institute for Space and Terrestrial Science	mike@ists.yorku.ca
York University, North York, Ontario,		uunet!mnetor!yunexus!ists!mike
CANADA M3J 1P3					+1 (416) 736-5611

jeremy@chook.ua.oz (Jeremy Webber) (11/17/88)

In article <254@ists> mike@ists (Mike Clarkson) writes:

>   The exabyte uses 1024 byte fixed blocks.

>   Is your dd defaulting to an odd number of 512 blocks?


>   Try specifying bs=2b or some such incantation.

Unfortunately not even this will work with some versions of dd.  In fact there
is no way to make dd guarantee its output to be a multiple of 1k, because it
does not pad the last block.  If you are using the Delta Microsystems box they
provide a utility called bdd which has an appropriate option.  Else you may
have to write your own.

For this particular problem you may be able to do by specifying ibs=1k and
conv=sync but that will not work for all applications.
--
--
Jeremy Webber			     ACSnet: jeremy@chook.ua.oz
Computer Science Department	   Internet: jeremy@chook.ua.oz.au
University of Adelaide		   Voicenet: +61 8 228 5763
GPO Box 498, Adelaide 5001	   Papernet: +61 8 223 1206 (FAX)
Australia