> I have a Exabyte IDE TR4 tape drive and all I get is I/O errors when I
> access it. System recognizes it at HDD. I have no SCSI devices on my
> system. How do you issue a "rewind" command for this device?
> Can someone point to docs for IDE tape devices? It works fine in Win98.
> Thanks for any help... Ron
Ron, unfortunately I'm not familiar with IDE/ATAPI tape drives in
Linux, but let's see if I can derive some hints from my experience
with floppy and SCSI tapes...
First of all : generally, ATAPI tapes _are_ on the list of supported
HW in Linux. BUT that doesn't mean that this includes *all* tape
drives by *all* manufacturers. For instance, Onstream drives currently
don't work in Linux, neither ATAPI nor SCSI nor parallel versions,
due to the non-standard interface of those.
But in your case, Exabyte is a well-known manufacturer since "decades",
so my guess is, they do it "the right way" for their ATAPI devices also.
With "the right way", I refer to an interface of essentially the same
command set for tape I/O on top of the HW interface layer (SCSI, ATAPI,
the parallel port or the floppy disk controller, whatever). You could
verify that if you'd be able to rewind your tape media (with the *same*
'mt' tool) in a SCSI as well as an ATAPI drive, for instance, if you had
both...
So, now how to configure your system to eventually use your HW ?
Basically, you need at least two things : IDE/ATAPI tape support (of
course), AND the resp. device files as the standard UNIX interface
to the HW.
You said, your device is recognised by the system on boot. I'd like
to see the exact syslog line, in order to decide if that means that
the kernel activates the tape driver itself, or if it's only seen
as unknown/generic ATAPI device as slave on the secondary IDE
interface. Please give us more information here !
Anyway, if there isn't a line similar to "Detected ATAPI tape drive
ht0" (don't know the exact phrase!), this means one of two things :
either, there's no (ATAPI) tape support statically compiled in your
running kernel, or - more likely - the appropriate module simply
isn't loaded automatically. You can verify both of these by a
manual 'insmod ide-tape'; look at the syslog messages ! Chances are,
you're nearly done in case of success ! If not, we must go on
in our diagnosis.
BTW, before I forget to mention it : it might be necessary to tell
the kernel that your IDE secondary slave is not a HD but a tape drive
by adding the line 'append = "hdd=ide-tape"' to your /etc/lilo.conf;
alternatively, you can issue the line "linux hdd=ide-tape" at the
LILO-prompt; but you have to do the latter with each and every boot.
Thus, the "append =.." method is preferable; of course, you might
need other statements as well - then you'd construct *one* append
line for both/all your statements.
Next, I'd verify that the device files exist : These are at least
/dev/ht0 (that's zero) - character, major 37, minor 0; and
/dev/nht0 - character device, major 37, minor 128. If these do not
exist, you must issue the appropriate 'mknod' commands (man mknod),
or start a script for that, sometimes called MAKEDEV, in the /dev
directory.
Now, if you feel the module has been successfully inserted into
your kernel (or you've come up with a customized kernel with
static ATAPI tape support) AND the device files exist, it's time
to test the drive itself - with a media inserted, I suggest.
The tool to control the operation of *any* tape drive is, as
mentioned above, called 'mt' (again, see it's man page also).
I'd start with 'mt -f /dev/ht0 status', and I'd expect to get
a summary of, e.g. tape position, a status bitmask, etc.
If that looks o.k., you can test other mt commands like 'rewind',
'offline' and so on. Remember that /dev/ht0 is the device that
automatically rewinds the tape after each control operation,
whereas /dev/nht0 is the non-rewinding device.
Next step IMHO is to do a test backup, e.g. with "tar", and
the trial to read this test archive again. If that works, you
should be able to use your drive regularly, and all seems to
be set up correctly.
One last annotation : if you use the tape driver as module,
and it works with manual load of the latter, but not
automatically with a 'mt' command, for instance, one more
hint : verify that your /etc/modules.conf (or was it conf.modules
- always mix that up) contains a line saying "alias
char-major-37 ide-tape" - that should be sufficient for automatic
loading by kerneld.
Hope that helps, and Good Luck
Juergen