Adding a Parallel Port based Floppy tape drive such as the Iomega Ditto 2GB, the Tecmar Ditto Max, or the Seagate 3200, can be a confusing process depending on the Linux kernel that you are running.
To start, make sure that your parallel port is in EPP mode. This is done via your system's BIOS setup program.
EPP stands for Extended Parallel Port. It is a protocol that allows ftape to communicate faster through the parallel port than with the Standard Parallel Port (SPP) protocol. Other common protocols include ECP (Enhanced Capabilities Port -- which requires a DMA channel and is NOT supported by ftape) and PS2 (IBM's parallel port communication definition from the PS/2 systems). You can check your port settings either from the bios or from the /proc filesystem. Once the parport and parport_pc modules have been installed (with the correct I/O base address and IRQ), cat /proc/parport/{0|1}/* to see if EPP is listed as a mode. If not, you will have to change your bios settings. If your parallel port does not support EPP mode, Third party parallel ports with EPP support can be purchased for $20.
As a side note, the Dell OptiPlex system parallel ports are known to NOT support EPP mode.
Next, you should be using the LATEST version of the ftape drivers, Utilities, and documentation from ( ftp://ftp.linuxtapecert.org/pub/ftape/).
Make sure that your kernel sources are installed and prepared by configuring them
(make menuconfig) to support the parallel port as modules (lp is NOT required
if you don't have a printer). It is very important that parport and lp are modules.
If lp is loaded, you will not be able to access your tape drive, and if lp is not a module,
you can never unload it! Also, make certain that you DO NOT use the kernel version of the ftape drivers.
Next, extract the ftape sources into /usr/src and make the driver modules.
Read the details in the modules/insert script -- the data presented here is very important. The important items are to understand whether you require the bpck-fdc.o or the trakker.o module to talk to the parallel port interface.
Here's an example insert script for the Seagate 3200 or Tecmar Ditto MAX PRO -- both require the bpck-fdc.o driver module.
#!/bin/bash
#
# Example module insertion script for ftape-4.x to use Parallel port
# drive based on the Shuttle BackPack interface.
#
insmod ./ftape.o ft_fdc_driver=bpck-fdc,none,none,none ft_tracings=3,3,3,3,3
insmod ./zftape.o ft_major_device_number=27 # ${27-FT_MAJOR}
#
# Make sure that you specifiy AT LEAST the IRQ for your parallel port. Also
# the ftape drivers work best if the parallel port is in EPP mode.
#
# Only include these insmod lines if you built parallel port support as a
# module under 2.2.x kernels. It is very important that you specify the IRQ
# setting for the parport_pc module, or bpck-fdc.o won't properly locate
# the port.
#
insmod parport
insmod parport_pc io=0x378 irq=7
#
# Now, insmod the Backpack driver, but first, make sure that lp is not loaded
rmmod lp
insmod ./bpck-fdc.o # the Backpack protocol driver
---------------------------------------------------------------
#!/bin/sh
#
# A remove script to remove the parallel port tape drivers and reenable the
# printer.
#
#
# Rewind the tape to ensure the block allocation table is updated.
mtft -f /dev/qft0 rewind
#
# Remove the drivers in the opposite order of install
# Of course, in this EXAMPLE, we're simply removing the Backpack driver
# and reenabling the printer (lp). You may wish to rmmod ALL of the drivers
# if you no longer require the parport services.
rmmod bpck-fdc
insmod lp
To test your installation (before you install the drivers permanently), run that script. If all is well, you'll see messages like this in your /var/log/messages file:
ftape v4.03-pre-4 06/30/99
(c) 1993-1996 Bas Laarhoven
(c) 1995-1996 Kai Harrekilde-Petersen
(c) 1996-1998 Claus-Justus Heine (claus@momo.math.rwth-aachen.de)
QIC-117 driver for QIC-40/80/3010/3020/Ditto 2GB/MAX floppy tape drives.
Compiled for Linux version 2.2.12-20
installing QIC-117 floppy tape hardware drive ...
ftape_init @ 0xc809421c.
zftape for ftape v4.03-pre-4 06/30/99
(c) 1996, 1997 Claus-Justus Heine (claus@momo.math.rwth-aachen.de)
vfs interface for ftape floppy tape driver.
Support for QIC-113 compatible volume table.
Compiled for Linux version 2.2.12-20 with versioned symbols
[000] zftape-init.c (zft_init) - zft_init @ 0xc80c9478.
[001] zftape-init.c (zft_init) - installing zftape VFS interface for ftape driver ....
bpck-fdc.c: bpck_fdc_register @ 0xc80d6448
[002] fdc-io.c (fdc_register) - Probing for bpck-fdc tape drive slot 0.
[003] 0 fdc-parport.h (ft_parport_probe) - dev: c50eeb10.
[004] 0 fdc-parport.h (ft_parport_probe) - irq: 7.
[005] 0 fdc-parport.h (ft_parport_probe) - port: 378.
[006] 0 bpck-fdc.c (bpck_fdc_probe) - Bpck parallel port tape drive interface for ftape v4.03-pre-4 06/30/99.
[007] bpck-fdc.c (bpck_fdc_switch_proto) - Need delay 1 for proto 1.
[008] bpck-fdc.c (bpck_fdc_switch_proto) - Need delay 1 for proto 1.
[009] bpck-fdc.c (bpck_fdc_log_adapter) - bpck floppy tape at 0x378, mode 1 (8-bit), delay 1.
[010] 0 fdc-parport.h (ft_parport_probe) - base: 0x378, irq: 7, number: 0.
[011] 0 ftape-buffer.c (add_one_buffer) - buffer nr #1 @ c5310b50, dma area @ c80d9000.
[012] 0 ftape-buffer.c (add_one_buffer) - buffer nr #2 @ c5310760, dma area @ c80d9000.
[013] 0 ftape-buffer.c (add_one_buffer) - buffer nr #3 @ c5310be0, dma area @ c80d9000.
[014] 0 ftape-buffer.c (add_one_buffer) - buffer nr #4 @ c5310c70, dma area @ c80d9000.
If you see any other messages indicating that the drive was not found, you should reexamine your parallel port settings.
Once properly installed, you can check operation by sending a control command such
as retention to the drive by typing: ftmt -f /dev/qft0 reten. The tape should
start moving (this takes around 3 minutes ito complete on a 3.5/7GB tape). If this is
successful, you are properly talking to the tape drive.
The final test will be a write and recovery test. A simple test would be to use this script:
#!/bin/bash
ftmt -f /dev/qft0 reten
tar -cvvf /dev/qft0 /usr/X11R6/bin/x*
#
# Restore the files to the /tmp directory
#
cd /tmp
tar -xvvf /dev/qft0
#
# now, diff them to make sure the operation was a complete success
#
cd /tmp/usr/X11R6/bin
for i in *
do
diff $x /usr/X11R6/bin/$x
done
If this test succeeds, congratulations, your parallel port drive is working properly. Copy the files to the proper locations by running "make install". Next, copy the insert script to /usr/sbin/starttape and the remove script to /usr/sbin/stoptape. Now, to use the tape drive, run starttape. To stop using the tape and reenable your printer, run stoptape.
Problem: You KNOW that things are configured properly -- you just did a backup -- but all attempts to write or read from the tape result in failure.
Solution: Reten, Reten, Reten!
Because of the nature of the media invloved with floppy-tape devices (which these drives are), tape alignment is critical. By retentioning the tape before each backup, you lose around 3 minutes, but you gain reliable tape I/O!
The command is simply: ftmt -f /dev/qft0 reten
Do YOU have a troubleshooting tip that would apply to parallel port ftape drives? Send 'em in! ltc_tips@LinuxTapeCert.org.