problem accessing tape with tar on NT

2003-01-22 Thread Kris Thielemans
Hi,

I'm trying to access a DAT tape produced on Unix using tar. The tape reads
fine on another Unix (Solaris) station.

However Cygwin gives me this

$ /usr/bin/mt  -f /dev/st0 status
tape capacity:  1887232 KB
current block:0 write protected  :   no
datcompres
sion   :   on

$ /usr/bin/tar xvf /dev/st0
/usr/bin/tar: /dev/st0: Cannot read: Permission denied
/usr/bin/tar: At beginning of tape, quitting now
/usr/bin/tar: Error is not recoverable: exiting now

What's wrong?

(cygcheck output attached).

Thanks!

Kris Thielemans
(kris.thielemans  ic.ac.uk)
Imaging Research Solutions Ltd
Cyclotron Building
Hammersmith Hospital
Du Cane Road
London W12 ONN, United Kingdom

web site address: http://www.irsl.org/~kris



cygcheck.out
Description: Binary data
--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Bug reporting: http://cygwin.com/bugs.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/


Re: problem accessing tape with tar on NT

2003-01-22 Thread Corinna Vinschen
On Wed, Jan 22, 2003 at 05:27:31PM -, Kris Thielemans wrote:
> I'm trying to access a DAT tape produced on Unix using tar. The tape reads
> fine on another Unix (Solaris) station.
> 
> However Cygwin gives me this
> 
> $ /usr/bin/mt  -f /dev/st0 status
> tape capacity:  1887232 KB
> current block:0 write protected  :   no
> datcompres
> sion   :   on
> 
> $ /usr/bin/tar xvf /dev/st0
> /usr/bin/tar: /dev/st0: Cannot read: Permission denied
> /usr/bin/tar: At beginning of tape, quitting now
> /usr/bin/tar: Error is not recoverable: exiting now
> 
> What's wrong?

The blocksize.  Read /usr/doc/Cygwin/mt.README.

Corinna

-- 
Corinna Vinschen  Please, send mails regarding Cygwin to
Cygwin Developermailto:[EMAIL PROTECTED]
Red Hat, Inc.

--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Bug reporting: http://cygwin.com/bugs.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/




RE: problem accessing tape with tar on NT

2003-01-27 Thread Kris Thielemans

Dear Corinna,

it doesn't seem to have anything to do with the blocksize.
I've upgraded my cygwin installation to the very latest, and the problem
seems to have disappeared. So, no worries anymore (I hope).

(The tapes were generated with block size 20. Does that happen to be the
default?).

By the way, you recommend reading /usr/doc/Cygwin/mt.README for the
blocksize.  However, the only lines in that file (or at least the version I
have, which is dated 21 Oct 2001) are
--
 - This version supports setting blocksize to 0 to enable the variable
   blocksize feature since Cygwin V1.1.3.
--
No clue what this means.

Thanks for your help

Kris Thielemans
(kris.thielemans  ic.ac.uk)
Imaging Research Solutions Ltd
Cyclotron Building
Hammersmith Hospital
Du Cane Road
London W12 ONN, United Kingdom

web site address: http://www.irsl.org/~kris
> >
> > I'm trying to access a DAT tape produced on Unix using tar. The
> > tape reads fine on another Unix (Solaris) station.
> >
> > However Cygwin gives me this
> >
> > $ /usr/bin/mt  -f /dev/st0 status
> > tape capacity:  1887232 KB
> > current block:0 write protected  :
> > no datcompres
> > sion   :   on
> >
> > $ /usr/bin/tar xvf /dev/st0
> > /usr/bin/tar: /dev/st0: Cannot read: Permission denied
> > /usr/bin/tar: At beginning of tape, quitting now
> > /usr/bin/tar: Error is not recoverable: exiting now
> >
>
> The blocksize.  Read /usr/doc/Cygwin/mt.README.
>
> Corinna
>


--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Bug reporting: http://cygwin.com/bugs.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/




Re: problem accessing tape with tar on NT

2003-01-27 Thread Corinna Vinschen
On Mon, Jan 27, 2003 at 02:09:50PM -, Kris Thielemans wrote:
> (The tapes were generated with block size 20. Does that happen to be the
> default?).

Once the typical blocksize was 5120 bytes on tapes.  Today it's varying
but many drive types support different block sizes.

>  - This version supports setting blocksize to 0 to enable the variable
>blocksize feature since Cygwin V1.1.3.
> --
> No clue what this means.

With fixed blocksize (e. g. mt setblk 512), the NT tape driver reads
and writes only blocks with the set blocksize (512 bytes in the above
example).  With variable blocksize (mt setblk 0), the NT tape driver
reads any block, regardless of it's size on tape and writes a block
with the size given to write(), this way potentially writing each block
with another size (as far as the driver allows, see `mt status 2',
"min block size" and "max block size").

Corinna

-- 
Corinna Vinschen  Please, send mails regarding Cygwin to
Cygwin Developermailto:[EMAIL PROTECTED]
Red Hat, Inc.

--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Bug reporting: http://cygwin.com/bugs.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/