problem with tar

Corinna Vinschen cygwin@cygwin.com
Fri Jun 15 02:19:00 GMT 2001


On Thu, Jun 14, 2001 at 02:31:55PM -0500, Stephen Hansen wrote:
> I'm having problems writing files to tape with the cygwin tar command on
> Windows 2000.  I have the tape device [Exabyte EXB SCSI] mounted on
> /dev/rmt/n0.  I can create an archive and write whatever files I want to
> tape using -cf.  But when I use "tar -rvf  /dev/rmt/n0  [FILE]..." I get
> back
> 
> FILE
> tar: /dev/rmt/n0: Wrote only 0 of 10240 bytes
> tar: Error is not recoverable: exiting now
> 
> -A and -u produce the same result, as does mounting the device on
> /dev/rmt/0.  I would greatly appreciate anyone's recommending how to
> solve this problem.

It's a problem in the current Cygwin DLL. The reason is a call to a
Win32 tape function which expects a size parameter which contains 32
(Bytes) while the buffer needed is actually only 28 Bytes. Weird.

AFAICS, that problem should only shows up when the current blocksize
is not equal to the default block size and it should only occur on W2K.

You should be able to workaround that problem by setting the
current blocksize to variable blocksize:

    $ mt setblk 0

or by setting the current blocksize to the default blocksize
(for example for a DDS-2):

    $ mt status 2
    tape capacity    :  1953251 KB          remaining        :  1952947 KB
    current block    :        7             write protected  :       no
    datcompression   :       on
    min block size   :        1             max block size   :    65536
    def block size   :    16384             cur block size   :     5120
    report setmarks  :      off
    $ mt setblk 16384

However, I have applied a patch to Cygwin which will show up in the
next developers snapshot and in the next official release.

Hope, that helps,
Corinna

-- 
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Developer                                mailto:cygwin@cygwin.com
Red Hat, Inc.

--
Want to unsubscribe from this list?
Check out: http://cygwin.com/ml/#unsubscribe-simple



More information about the Cygwin mailing list