On Oct 3 19:33, Jeffry T Ross wrote: > I'm trying to read data from a Sony AIT-e260 SCSI drive under Cygwin. > Cygwin 1.5.21-2 > mt 2.3.1 > > I know that the tape is good, because I can read from it (using the same > drive) under Redhat. > > The first file on the tape is 96 bytes so I do the following: > >> export TAPE=/dev/nst0 > >> mt setblk 0 > >> dd if=$TAPE of=header.txt > > This works fine. > > The second file on the tape is 1GB and is written with a block size on > 200kB. > When I do the following: > >> mt setblk 204800 > >> dd if=$TAPE of=segment.0 > > I get the following error: > mt: /dev/nst0: Invalid argument > > I've found that the maximum block size in mt can only be 64kB. > > Am I missing something or is there a limitation to mt under Cygwin?
It's a limitation in Windows. The default settings only allow blocksizes up to 64K. There's some information on the net that this is a result of the default size of the scatter/gather arrays in the SCSI controller driver settings. Search for the keyword "MaximumSGList", which should give you lots of hits. However, I have tried this on three different machines with three different SCSI controllers, and setting the MaximumSGList value only works on one machine with a Adaptec U160 controller, even though it's documented to work for most, if not all controllers. At one point I started to write code using direct SCSI access using the IOCTL_SCSI_PASSTHROUGH ioctl codes, but hit the same limitation. I could set the blocksize to a value > 64K, but when reading data I never got more than the first 64K from the block, plus the error code ERROR_MORE_DATA. Since I couldn't find a workaround, I eventually gave up on this :( I guess the bottom line is if you need to create portable tapes, stick to blocksizes up to 64K. 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/