PDA

View Full Version : 9 Track Linux commands and /Dev



Marty
July 2nd, 2014, 02:53 PM
Hi All;

I have my 9 Track Tape connected to my PC, I want to check out the Tape Drive..
I want to see if the Tape Drive is Good, since It has not so far re-act to commands from my DG Eclipse S 130..
And I am trying to eliminate things like the Drive itself and Cables, then the Spectra 20 Board and finally the Eclipse itself..
I know one of the Commands that I can use is MT..
What I don't know is what /Dev do I use for my Drive ??
I am using Red Hat Fedora 20..

THANK YOU Marty

Al Kossow
July 2nd, 2014, 02:59 PM
Hi All;

I have my 9 Track Tape connected to my PC, I want to check out the Tape Drive..
I want to see if the Tape Drive is Good, since It has not so far re-act to commands from my DG Eclipse S 130..
And I am trying to eliminate things like the Drive itself and Cables, then the Spectra 20 Board and finally the Eclipse itself..
I know one of the Commands that I can use is MT..
What I don't know is what /Dev do I use for my Drive ??
I am using Red Hat Fedora 20..

THANK YOU Marty

look at
http://www.brouhaha.com/~eric/software/tapeutils/

Marty
July 2nd, 2014, 03:20 PM
Hi All;

THANK YOU Al, I have downloaded the file and I will try it out...
Al, did You get a private message from me, or did I goof up and it did not make it to You ??


THANK YOU Marty

Chuck(G)
July 2nd, 2014, 04:24 PM
Just out of curiosity, Marty, what's the interface from your PC to the drive?

If it's SCSI, the device name will be something like /dev/stx, where x is a number. Also, you'll see "/dev/nstx". The difference is that that "n" version does not rewind after an operation, while the "non-n" one does. You should also see the drive mentioned in the boot-up log, located in the /var/log directory--I think RH still keeps it in /var/log/messages.

Marty
July 2nd, 2014, 04:44 PM
Hi All;
Thank You Chuck for Your Reply.. Yes, it is SCSI, I have a small Box that hangs on the back of my Cipher (I think) 990, that converts from twin 50 pin cable to SCSI, and that is Attached to an ATTO ExpressPCI PSC Board..
OK, so I use the /dev/nst01..
I have two of these Boards and If I remember correctly one is good and one is not good..
I don't know which one is in my machine now.. Thank You for Your Help..
I realized my mistake, I was using /dev/st01 instead of /dev/st1..

THANK YOU Marty

Chuck(G)
July 2nd, 2014, 05:14 PM
I'll add one thing here--that Linux/Unix natively is perhaps not the best OS to use for 9-track tape. The reason is that most of the utilities are geared toward a fixed block (think of it as a disk sector) size. This is not the case for a lot of older tapes--from some of the old mainframes or minis, it's not uncommon to see a dozen different block sizes on a tape--so dd, for example, is not exactly very useful. Unix/Linux tends to use tape devices as backup, not working media, so block sizes are all the same.

John Wilson's tape utils may be what you need.

Marty
July 2nd, 2014, 05:29 PM
Hi All;
Chuck Thanks for the added input !!!
At present, I am using a "Scratch Tape" and I just want it to Read and Write to the Tape..
Which it is not doing a present..
I FOUND the Problem, I had /dev/st1, it needed to be /dev/st0 !!!!!!!!!!!!
Is John Wilson's tape utils, what is referenced above ???

THANK YOU Marty

Chuck(G)
July 2nd, 2014, 05:59 PM
Yup, just use Al's link posted above.

Marty
July 2nd, 2014, 07:17 PM
Hi All;
Thank You, Chuck, I have it working on the PC, along with the Long cables 50 pin cables, that I checked out on the PC..
So, now I at least know that the Drive is good and the Cables are good..
Still can't get it to 'boot' from the Eclipse S130, using a Spectra 20 Board.. But, at least the Tape Drive works..

THANK YOU Marty

Tor
July 3rd, 2014, 09:21 AM
SGI's IRIX is very easy to handle w.r.t. non-fixed tape record sizes. I use my CCT drive with an Octane (to read old ANSI and non-ANSI tapes, with sometimes very variable record sizes).
AIX can also handle variable tape record sizes, but it's slightly more cumbersome. I haven't actually tried this with Linux.

-Tor

Chuck(G)
July 3rd, 2014, 09:37 AM
SGI's IRIX is very easy to handle w.r.t. non-fixed tape record sizes. I use my CCT drive with an Octane (to read old ANSI and non-ANSI tapes, with sometimes very variable record sizes).
AIX can also handle variable tape record sizes, but it's slightly more cumbersome. I haven't actually tried this with Linux.

The problem isn't with Linux's native ability; rather it's a problem with Unix/Linux standard toolset. The sg3_utils package facilitates the sending of SCSI commands directly to a device, but there's no Linux-standard for interchange of files with variable block lengths. So you pretty much have to sharpen your pencil and start coding--or resort to John Wilson's utilities or the like.

There are several tape-image formats used by various emulator packages, but none is particularly complete, nor are they mutually compatible. I suspect that little work will be done to create a universal tape image format that will be respected by all emulators because 9 track tape is considered to be obsolete and not worthy of attention by the mainline Linux community. Heck, now many Linux distros really support the QIC-02 interface?

Oddly, I find that MS-DOS represents a better platform for handling old tapes. Packages such as Outright are really pretty good and easy to use.

Marty
July 3rd, 2014, 10:48 AM
Hi All;
Thank You both for Your replys..
"" Oddly, I find that MS-DOS represents a better platform for handling old tapes. Packages such as Outright are really pretty good and easy to use. ""
Chuck, I didn't know of anything for MS-DOS or for Windows that would work with my 9 Track, which Is why I used Linux.. I never heard of Outright, I'LL have to see If I can find it..

THANK YOU Marty

Al Kossow
July 3rd, 2014, 10:59 AM
I suspect that little work will be done to create a universal tape image format that will be respected by all emulators because 9 track tape is considered to be obsolete

It won't happen because emulator teams don't talk to each other, or in many cases, don't even know that other efforts exist.
They are all hobby efforts, each doing their own thing blissfully ignorant of each other. I'm on enough of the development mailing lists (SIMH, MAME, ...) to know
there are almost no cross-communications going on.

Marty
July 3rd, 2014, 11:30 AM
Hi All;

I GOT IT TO try TO BOOT FROM THE TAPE DRIVE !!!!!!!!!!!!!!!!!!!!!!!!!!!! Since it is a scratch Tape, there would be nothing for it to put from the Tape to the Eclipse S 130..

It was my own mistake, I was NOT thinking Clearly, I put '060133 at Location 376, instead of '060122, and wondering why it wouldn't boot on the Address of '000022 on the Spectra Board.. DUH !!!!!!!!!!!!!!!

THANK YOU Marty

Chuck(G)
July 3rd, 2014, 12:16 PM
It won't happen because emulator teams don't talk to each other, or in many cases, don't even know that other efforts exist.
They are all hobby efforts, each doing their own thing blissfully ignorant of each other. I'm on enough of the development mailing lists (SIMH, MAME, ...) to know there are almost no cross-communications going on.

Lately, I've been using the "Copy out" format of Outright and converting it to whatever needs it. OR is pretty good because it includes a lot of useful tools in the same package.

Marty
July 3rd, 2014, 12:35 PM
Hi All;

Chuck, Where can I get a copy of Outright, when looking on the Web, all I see is an accounting package, or is that it ????

THANK YOU Marty

Chuck(G)
July 3rd, 2014, 12:52 PM
Outright has been long out of production, but was a program from Chi Corporation, I believe. Here's a view of their old page (http://www.keyton.co.jp/products/UCHI/OUTRIGHT.html)

Marty
July 3rd, 2014, 01:50 PM
Hi All;
I take it that from Your response, that You Do Not have a copy of it, that I could get from You ??

THANK YOU Marty

NF6X
July 3rd, 2014, 03:33 PM
I have a small Box that hangs on the back of my Cipher (I think) 990, that converts from twin 50 pin cable to SCSI

I would like to find something like that box, too. I have a Kennedy 9610 drive that uses the dual 50-pin Pertec interface. I have a Unibus interface card to hook it up to my PDP-11/44 project one of these days, but it would be nice to also cobble together some way to connect it to a more modern machine when needed. I've poked around on eBay intermittently, but I haven't found a suitable converter yet.

Marty
July 3rd, 2014, 03:48 PM
Hi All;
NF6X, what I have is a Cipher CSC 100, Part # 963889-002..
Give me a few minutes and I'LL post some pictures..

19275 19276

THANK YOU Marty

Chuck(G)
July 3rd, 2014, 04:20 PM
I've got OR for a non-SCSI (Pertec) interface, so that isn't going to help you.

NF6X
July 3rd, 2014, 05:10 PM
Hi All;
NF6X, what I have is a Cipher CSC 100, Part # 963889-002..

Thank you!

Marty
July 3rd, 2014, 05:29 PM
Hi All;
Chuck, it might,
"" I've got OR for a non-SCSI (Pertec) interface, so that isn't going to help you. ""
I also have an old Pertec Card that fits in a 486 type of machine.. Its a "Computer Logics" Board..

THANK YOU Marty

Tor
July 4th, 2014, 02:12 AM
The problem isn't with Linux's native ability; rather it's a problem with Unix/Linux standard toolset. The sg3_utils package facilitates the sending of SCSI commands directly to a device, but there's no Linux-standard for interchange of files with variable block lengths. So you pretty much have to sharpen your pencil and start coding--or resort to John Wilson's utilities or the like.
As a programmer, nothing else (than writing the software) even occured to me! :)
Well, there's 'dd' and 'mt', which, together with selecting the n-devices (or the equivalent non-rewind device on my Octane) can achieve the same, although it's a bit awkward.

When there's an old CCT I need to read I read it with a small program I wrote ages ago, it simply reads whatever's on the tape, in whichever format (variable or fixed record sizes, or mixed, single- or multiple files, any number of end of file marks, etc). and creates a disk file which encodes the original tape format (very simple format. A 4-byte value with either 0 for EOF, or the number of bytes in the following 'record').

Then I have tools I wrote to work with the disk file instead of using the physical tape. They work on the disk file as if it is a tape, as those ANSI and various backup formats typically encoded some of the protocol in actual record sizes (so just a data dump from the tape wouldn't be optimal really). So, a single tool for copying the tape (and I also have a write-tool which can use that file to re-create a tape too if necessary), and additional tools for the various tape formats, e.g. ANSI tapes, or Norsk Data backup format tapes, etc.

But, getting back to the OP's question.. 'mt' and 'dd' can together do almost everything with a tape, also those with variable-sized records. You would have to use the no-rewind device file if you want to do more than one operation. Using the tools manually from the command line can be used to establish what format the tape is, starting with the record size of the first record (which could be a tape label.)

What I don't know is how to set the drive to variable record size mode on Linux (or to switch to fixed record size mode. But variable size mode is much easier to work with if you want to figure out what size a record is). On SGI there are different device files for all the different modes of the tape drive, so that's very easy. In any case, just mt -f /dev/nst0 status is something that works on nearly all *nix (just have to figure out the equivalent of /dev/nst0 for each of them) and can be used to see the status and mode of the drive.

-Tor

Marty
July 4th, 2014, 06:42 AM
Hi Alll;
Tor, Thanks for Your input.. I have a couple of questions..

"" When there's an old CCT I need to read I read it with a small program I wrote ages ago. "" What is a CCT ??

"" But, getting back to the OP's question. "" What is an OP ??

I just don't like it when people use abbreviations and I have know/no idea what they are referring to, instead of just spelling it out..

Thank You Marty

Chuck(G)
July 4th, 2014, 09:54 AM
As a programmer, nothing else (than writing the software) even occured to me! :)

My point was that not everyone is a programmer. I was somewhat surprised myself to see that a backup utility that I wrote decades ago for DDS works just fine with 9 track tapes.


What I don't know is how to set the drive to variable record size mode on Linux (or to switch to fixed record size mode. But variable size mode is much easier to work with if you want to figure out what size a record is). On SGI there are different device files for all the different modes of the tape drive, so that's very easy. In any case, just mt -f /dev/nst0 status is something that works on nearly all *nix (just have to figure out the equivalent of /dev/nst0 for each of them) and can be used to see the status and mode of the drive.

When I was talking about variable-block size, I really meant variable-block size--here's the start of a tape that I'm working with currently:


1024 bytes
FILEMARK
54 bytes
256 bytes
54 bytes
60 bytes
102 bytes
60 bytes
150 bytes
54 bytes
150 bytes
22 bytes
150 bytes
1218 bytes
150 bytes
130 bytes
150 bytes
1866 bytes
150 bytes
4096 bytes
3056 bytes...


I can't imagine handling this with dd, nor does dd have any way to represent the block sizes in a file.

Marty, "OP" = original poster. "CCT" = computer compatible tape; usually means 1/2" open-reel tape.

Tor
July 7th, 2014, 05:46 AM
@Marty,

"OP" is (in this context) used for "Original Poster", sorry for not spelling it out but it's used on every forum I read so I didn't think about it.
"CCT" means Computer Compatible Tape, and is the kind of reel-to-reel tape you use on your 9-track tape drive. Well, at least I have assumed so - I only know about the term "9-track" used about CCTs.

@Chuck(G),
Yes, those are really variable-size for sure - I can read those kinds of tapes with my own tool, however it doesn't work on all systems. The problem is really the tape driver in those cases, when it can't handle a change of record size between file marks. Where it can, it's usually also possible to use 'dd' actually - as long as you use the 'count=1' parameter. When I start looking at an unknown tape I typically start with 'dd if=/dev/tapedrivedevice bs=1 of=t.1 count=1' and then ls -l t.1 will tell me the record size. Another 'dd' to t.2 for the next record and so on. It works, when the driver is in variable size record mode and you use 'dd' with 'count=1'. It will read one physical record and write a file where the length is exactly that record size.

-Tor

Roe
July 7th, 2014, 07:37 AM
[QUOTE=Tor;331274
What I don't know is how to set the drive to variable record size mode on Linux (or to switch to fixed record size mode. But variable size mode is much easier to work with if you want to figure out what size a record is).
-Tor[/QUOTE]

#include <sys/mtio.h>

void set_variable(int fd) { /* fd should be opened to the /dev/nst0 device node */
struct mtop mto;

mto.mt_op = MTSETBLK;
mto.mt_count = 0;

if(ioctl(fd,MTIOCTOP,&mto) < 0) perror("setting variable block mode");
}

Tor
July 7th, 2014, 08:49 AM
Thanks Roe.

Is there a non-programmable method also? On SGI it's so very easy because you just select the right device file (particularly important when you want to look at records with 'dd' instead of from inside your program).

I should add that I have actually used that programmable method in an application (for Linux) that I delivered to a customer. It works fine. I never tested if the setting "sticks" though.. could be used for a standalone mode tool if so I guess. Not as elegant as the SGI/IRIX way but..

Marty
July 7th, 2014, 10:48 AM
Hi All;
I have been able to use Tapedump on my Linux Box to see what is on the three tapes that I have for reading/testing purposes, with the Cipher 990 Tape Drive..

THANK YOU Marty