Configuring Linux to Support a Tape Drive

written by: Grace Nelson; article published: year 2006, month 12;


In: Categories » Computers and technology » Storage devices » Configuring Linux to Support a Tape Drive

The ease of configuring Linux to support a tape drive depends on the Linux distribution and version, the type of drive, the interface it uses, and whether the drive is present when Linux is installed or is added later. If you use a modern, mainstream ATAPI or SCSI drive with a recent Linux distribution, installation will likely be straightforward. If you use an older distribution, an obsolescent or proprietary drive, or a drive that uses an interface other than ATAPI or SCSI, you may encounter significant problems getting the drive to work, if indeed you can get it working at all. You can use the following tape drives with Linux:

Travan, DDS, and AIT tape drives

Recent Linux releases natively support a wide variety of Travan, DDS, and AIT tape drives with ATAPI or SCSI interfaces. If you install and configure the drive and interface properly before you install Linux, the Linux installer will likely recognize the drive and automatically configure Linux to use it. In fact, Linux often does a better job than Windows 2000/XP of recognizing and configuring Travan, DDS, and AIT tape drives.

If you install a tape drive in a system with Linux already installed, log in as root and run the hardware detection utility (e.g., Kudzu in Redhat or Mandrake and Discover in Debian). If the drive is supported, the utility detects the drive, installs drivers, and automatically configures Linux to use the drive. If the drive is not recognized, check the web sites for the drive and your Linux distro to determine how to configure the drive manually.

USB and FireWire (IEEE-1394) drives require a 2.4 or higher Linux kernel.

OnStream ADR tape drives

Linux support for OnStream tape drives differs according to the command set used by the drive. All second-generation (ADR2) drives and first-generation (ADR) ADR30, ADR50, and ADR50e SCSI drives use the standard SCSI command set, so the standard st (SCSI tape) driver suffices to interface the drive to the backup application (the ATAPI ADR2.60IDE drive requires both the ide-scsi and st drivers).

Most first-generation OnStream ADR drives—the DI30, DI30 FAST, DP30, USB30, SC30, SC30e, SC50, SC50e, and FW30—use a proprietary command set that optimizes those drives for storing streaming video. That command set differs significantly from the standard ATAPI and SCSI command sets, which means the standard st driver does not support these drives. Full (or even partial) Linux support requires a kernel rebuild or various workarounds. Fortunately, a modified version of the st driver, called the osst driver, is available. The osst driver interfaces standard backup applications to the proprietary command set of older ADR drives.

Although the ide-tape driver supports the OnStream DI30 drive, we strongly recommend using the ide-scsi and osst drivers instead. The ide-tape driver writes tapes in LIN3 logical format, whereas osst writes tapes in LIN4 logical format. That means the osst driver reads tapes written with ide-tape, but the ide-tape driver cannot read tapes written with osst. Also, various problems have been reported using ide-tape with DI30 drives, ranging from inability to restore files to complete failure to recognize the drive.

FDC-based drives

Travan TR-3 and earlier QIC drives use the floppy drive controller (FDC) interface, either directly or in some cases via a parallel port connection. These drives are now so old that most have been retired, but if for some reason you must use an FDC-based tape drive on a Linux system, you may be able to get it running using ftape. The ftape driver supports QIC-40, QIC-80, QIC-3010 (TR-2), QIC-3020 (TR-3), Iomega Ditto 2GB, and Ditto Max drives. For more information about ftape, see http://www.ibiblio.org/pub/Linux/docs/HOWTO/other-formats/html_single/Ftape-HOWTO.html.

We do not recommend using ftape in PCI-based systems, which is to say in any modern system at all. The ftape driver has known incompatibilities with some PCI motherboards. For details, view README.PCI in the ftape distribution.

Once Linux recognizes a tape drive, you can use bundled Linux applications such as tar, mt, mtx, dump, restore, and cpio to write and read tapes in the drive. You can also use full-featured backup applications such as BRU (http://www.tolisgroup.com/), Amanda (http://www.amanda.org/), and Arkeia (http://www.arkeia.com/) to implement a formal backup program.

Here are some useful sites that cover various aspects of using tape drives with Linux:

http://www.linuxtapecert.org
http://www.tldp.org/LDP/sag/index.html

legal disclaimer

1) Our website is not responsible for the information contained by this article as well for any and all copyright infringements by authors and writers. E-articles is a free information resource. If you suspect this article for any copyright infringements, please read the Terms of service and contact us to investigate the problem.
2) The E-articles directory team is not responsible for inaccuracies, falsehoods, or any other types of misinformation this tutorial may contain and will not be liable for any loss or damage suffered by a user through the user's reliance on the information gained here. Please read the Terms of service

Useful tools and features

Translate this article to...    Send this article to you or to a friend

Link to this article from your page   
If you like this article (tutorial), please link to it from your web page using the information above. Linking to this page, this is the only way to help us improve our service, the same time providing your visitors with a way to improve their online experience.

related articles

1. Subcodes
Subcode bytes enable the drive to find songs (which are confusingly also called tracks) along the spiral track and also contain or convey additional information about the disc in general. The subcode bytes are stored as 1 byte per frame, which results in 98 subcode bytes for each sector. Two of these bytes are used as start block and end block markers, leaving 96 bytes of subcode information. These are then divided into eight 12-byte subcode blocks, each of which is assigned a letter designation PW. Each subcode channel can hol...

2. High Capacity Magnetic Storage Devices
High-capacity removable media drives are an ever-shrinking category. With competition at the low end (1GB and under capacities) from USB flash memory keychain drives and at higher capacities from external mini-hard disks (4GB and up), rewritable DVD (8.5GB), and larger USB and FireWire hard disks (20GB and up), there are only two current product families, both from Iomega: Zip. Flexible media, with capacities of 100MB, 250MB, and 750MB REV. Rigid media, with capacity of 35GB (native...

3. Handling CD Read Errors
Handling errors when reading a disc was a big part of the original Red Book CD standard. CDs use parity and interleaving techniques called cross-interleave Reed-Solomon code (CIRC) to minimize the effects of errors on the disk. This works at the frame level. When being stored, the 24 data bytes in each frame are first run through a Reed-Solomon encoder to produce a 4-byte parity code called "Q" parity, which then is added to the 24 data bytes. The resulting 28 bytes are then run though another encoder that uses a different scheme...

4. Floppy Drive Types
As distinct from diskette types and formats, six drive types have been installed in PC-compatible systems: 5.25-inch 160/180 KB (SSDD) Single-Sided, Double-Density(SSDD) was the standard FDD in very early PC-class systems. These drives read and write only SSDD diskettes. 5.25-inch 320/360 KB (DSDD) Double-Sided, Double-Density(DSDD) was the standard FDD in PC-class systems, and was often found as a second FDD in early AT and 386 systems. The...

5. How to choose a Tape Backup Drive
Choosing a tape backup drive can be a simple job if you need to back up a single standalone system with a relatively small hard drive. The decision becomes more complex if the system has a larger hard drive or if you must back up a desktop system as well as a laptop. Choosing a tape backup drive type can be an even more complex program if you must back up a network server's hard drives and perhaps even back up the workstations from the server. As you ponder which backup tape drive you should select, consider the following facto...

6. DVD Copy Protection
DVD video discs employ several levels of protection that are mainly controlled by the DVD Copy Control Association (DVD CCA) and a third-party company called Macrovision. This protection typically applies only to DVD-Video discs, not DVD-ROM software. So, for example, copy protection might affect your ability to make backup copies of The Matrix, but it won't affect a DVD encyclopedia or other software application distributed on DVD-ROM discs. Note that every one of these protection systems has been broken, so with a lit...

7. How to Manually Resolve Motherboard Conflicts
In the past, the only way to resolve conflicts manually was to take the cover off your system and start changing switches or jumper settings on the adapter cards. Fortunately, this is a bit easier with plug-and-play because all the configuration is done via the Device Manager software included in the operating system. Although some early plug-and-play cards also had jumper switches or setup options to enable them to be configured manually, this feature was found primarily on ISA PnP-compatible cards. Be sure you write down or print o...

8. Hard Drive Advancements
In 1957, Cyril Northcote Parkinson published his famous compilation of essays titled Parkinson's Law, which begins with the statement, "Work expands so as to fill the time available for its completion." A corollary of Parkinson's most famous "law" can be applied to hard drives: "Data expands so as to fill the space available for its storage." This, of course, means that no matter how big a drive you get, you will find a way to fill it. I know that I have lived by that dictum since purchasing my first hard disk drive more than 2...

9. How Magnetic Fields Are Used to Store Data
All magnetic storage devices read and write data by using electromagnetism. This basic principle of physics states that as an electric current flows through a conductor (wire), a magnetic field is generated around the conductor. Note that electrons actually flow from negative to positive as shown in the figure, although we normally think of current flowing in the other direction Electromagnetism was discovered in 1819 by Danish physicist Hans Christian Oersted, when he found that a compass needle would deflect away from p...

10. Hard Disk Form Factors
The cornerstone of the PC industry has always been standardization. With disk drives, this is evident in the physical and electrical form factors that comprise modern drives. By using industry-standard form factors, you can purchase a system or chassis from one manufacturer and yet physically and electrically install a drive from a different manufacturer. Form factor standards ensure that available drives will fit in the bay, the screw holes will line up, and the standard cables and connections will plug in. Without these indus...