X-Spam-Check-By: sourceware.org Date: Mon, 18 Jun 2007 10:01:15 +0200 From: Corinna Vinschen To: cygwin AT cygwin DOT com Subject: Re: Getting data off a UNIX tape drive Message-ID: <20070618080115.GH4179@calimero.vinschen.de> Reply-To: cygwin AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com References: <9a9ad31d0706171803y3a92de20gafdd7e8b3dcc8456 AT mail DOT gmail DOT com> <9a9ad31d0706171815h49bb877cwaa5fdcf84ac4b389 AT mail DOT gmail DOT com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <9a9ad31d0706171815h49bb877cwaa5fdcf84ac4b389@mail.gmail.com> User-Agent: Mutt/1.4.2.2i Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list 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 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 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/