Discussion:
Quantum LTO 4 tape drive and Cygwin 1.7?
Jeffrey C. Smith
2009-10-20 20:24:25 UTC
Permalink
I'm trying to use tar from Cygwin 1.7 Beta on a Win 2008 R2 machine to
backup some files to a Quantum LTO 4 SAS tape drive. I've tried all the
usual POSIX paths (/dev/nst0, /dev/st0, /dev/st1, etc.) as well as some
other variants (\\.\tape0) with no joy. tar fails with a "No such file
or directory" error.

I'm not sure how to find out details on the actual Win device paths. The
best tool that I've been able to find is devcon which list the tape
drive as follows:

SCSI\SEQUENTIAL&VEN_QUANTUM&PROD_ULTRIUM_4\6&369B1AD2&0&000000
Name: Quantum LTO 4 Tape Drive
Hardware ID's:
SCSI\SequentialQUANTUM_ULTRIUM_4_______2190
SCSI\SequentialQUANTUM_ULTRIUM_4_______
SCSI\SequentialQUANTUM_
SCSI\QUANTUM_ULTRIUM_4_______2
QUANTUM_ULTRIUM_4_______2
Compatible ID's:
SCSI\Sequential
SCSI\RAW

Is there any way to access this device using tar from cygwin? Can I
specify Windows device paths with 1.7? If so, how would I identify the
path to the device?

Any help would be most appreciated.

Thanks,
Jeff
--
Jeffrey C. Smith Phone: 512.692.7607
RevolutionONE Cell : 512.965.3898
Jeff_at_RevolutionONE.com
Corinna Vinschen
2009-10-21 10:59:14 UTC
Permalink
Post by Jeffrey C. Smith
I'm trying to use tar from Cygwin 1.7 Beta on a Win 2008 R2 machine to
backup some files to a Quantum LTO 4 SAS tape drive. I've tried all the
usual POSIX paths (/dev/nst0, /dev/st0, /dev/st1, etc.) as well as some
other variants (\\.\tape0) with no joy. tar fails with a "No such file or
directory" error.
The right way to access tapes is to use the /dev/stX or /dev/nstX
variation. Using the Windows path \\.\tapeX will not work as expected.

Typically the first tape drive attached to a Windows machine is
called "tape0", which is what Cygwin tries to access when specifying
/dev/st0 and /dev/nst0.

If you want to see the name of the tape drive on your system, just open
the Device Manager and then open the device tree element "Tape drives".
You should find an entry named like your tape device, for instance
"QUANTUM ULTRIUM 4" or something along these lines. Double click opens
the Properties dialog. There's a tab called "Tape Symbolic Name". Open
it. It will show you the string "tapeX" with X some number >= 0. THis
is the same number to use in Cygwin.

I just mounted a tape drive to my Windows 7 machine and it showed up as
\\.\tape0 in the device manager. I could use mt(1) on it:

$ mt -f /dev/nst0 status
drive type = STK 9840
drive status = 1107361792
sense key error = 0
residue count = 0
file number = 0
block number = 0
Tape block size 65536 bytes. Density code 42 (unknown).
General status bits on (410b0000):
BOT ONLINE IM_REP_EN

Using the correct /dev/[n]stX, I never saw a "No such file" error yet.
What I can easily reproduce is a "Permission denied", though. Under
UAC, if you're using the standard command line you don't have admin
privileges. More exact, you don't have backup/restore privileges.
Accessing a tape drive without these privileges fails. If you want
to access the tape drive, you have to start cygwin elevated.


Corinna
--
Corinna Vinschen Please, send mails regarding Cygwin to
Cygwin Project Co-Leader cygwin AT cygwin DOT com
Red Hat
Jeffrey C. Smith
2009-10-21 15:19:44 UTC
Permalink
Corinna,

Thanks for your reply. My responses below...
Post by Corinna Vinschen
Post by Jeffrey C. Smith
I'm trying to use tar from Cygwin 1.7 Beta on a Win 2008 R2 machine to
backup some files to a Quantum LTO 4 SAS tape drive. I've tried all the
usual POSIX paths (/dev/nst0, /dev/st0, /dev/st1, etc.) as well as some
other variants (\\.\tape0) with no joy. tar fails with a "No such file or
directory" error.
The right way to access tapes is to use the /dev/stX or /dev/nstX
variation. Using the Windows path \\.\tapeX will not work as expected.
OK...
Post by Corinna Vinschen
Typically the first tape drive attached to a Windows machine is
called "tape0", which is what Cygwin tries to access when specifying
/dev/st0 and /dev/nst0.
If you want to see the name of the tape drive on your system, just open
the Device Manager and then open the device tree element "Tape drives".
You should find an entry named like your tape device, for instance
"QUANTUM ULTRIUM 4" or something along these lines. Double click opens
the Properties dialog. There's a tab called "Tape Symbolic Name". Open
it. It will show you the string "tapeX" with X some number >= 0. THis
is the same number to use in Cygwin.
OK. I'm looking at the window titled "Quantum LTO 4 Tape Drive
Properties" under the tab titled "Tape Symbolic Name" and the tape name
appears to be "Tape2147483646" (that's a long way from tape0!).

I started Cygwin as administrator and tried this:

$ mt -f /dev/nst2147483646
mt: /dev/nst2147483646: No such file or directory

$ mt -f /dev/st2147483646
mt: /dev/st2147483646: No such file or directory
Post by Corinna Vinschen
I just mounted a tape drive to my Windows 7 machine and it showed up as
$ mt -f /dev/nst0 status
drive type = STK 9840
drive status = 1107361792
sense key error = 0
residue count = 0
file number = 0
block number = 0
Tape block size 65536 bytes. Density code 42 (unknown).
BOT ONLINE IM_REP_EN
Using the correct /dev/[n]stX, I never saw a "No such file" error yet.
What I can easily reproduce is a "Permission denied", though. Under
UAC, if you're using the standard command line you don't have admin
privileges. More exact, you don't have backup/restore privileges.
Accessing a tape drive without these privileges fails. If you want
to access the tape drive, you have to start cygwin elevated.
Do you think the tape name "Tape2147483646" is a problem? At the bottom
of the "Tape Symbolic Name" tab there is a comment that says "Symbolic
name such as Tape0. It would seem that the name "Tape2147483646" is
somewhat out of the ordinary. BTW, 2147483646 is -2 in a two's
complement 32 bit number. Could this be some type of overflow/underflow
error?

Also, this is Windows 2008 R2. I'm told that 2008 R2 and Win 7 share the
same code base. Is 2008 R2 an officially supported platform for 1.7?

I really appreciate your help. If there is anything I need to do on my
end to help resolve the issue please let me know.

Thanks,
Jeff
--
Jeffrey C. Smith Phone: 512.692.7607
RevolutionONE Cell : 512.965.3898
Jeff_at_RevolutionONE.com
Corinna Vinschen
2009-10-21 15:51:25 UTC
Permalink
Post by Corinna Vinschen
If you want to see the name of the tape drive on your system, just open
the Device Manager and then open the device tree element "Tape drives".
You should find an entry named like your tape device, for instance
"QUANTUM ULTRIUM 4" or something along these lines. Double click opens
the Properties dialog. There's a tab called "Tape Symbolic Name". Open
it. It will show you the string "tapeX" with X some number >= 0. THis
is the same number to use in Cygwin.
OK. I'm looking at the window titled "Quantum LTO 4 Tape Drive Properties"
under the tab titled "Tape Symbolic Name" and the tape name appears to be
"Tape2147483646" (that's a long way from tape0!).
Gosh. That looks like a bug in Windows. I'm sorry to say that, but
you'll be out of luck as far as Cygwin is concerned with this
extraordinary weird tape ID. Cygwin only supports tapes from tape0 up
to tape127. That should be really enough, who on earth has more than
128 tape drives connected to a single machine!
Do you think the tape name "Tape2147483646" is a problem? At the bottom of
the "Tape Symbolic Name" tab there is a comment that says "Symbolic name
such as Tape0. It would seem that the name "Tape2147483646" is somewhat out
of the ordinary. BTW, 2147483646 is -2 in a two's complement 32 bit number.
Could this be some type of overflow/underflow error?
Also, this is Windows 2008 R2. I'm told that 2008 R2 and Win 7 share the
same code base. Is 2008 R2 an officially supported platform for 1.7?
It's supposed to be, though right at the moment I haven't installed
a 2K8 R2 test system, just a W7 x64 system. I'll check that again
in the next couple of days, but the tape ID you have on your system is
not ok. I'd suggest to deinstall the driver, switch off the machine
and reboot. Maybe the next time the tape drive gets a more sensible
ID. If it sticks to this weird ID, I'd file an SRQ at Microsoft.


Corinna
--
Corinna Vinschen Please, send mails regarding Cygwin to
Cygwin Project Co-Leader cygwin AT cygwin DOT com
Red Hat
Corinna Vinschen
2009-10-22 09:06:02 UTC
Permalink
Post by Corinna Vinschen
Post by Jeffrey C. Smith
Also, this is Windows 2008 R2. I'm told that 2008 R2 and Win 7 share the
same code base. Is 2008 R2 an officially supported platform for 1.7?
It's supposed to be, though right at the moment I haven't installed
a 2K8 R2 test system, just a W7 x64 system. I'll check that again
in the next couple of days, but the tape ID you have on your system is
not ok. I'd suggest to deinstall the driver, switch off the machine
and reboot. Maybe the next time the tape drive gets a more sensible
ID. If it sticks to this weird ID, I'd file an SRQ at Microsoft.
I installed a 2K8 R2 and attached a tape drive. It got the tape ID 0,
as expected. Something certainly isn't ok on your machine.


Corinna
--
Corinna Vinschen Please, send mails regarding Cygwin to
Cygwin Project Co-Leader cygwin AT cygwin DOT com
Red Hat
Jeffrey C. Smith
2009-10-22 13:40:56 UTC
Permalink
Post by Corinna Vinschen
Post by Corinna Vinschen
Post by Jeffrey C. Smith
Also, this is Windows 2008 R2. I'm told that 2008 R2 and Win 7 share the
same code base. Is 2008 R2 an officially supported platform for 1.7?
It's supposed to be, though right at the moment I haven't installed
a 2K8 R2 test system, just a W7 x64 system. I'll check that again
in the next couple of days, but the tape ID you have on your system is
not ok. I'd suggest to deinstall the driver, switch off the machine
and reboot. Maybe the next time the tape drive gets a more sensible
ID. If it sticks to this weird ID, I'd file an SRQ at Microsoft.
I installed a 2K8 R2 and attached a tape drive. It got the tape ID 0,
as expected. Something certainly isn't ok on your machine.
As you suggested, I removed the driver, updated the firmware, rebooted,
and reloaded the driver - no change. Something is definitely wrong with
the Win2K box. I've logged a bug with Quantum. We'll see what they say.

Thanks much for your help...

Jeff

Loading...