cygwin,tape access

I have a Sony AIT-3 (SDX-700C) tape drive attached to my Windows XP computer, via an Adaptec 29160 SCSI controller.   I would like to write to and read from this tape drive using Cygwin commands such as "tar".  The drive is recognized in the Windows device manager under "?Other devices/?Sony SDX-600C SCSI Sequential Device".  Under Cygwin, I have used the command  "mount //./tape0  /dev/st0", and the device appears to be mounted  in /dev/  as st0.   However, when I attempt to write using "tar",  the tape unit is unrecognized, and no writing occurs.   Any help out there?
alsupjAsked:
Who is Participating?
 
alsupjAuthor Commented:
dlethe    ----
     Using ubuntu, I think I finally found out how to change permissions on the /dev/st0 entry,
which up to that point had been:    'crw-rw----' .
     First, I removed the entry:    sudo  rm  /dev/st0
     Second, I recreated the entry:    sudo  mknod  -m 666  /dev/st0 c 9 0   .
     The "666"  extended the permission to read:    'crw-rw-rw-'   .
Now,  the previous  tar  and  dd  commands actually work, and I am reading/writing to tape !!
Whether this works under cygwin is another story I'll try to discover.
If not, I could actually convert to using ubuntu permanently.
I got some ideas from:  
    http://downloads.quantum.com/dlt4000/6464215011.pdf
                  JIM
0
 
DavidPresidentCommented:
It wouldn't surprise me (and I can't confirm one way or another) that cygwin works properly on SCSI pass-through to tapes. Gut feeling it doesn't.    You need to also establish if it is HW or SW issue also.  Personally, I would first establish that the hardware works OK.

Download an ubuntu live CD or USB, boot to that, (DON'T install, just boot), and see if you can tar using native linux on the same hardware w/o cygwin and windows getting in the way.  That establishes hardware is good.

Then use windows backup.   This establishes that windows device drivers are ok.

Also I admit I've never used cywin with a tape, so am curious as to why you are mounting at all.  Unless this is a cygwin method for establishing alias, you would just tar cvf /dev/st0 list-of-stuff-to write,  no mounting required.
0
 
DavidPresidentCommented:
(Could be stupid thing such as a tape that is in read-only mode, and that message is getting lost in the translation.  That is why I suggest leaving hardware as-is, and booting native linux just to eliminate hardware so you can focus on windows, then cygwin-windows linkage, then cygwin.

can you dd if=/dev/st0 of=/dev/null and  does it access the tape?
0
Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

 
alsupjAuthor Commented:
dlethe  ---
I tried ubuntu, and tar cvf /dev/st0  (files),  but got Cannot open: Permission denied.
I tried   dd if=/dev/st0  of=/dev/null,  (in ubuntu)    but got   Permission denied.
0
 
DavidPresidentCommented:
Well, then it has nothing to do with cygwin.  You have a hardware problem.
0
 
alsupjAuthor Commented:
Does that take it out of your realm of expertise?
0
 
DavidPresidentCommented:
Sorta, 20 years writing storage diag software, tape, RAID, etc..  If you are running linux, have selected the right physical device, and have root, then what I suggested will work.  But lets' see if you selected the right device driver..

Does cat /proc/scsi/scsi show the tape? Did it build a /dev/sg driver?  Did something show up in the boot ? Did the tape look like it did something?  LINUX is much easier to diagnose such things as same subsystem works for all scsi peripherals.  
0
 
alsupjAuthor Commented:
I appreciate the significant help from "dlethe" which allowed me to find the solution.
0
 
DavidPresidentCommented:
Great.  Personally you would be better off with ubuntu or another form of UNIX, as this gives you more flexibility and tar, cpio, dd, mt, are standardized.  You can always do a NFS mount to a windows or unix system also to back up anything, or selectively back up or restore single files.

Backup/restore of windows registries and such is a different matter, but if you *really* want to solve both problems, then I would run windows as a virtual machine in that system.  Then you can do a full backup by just shutting the machine down and copying the VM data files.

0
 
alsupjAuthor Commented:
I appreciate the significant help from "dlethe" which allowed me to find the solution
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.