This is the mail archive of the
mailing list for the Cygwin project.
Re: Getting data off a UNIX tape drive
- From: Corinna Vinschen <corinna-cygwin at cygwin dot com>
- To: cygwin at cygwin dot com
- Date: Mon, 18 Jun 2007 10:01:15 +0200
- Subject: Re: Getting data off a UNIX tape drive
- References: <email@example.com> <firstname.lastname@example.org>
- Reply-to: cygwin at cygwin dot com
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
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.
$ mt setblk 2048
$ tar xfb /dev/nst0 4096
If you don't know the blocksize used on the tape, try variable
$ 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
> 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
Corinna Vinschen Please, send mails regarding Cygwin to
Cygwin Project Co-Leader cygwin AT cygwin DOT com
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Problem reports: http://cygwin.com/problems.html