[comp.sys.sgi] HELP: SGI 4D/360 EXABYTE problem: Command DD

harold@odie.cs.mun.ca (Harold Wareham(Todd)) (05/28/91)

We are having problems with an EXABYTE-8200 hooked up to an SGI-4D/360
running SGI UNIX version 3.3.1. Specifically, we cannot read or write 
an EXABYTE tape using the command DD; however, we can create and read 
tapes using the command TAR. The drive was cleaned prior to the
problems described in this message (the same day as the tests
run below, in fact). To add strangeness to it all, one can use
DD with a QIC drive, but it refuses to read back the last (partial)
block from tape.

Odd, yes? Details follow. If you have any ideas about what's going on,
drop me a line.

- Todd

Todd Wareham	harold@odie.cs.mun.ca	|"Success in science depends not
Department of Physics        		| only on rational argument but
Memorial University of Newfoundland	| on a mixture of subterfuge,
St. John, NF, Canada			| rhetoric, and propaganda"
					|    - Feyerabed

**************************** DETAILS *********************************

Scripts of the various errors encountered are given below.

The following is the script of trying to read from our EXABYTE
drive (/dev/mt/tps0d6) a tape containing a single large file
(20484 6000-byte records); just to be sure switching from byte-swapping
to no byte-swapping reads was causing no problems, I popped the
tape out between the read attempts.

This tape was created at another EXABYTE drive on campus attached to a 
MIPS-120 running UNIX 4.3 BSD. This tape reads and writes fine (using 
DD) on that other system on that other drive.


Script started on Mon May 27 15:08:34 1991
% ls -l /dev/mt/tps0d6*
crw-rw-rw-   3 root     sys       23,192 May 27 14:15 /dev/mt/tps0d6
crw-rw-rw-   3 root     sys       23,193 May 27 13:57 /dev/mt/tps0d6nr
crw-rw-rw-   3 root     sys       23,195 Nov  7  1990 /dev/mt/tps0d6nrns
crw-rw-rw-   3 root     sys       23,194 May 27 14:15 /dev/mt/tps0d6ns
% mt -t /dev/mt/tps0d6 status
        Controller: SCSI
        Device: EXABYTE: EXB-8200        252T    
        Status: 0x246
        Media : READY, write protected, at BOT
% mt -t /dev/mt/tps0d6 rewind
% mt -t /dev/mt/tps0d6 status
        Controller: SCSI
        Device: EXABYTE: EXB-8200        252T    
        Status: 0x246
        Media : READY, write protected, at BOT
% dd if=/dev/mt/tps0d6 bs=6000 of=/dev/null
dd: read error: Invalid argument
0+0 records in
0+0 records out
% mt -t /dev/mt/tps0d6 status
        Controller: SCSI
        Device: EXABYTE: EXB-8200        252T    
        Status: 0x266
        Media : READY, write protected, at BOT

	... tape popped ...

% mt -t /dev/mt/tps0d6 status
        Controller: SCSI
        Device: EXABYTE: EXB-8200        252T    
        Status: 0x244
        Media : READY, write protected, not at BOT
% mt -t /dev/mt/tps0d6ns status
        Controller: SCSI
        Device: EXABYTE: EXB-8200        252T    
        Status: 0x246
        Media : READY, write protected, at BOT
% mt -t /dev/mt/tps0d6ns rewind
% mt -t /dev/mt/tps0d6ns status
        Controller: SCSI
        Device: EXABYTE: EXB-8200        252T    
        Status: 0x246
        Media : READY, write protected, at BOT
% dd if=/dev/mt/tps0d6ns bs=6000 of=/dev/null
dd: read error: Invalid argument
0+0 records in
0+0 records out
% mt -t /dev/mt/tps0d6ns status
        Controller: SCSI
        Device: EXABYTE: EXB-8200        252T    
        Status: 0x266
        Media : READY, write protected, at BOT
% exit
% 
script done on Mon May 27 15:14:14 1991


Thinking it might be a MIPS idiosyncrasy, I then tried reading the 
first file (1 8000-byte block) of a tape created on a system not on 
campus (details unknown). For the record, this tape reads fine on the
MIPS system described above.


Script started on Mon May 27 15:17:42 1991
% mt -t /dev/mt/tps0d6 status
        Controller: SCSI
        Device: EXABYTE: EXB-8200        252T    
        Status: 0x244
        Media : READY, write protected, not at BOT
% mt -t /dev/mt/tps0d6 rewind
% mt -t /dev/mt/tps0d6 status
        Controller: SCSI
        Device: EXABYTE: EXB-8200        252T    
        Status: 0x246
        Media : READY, write protected, at BOT
% dd if=/dev/mt/tps0d6 bs=8000 of=/dev/null
dd: read error: Invalid argument
0+0 records in
0+0 records out
% mt -t /dev/mt/tps0d6 status
        Controller: SCSI
        Device: EXABYTE: EXB-8200        252T    
        Status: 0x266
        Media : READY, write protected, at BOT

		... tape popped ...

% mt -t /dev/mt/tps0d6ns status
        Controller: SCSI
        Device: EXABYTE: EXB-8200        252T    
        Status: 0x244
        Media : READY, write protected, not at BOT
% mt -t /dev/mt/tps0d6ns rewind
% mt -t /dev/mt/tps0d6ns status
        Controller: SCSI
        Device: EXABYTE: EXB-8200        252T    
        Status: 0x246
        Media : READY, write protected, at BOT
% dd if=/dev/mt/tps0d6ns bs=8000 of=/dev/null
dd: read error: Invalid argument
0+0 records in
0+0 records out
% mt -t /dev/mt/tps0d6ns status
        Controller: SCSI
        Device: EXABYTE: EXB-8200        252T    
        Status: 0x266
        Media : READY, write protected, at BOT
% exit
% 
script done on Mon May 27 15:21:40 1991


Failing that, I tried writing and reading a tape on our own drive.


Script started on Mon May 27 15:36:42 1991
% mt -t /dev/mt/tps0d6 status
        Controller: SCSI
        Device: EXABYTE: EXB-8200        252T    
        Status: 0x240
        Media : READY, writable, not at BOT
% mt -t /dev/mt/tps0d6 rewind
% mt -t /dev/mt/tps0d6 status
        Controller: SCSI
        Device: EXABYTE: EXB-8200        252T    
        Status: 0x242
        Media : READY, writable, at BOT
% dd if=grib.f of=/dev/mt/tps0d6
dd: write error: Invalid argument
1+0 records in
1+0 records out
% mt -t /dev/mt/tps0d6 status
        Controller: SCSI
        Device: EXABYTE: EXB-8200        252T    
        Status: 0x262
        Media : READY, writable, at BOT
% mt -t /dev/mt/tps0d6 rewind
% mt -t /dev/mt/tps0d6 status
        Controller: SCSI
        Device: EXABYTE: EXB-8200        252T    
        Status: 0x262
        Media : READY, writable, at BOT
% dd if=/dev/mt/tps0d6 of=grib.f.ret.2
dd: read error: Invalid argument
0+0 records in
0+0 records out
% mt -t /dev/mt/tps0d6 status
        Controller: SCSI
        Device: EXABYTE: EXB-8200        252T    
        Status: 0x262
        Media : READY, writable, at BOT
% exit
% 
script done on Mon May 27 15:38:58 1991


Finally, I decided to try our local QIC (/dev/mt/tps0d7) to see if
there were problems with DD on other devices.


Script started on Mon May 27 15:23:20 1991
% ls -l /dev/mt/tps0d7*
crw-rw-rw-   3 root     sys       23,224 Apr 11 11:50 /dev/mt/tps0d7
crw-rw-rw-   3 root     sys       23,225 May  3 15:15 /dev/mt/tps0d7nr
crw-rw-rw-   3 root     sys       23,227 Dec  3 16:01 /dev/mt/tps0d7nrns
crw-rw-rw-   3 root     sys       23,226 May 27 14:34 /dev/mt/tps0d7ns
% mt -t /dev/mt/tps0d7 status
        Controller: SCSI
        Device: ARCHIVE: VIPER 150  21247-005 VP1
        Status: 0x240
        Media : READY, writable, not at BOT
m% t -t /dev/mt/tps0d7 rewind
% mt -t /dev/mt/tps0d7 status
        Controller: SCSI
        Device: ARCHIVE: VIPER 150  21247-005 VP1
        Status: 0x242
        Media : READY, writable, at BOT
% ls -l grib.f
-rw-r--r--   1 harold   physics    34757 May 21 11:50 grib.f
% dd if=grib.f of=/dev/mt/tps0d7
dd: write error: Invalid argument
67+1 records in
67+1 records out
% mt -t /dev/mt/tps0d7 status
        Controller: SCSI
        Device: ARCHIVE: VIPER 150  21247-005 VP1
        Status: 0x262
        Media : READY, writable, at BOT
% mt -t /dev/mt/tps0d7 rewind
% mt -t /dev/mt/tps0d7 status
        Controller: SCSI
        Device: ARCHIVE: VIPER 150  21247-005 VP1
        Status: 0x262
        Media : READY, writable, at BOT
% dd if=/dev/mt/tps0d7 of=grib.f.ret
67+0 records in
67+0 records out
% ls -l grib.f grib.f.ret
-rw-r--r--   1 harold   physics    34757 May 21 11:50 grib.f
-rw-r--r--   1 harold   physics    34304 May 27 15:26 grib.f.ret
% exit
% 
script done on Mon May 27 15:27:47 1991


And that's all she (didn't) wrote.

shank@buphy.bu.edu (Jim Shank) (05/28/91)

I have been having the exact same problem with my exabyte drive and dd!!
I've been meaning to post the same question but haven't gotten around to it. 
I'm sorry Ican't offer any help, but Iwould sure appreciate finding out the 
answer to this one. If you get the answer could you post to the net or
forward  
to me?

Thanks,
       Jim



--
Jim Shank   
Physics Dept.               Phone: Office:617-353-6028 
Boston Univ.                       Lab:   617-353-5088
590 Commonwealth Ave.              Clean Room: 3-6049
Boston, MA, 02215

olson@anchor.esd.sgi.com (Dave Olson) (05/29/91)

In <82612@bu.edu> shank@buphy.bu.edu (Jim Shank) writes:


| I have been having the exact same problem with my exabyte drive and dd!!
| I've been meaning to post the same question but haven't gotten around to it. 
| I'm sorry Ican't offer any help, but Iwould sure appreciate finding out the 
| answer to this one. If you get the answer could you post to the net or
| forward  
| to me?
| 
| Thanks,
|        Jim

Hmm; maybe I should have posted my reply, rather than mailing it.
tar and dd don't treat the tape any differently, except possibly
block size if you don't specify it.  Are you using the same
device in both cases?  If you are using the variable block size
device, you need to use the 'correct' block size, otherwise it
pretty much doesn't matter, as long as it is a multiple of 1K.

There are no partial blocks on scsi tapes.

Try calling the TAC support folks if you have support; if not, use
script, then do hinv, ls -l on the device(s) you use, and scatter
mt stat commands through your activity, then mail me the script
file.  I'll take a look at it when I get time, and see if I can
spot the problem (in your usage, or in our driver).

--

	Dave Olson

Life would be so much easier if we could just look at the source code.

jeremy@perf2.asd.sgi.com (Jeremy Higdon) (05/29/91)

In article <1991May27.192352.24630@garfield.cs.mun.ca>, harold@odie.cs.mun.ca (Harold Wareham(Todd)) writes:
> We are having problems with an EXABYTE-8200 hooked up to an SGI-4D/360
> running SGI UNIX version 3.3.1. Specifically, we cannot read or write 
> an EXABYTE tape using the command DD; however, we can create and read 
> tapes using the command TAR. The drive was cleaned prior to the
> problems described in this message (the same day as the tests
> run below, in fact). To add strangeness to it all, one can use
> DD with a QIC drive, but it refuses to read back the last (partial)
> block from tape.
> 
> Odd, yes? Details follow. If you have any ideas about what's going on,
> drop me a line.
> 
> - Todd
> 
> Todd Wareham	harold@odie.cs.mun.ca	|"Success in science depends not
> Department of Physics        		| only on rational argument but
> Memorial University of Newfoundland	| on a mixture of subterfuge,
> St. John, NF, Canada			| rhetoric, and propaganda"
> 					|    - Feyerabed
> 
> **************************** DETAILS *********************************
> 
> Scripts of the various errors encountered are given below.
> 
> The following is the script of trying to read from our EXABYTE
> drive (/dev/mt/tps0d6) a tape containing a single large file
> (20484 6000-byte records); just to be sure switching from byte-swapping
> to no byte-swapping reads was causing no problems, I popped the
> tape out between the read attempts.
> 
> This tape was created at another EXABYTE drive on campus attached to a 
> MIPS-120 running UNIX 4.3 BSD. This tape reads and writes fine (using 
> DD) on that other system on that other drive.
> 
> 
> Script started on Mon May 27 15:08:34 1991
> % ls -l /dev/mt/tps0d6*
> crw-rw-rw-   3 root     sys       23,192 May 27 14:15 /dev/mt/tps0d6
> crw-rw-rw-   3 root     sys       23,193 May 27 13:57 /dev/mt/tps0d6nr
> crw-rw-rw-   3 root     sys       23,195 Nov  7  1990 /dev/mt/tps0d6nrns
> crw-rw-rw-   3 root     sys       23,194 May 27 14:15 /dev/mt/tps0d6ns

There are no variable mode devices in the /dev/mt directory, so the first
thing you have to do is create them.  cd to /dev and execute the following:

	./MAKEDEV tps

Then use /dev/mt/tps0d6nsv or /dev/mt/tps0d6nrnsv to talk to the Exabyte.