Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , 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 To: Cygwin Mailinglist Subject: Re: /dev/nst0: Permission denied Message-ID: <20010905141409.H30380@cygbert.vinschen.de> Mail-Followup-To: Cygwin Mailinglist References: <4s3cpt4g1vvlqvodqfrhmqkp5p1spelu80 AT 4ax DOT com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline 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/