delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2001/09/05/08:16:03

Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT sources DOT redhat DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT sources DOT redhat DOT com>
List-Help: <mailto:cygwin-help AT sources DOT redhat DOT com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner AT sources DOT redhat DOT com
Delivered-To: mailing list cygwin AT sources DOT redhat DOT com
Date: Wed, 5 Sep 2001 14:14:09 +0200
From: Corinna Vinschen <cygwin AT cygwin DOT com>
To: Cygwin Mailinglist <cygwin AT cygwin DOT com>
Subject: Re: /dev/nst0: Permission denied
Message-ID: <20010905141409.H30380@cygbert.vinschen.de>
Mail-Followup-To: Cygwin Mailinglist <cygwin AT cygwin DOT com>
References: <4s3cpt4g1vvlqvodqfrhmqkp5p1spelu80 AT 4ax DOT com>
Mime-Version: 1.0
User-Agent: Mutt/1.2.5i
In-Reply-To: <4s3cpt4g1vvlqvodqfrhmqkp5p1spelu80@4ax.com>; from mark@mdsh.com on Wed, Sep 05, 2001 at 01:02:51PM +0100

On Wed, Sep 05, 2001 at 01:02:51PM +0100, Mark Himsley wrote:
> Hi,
> 
> I have a tape device problem. I'm running on Win2K pro SP1 + all M$
> recommended patches and I've just installed the latest Cygwin.
> 
> I mounted the DAT drive with
> 
> mount -s -f -b //./tape0 /dev/nst0
> 
> and it seems to be working, I can write to a DAT and read the data back.
> 
> BUT, if I put in a tape I wrote on Linux I get the following:
> 
> $ cat /dev/nst0
> cat: /dev/nst0: Permission denied
> 
> Why is this, and how can I read the DAT tape.

Wrong blocksize. Call `mt -f /dev/nst0 status 2' with tape in
drive.  It will show you the blocksize currently set in the
NT tape device driver (often 512), e.g.:

$ mt -f /dev/nst0 status 2
tape capacity    :  1953251 KB          remaining        :  1953251 KB
current block    :        0             write protected  :       no             datcompression   :       on
min block size   :        1             max block size   :    65536
def block size   :    16384             cur block size   :      512
report setmarks  :      off                  

The current blocksize is obviously reported in `cur block size'.

To get rid of that you either have to know the blocksize which
is used when the tape has been written by Linux (probably 5120)

$ mt -f /dev/nst0 setblk 5120

or you set your tape device driver to `variable block length'
which let the device drive figure out the size of the next
block on the tape by itself:

$ mt -f /dev/nst0 setblk 0

Note that not all device drivers are able to deal with variable
block size. Howver, the standard DAT driver on NT (4mmdat.sys)
is able to do that.

Corinna

-- 
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Developer                                mailto:cygwin AT cygwin DOT com
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/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019