4. Getting and installing ftape

Contents of this section

I will eventually include an installation guide in this section. For the moment being, you'll have to do with the documen that is included in the ftape distribution.

4.1 What is ftape

ftape is a driver program that controls various low-cost tape drives that connect to the floppy controller.

ftape is not a backup program as such; it is a device driver, which allows you to use the tape drive (just like the SoundBlaster 16 driver let you use your sound card) through the device file /dev/[n]rft[0-3].

ftape is written by Bas Laarhoven <bas@vimec.nl>, with ``a little help from his friends'' to sort out the ECC (Error Correcting Code) stuff. ftape is copyrighted by Bas under the GNU General Public License, which basically says: ``go ahead and share this with the world, just don't disallow other people from copying it further''.

ftape is currently beta testing, and has been that for some time now. It is reliable enough for critical backups (but always remember to check your backups, so you won't get a nasty surprise some day).

ftape supports drives that conform to the QIC-117 and one of the QIC-80, QIC-40, QIC-3010, and QIC-3020 standards. ftape does not support QIC-02 tape drives or drives that connect via a SCSI interface, e.g. DAT drives. SCSI drives are accessed as /dev/[n]st[0-7] and are supported by the kernel through the SCSI drivers. If you look for help on SCSI tape drives, you should read the SCSI-howto. See section Supported drives and Un-supported drives for a list of supported and unsupported drives.

What about IDE tape drives ?

No, IDE tape drives are not supported. In fact, the first drives are just emerging, so I'd be surprised if you have one. IDE tape drives will be supported by the IDE/ATAPI driver, written by Mark Lord and Steven Snyder. If you do have an IDE tape drive, and are interested in helping debugging, you should contact Mark <mlord@bnr.ca> .

4.2 How fast is ftape?

You can achieve quite respectable backup and restore speeds with ftape: I have a Colorado DJ-20 and an Adaptec 1542CF controller, and have measured a 4.25Mbyte/min sustained data transfer rate (no compression) across a 70Mbyte tar archive, while comparing the archive on the tape with data on my IDE disk. The speed of ftape is mostly dependent on the data transfer rate of your FDC: The AHA1542CF has a ``post-1991 82077'' FDC, and it will push 1Mbit/sec at the tape drive. If you have an FDC which can only deliver 500Kbit/sec data rates, you will see half the transfer rate (well, roughly).

4.3 What you need to install ftape

There are three source distributions that you must have to get ftape running:

Note that you cannot use modules-1.2.8 with a pre-1.2.8 kernel; if you upgrade to modules-1.2.8, you must update your kernel too.

Getting ftape

ftape can be fetched from ftp://sunsite.unc.edu/pub/Linux/kernel/tapes (and its mirrors):

You should get the following files:

The .tar.gz and patch.gz files are the ftape driver proper, while the lsm file is a Linux Software Map (LSM) file for the LSM project.

If you have a Iomega Ditto 3200 drive, you need to add the following line to vendors.h somewhere appropriate (in the QIC117_VENDORS #define):

  { 0x08882,  80, wake_up_colorado,  "Iomega 3200" }, \ 

modules

Newer kernels (from 1.1.85 and on), have improved support for loadable modules (by Bjørn Ekwall and Jacques Gelinas), which (if possible) allows you to insert modules compiled for an `old' kernel into a `new' kernel. To compile the kernel with this improved module support, you need the modules-1.2.8.tar.gz file. The modules packages can be found on tsx-11.mit.edu and sunsite.unc.edu. You must compile and install it before you compile the kernel.

What's new in modules-1.2.8?

The v1.2.8 package no longer exhibits the infamous insmod Oops bug, when ftape is inserted into the kernel. This was, by the way, caused because insmod did not handle modules with more that 4Kbyte of static data correctly. However, this is not the greatest advantage of the v1.2.8 package.

With v1.2.8 comes the kerneld daemon which can automatically insert the needed modules as needed. This requires a patch to the v1.2.x kernels, but the patch is supposed to be included as a standard part of the kernel, when the 1.3 kernel series starts (well, the 1.3 series is well underway, but I don't know if the patch has gotten into the kernel. Can anyone enlighten me?).

Installing modules-1.1.87

Although you still can use version 1.1.87 of the modules utilities, I recommend that everyone upgrade to the 1.2.8 version.

If do not wish to upgrade (or cannot), here is what to remember when installing the 1.1.87 version:

The modules-1.1.87 package has a bug which will cause the insmod to generate a kernel Oops, which the ftape modules is inserted. This bug is corrected by the insmod.c, insmod.h, and load_aout.c files that you can find in the ftape-2.03/insmod directory. (From now on, mail about Oops'es when ftape is inserted will quietly go to /dev/null).

Installing modules-1.2.8

Extract the files somewhere convinient. The, go into the modules-1.2.8 directory and say make all; make install. Remeber that you must be root to be able to install the files and man pages.

The Linux kernel

Since Linux version 1.2 has been out for some time I assume that everyone has switched over to it. If you have not already switched over, I assume you have a very good reason for not doing so, and that you can cope with the differences in installation etc, that it will make for you.

The kernel can be fetched from a large number of sites all over the world, including these:

    sunsite.unc.edu [152.2.22.81]:   /pub/Linux/kernel/tapes/
    tsx-11.mit.edu  [18.172.1.2]:    /pub/linux/sources/system/
    ftp.funet.fi    [128.214.248.6]: /pub/OS/Linux/PEOPLE/Linus/
    ftp.helsinki.fi [128.214.38.235]:/pub/Software/Linux/Kernel/ 

You will find a number of subdirectories, including two named v1.2 and v1.3. These contain (you guessed it!) v1.2 and v1.3 of the kernel.

The v1.3 is the development kernel branch, while the v1.2 series are updated rather seldomly, and only after some serious bug has been found in it, and a field-tested fix has been provided.

For a minimum-hazzle kernel, you should go for the v1.2 series, but if you are more adventerous (or the v1.2 kernels lack your favorite CDROM driver), you can get a v1.3 kernel.

Be warned, though, that the v1.3 kernels are of unknown stability, and you should be well fared in patching, configuring, and compiling the kernel.

4.4 If you have ftape-2.02, or earlier

Since ftape both has been improved and some more bugs have been thrown out, you should consider upgrading to 2.03b mandatory.

4.5 If you have ftape-2.02, or earlierFollowing the development of theftape driver

If you want to follow the development of the ftape driver, you should consider subscribing to the TAPE mailing list on vger. To subscribe to it, send a mail saying `subscribe linux-tape' to majordomo@vger.rutgers.edu. When you subscribe, you will be sent a greeting mail, which will tell you how to submit real mails and how to get off the list again.

4.6 Compiling and installing the ftape driver

There is included an installation guide (the file Install-guide) in the ftape distribution; please read that.

4.7 Can I format my tapes under Linux?

No! Honestly, noone is working on it: If you want to work on it, drop Bas a line. Until then, you'll have to use MessyDOS (arghhh!) instead or buy preformatted tapes. However, some of the preformatted tapes are not checked for bad sectors!. If the ftape driver encounters a tape with no bad blocks, it will issue a warning. If ftape barfs at your preformatted tapes, try out your DOS software. If both the DOS software and ftape barfs on your tapes, a reformat will very probably cure the problem.

Note that to be able to use your newly formatted tapes under ftape, you must erase the tape first:

        mt -f /dev/nftape erase

4.8 Which formatting programs can I use under DOS?

These are known to work:

These programs are known to be more or less buggy:

In fact, most software under DOS should work. The Conner Backup Basics v1.0 has a parameter off by one (someone could not read the QIC-80 specs right!), which is corrected in version 1.1. However, ftape detects this, and will work around it. Dennis T. Flaherty (<dennisf@denix.elk.miles.com>) report that Conner C250MQ owners can obtain the new v1.1, by calling Conner at 1-800-4Conner (in the US) and ask for an upgrade (for a nominal fee for the floppy). The Windows versions should work fine. Some versions of Colorado's tape program for windows, has an off-by-one error in the number of segments. ftape also detect and work around that bug.

Central Point Backup can be used, but it wastes precious tape space when it encounters a bad spot on the tape.

NOTE: If you are running a formatting software under DOS, which is not mentioned here, please mail the relevant info to me ( <khp@pip.dknet.dk> ), so I can update the list.

4.9 Mixing ftape and floppies

Since both the floppy driver and ftape needs the FDC (and IRQ6), they cannot run concurrently. Thus, if you have mounted a floppy and then try to access the tape drive, ftape will complain that it cannot grab IRQ6 and then die. This is especially a problem when designing a emergency disk for use with ftape. This solution is to either load the boot/root disk into a ramdisk and then unmount the floppy, or have two FDC's.


Next Chapter, Previous Chapter

Table of contents of this chapter, General table of contents

Top of the document, Beginning of this Chapter