This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Getting data off a UNIX tape drive


On Jun 17 18:15, Michael Xavier wrote:
> Here's what we are able to do with the drive:
> mt -f /dev/st0 status will give us accurate information on the drive
> mt -f /dev/st0 rewind appears to work, it doesn't return errors

You know that you always rewind after a tape operation when using the
rewind device /dev/st0, right?  I suggest to create a symlink /dev/tape
-> /dev/nst0 and to omit the -f option from mt.  This is very
convenient.

Read /usr/share/doc/Cygwin/mt.README for details.

> However, when we try tar xvf /dev/st0 we get no errors but we are
> instantly returned to the prompt and nothing is extracted off of the
> tape drive.

This is almost certainly a blocksize problem.  Typically the windows
tape driver sets the blocksize to 512.  Do you know the exact blocksize
with which the tape has been created?  If so, use

  mt setblk <blocksize>

to set it.  You also have to use a corresponding setting for tar.  Tar's
blocksize must be a multiple of the tape blocksize.

See tar --help or read the tar info pages for more details.

Example:

  $ mt setblk 2048
  $ tar xfb /dev/nst0 4096

If you don't know the blocksize used on the tape, try variable
blocksize:

  $ mt setblk 0
  $ tar xf /dev/nst0

> We have tried referencing the drive differently, \device\tape0,
> //./tape0, \\.\tape0 without success.

Yes, you can't do this.  You have to use the /dev/stX, /dev/nstX
device names under Cygwin.  Don't use native Win32 or native NT
device names.

http://cygwin.com/cygwin-ug-net/using-specialnames.html#id4729541

> aren't even married to using cygwin for this but we definitely know
> that the tape was made with tar so this seemed like a logical step.

It didn't work on Linux probably for the same reason: Wrong blocksize.

Note that blocksizes beyond 64K are practically unsupported on Windows!
There are workarounds by changing registry settings of the SCSI
controller, but these workarounds only work for some SCSI controllers,
not for all.  If you have no luck even with the variable blocksize
setting, try again on Linux.  It supports any blocksize for tape
devices.


Corinna

-- 
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Project Co-Leader          cygwin AT cygwin DOT com
Red Hat

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]