For the longest time, tape drives were a block to me. Although I understood the basic concept (writing to a tape similar to a music cassette), it took me quite a bit of time before I felt comfortable with them.
Because this device has the potential for either saving your data or opening up career opportunities for you to flip burgers, knowing how to install and use them is an important part of your job as a system administrator. Because the tape device node is usually read/write, regular users can also back up their own data with it.
The first tape drives supported under Linux were quarter-inch cartridge tapes, or QIC tapes. QIC is not just an abbreviation for the size of the media; it is also a standard.
In principle, a QIC tape is like a music cassette. Both consist of a long, two-layer tape. The “backing” is usually made of cellulose acetate (photographic film) or polyester (1970s leisure suits), polyester being more common today. The “coating” is the actual media that holds the magnetic signals.
The difference is in the way the tapes are moved from the supply reel to the take-up reel. In cassette tapes, movement is accomplished by a capstan and the tape is pinched between two rollers. QIC tapes spread the driving pressure out over a larger area by means of a drive belt. Additionally, more care is taken to ensure that the coating touches only the read/write heads. Another major difference is the size. QIC tapes are much larger than cassette tapes (and a little bit smaller than a VHS video tapes).
Initially, the QIC tape was 300 feet long and held approximately 30Mb of data. This was a DC300 tape. The tape that next appeared was a DC600, which was 600 feet long and could hold about 60Mb. As with other technologies, tape drives got better and longer and were able to hold more data. The technology advanced to the point where the same tapes could be used in new drives and could store as much as twice as much as they could before.
There are currently several different QIC standards for writing to tape drives, depending on the tape and tape drive being used. Older, 60Mb drives used a QIC-24 format when writing to 60Mb tapes. Newer drives use the QIC-525 format to write to several different kinds of tapes. As a result, different tapes yield different capacity depending on the drive on which they are written.
For example, I have an Archive 5150 tape drive that is “officially” designed to work with 150MB tapes (DC6150). However, I can get 120Mb from a DC600. Why? The DC600 is 600 feet long and the DC6150 is only 20 feet longer. A tape drive designed to use DC600 tapes only writes in 9 tracks, however, and a tape that uses DC6150s (like mine) writes in 15 tracks. In fact, you can use many different combinations of tapes and drives.
One thing I would like to point out from a technical standpoint is that there is no difference between 150Mb and 250Mb QIC drives. When the QIC standard was enhanced to include 1000-foot tapes, 150Mb drives automatically became 250Mb drives. (I wish I had known this before I bought so many DC6150 tapes. Oh, well, live and learn.)
A similar thing happened with 320Mb and 525Mb tapes. The QIC-320 standard was based on 600-foot tapes. However, the QIC committee decided to go with the QIC-525 standard based on 1000-foot tape. Thats why a 600-foot tape writing with the QIC-525 standard writes 320Mb.
Notice that this entire time, I never referred to QIC–02 tapes. Thats because QIC-02 is not a tape standard, but a controller standard.
An interesting side note is just how the data is actually written to the tape. QIC tape drives use a system called “serpentine recording.” Like a serpent, it winds its way back and forth along the length of the tape. It starts at one end and writes until it reaches the other end. The tape drive then reverses direction and begins to write toward the other end.
Other common tape drives are QIC–40 and QIC-80 tape drives, which provide 40Mb and 80Mb, respectively. These provide an inexpensive backup solution. These tape drives are connected to standard floppy controllers and, in most cases, the standard floppy cables can be used. The size of the tapes used for this kind of drive is about the same as a pack of cigarettes.
Aside from using the same type of controller, QIC-40/80 tape drives are similar to with floppy drives in other ways as well. Both use modified frequency modulation (MFM) when writing to the device. Sectors are assigned in similar fashion and each tape has the equivalent of a file allocation table to keep track of where each file is on the media.
QIC-40/80 tapes must be formatted before they are used, just like floppies. Because the size of data storage is substantially greater than for a floppy, formatting takes substantially longer. Depending on the speed of the tape drive, formatting can take up to an hour. Pre-formatted tapes are also available and, like their floppy counterparts, the prices are only slightly higher than unformatted tapes.
Because these tape drives run off the floppy controller, it is often a choice between a second floppy drive and a tape drive. The deciding factor is the floppy controller. Normally, floppy controllers can only handle two drives, so this is usually the limit.
However, this limit can be circumvented if the tape drive supports soft select (sometimes called “phantom select”), whereby the software chooses the device number for the tape drive when it is using it. The ability to soft select depends on the drive. Though more floppy tape drives support this capability, many of the older drives do not. I will get into more detail about this in the second part of the book when I talk about installing and using tape drives.
On larger systems, neither QIC nor mini-tapes can really handle the volume of data being stored. While some QIC tapes can store up to 1.3Gb, they cannot compare to digital audio tape (DAT) devices. Such devices use Digital Data Storage (DDS) media. Rather than storing signals similar (or analogous) to those coming across the bus, DDS stores the data as a series of numbers or digits on the tape, hence, the name “digital.” The result is much higher reliability.
Physically, DATs are the smallest tapes that Linux supports. The actual media is 4mm, so DATs are sometimes referred to as 4mm tapes.
Hewlett-Packard DATs can be divided into multiple logical tapes. This is useful when making backups if you want to store different file systems to different “tapes” and you don’t want to use any extra physical tapes. Device nodes are created to represent these different logical tapes. DAT drives can quickly scan for the location of subsequent partitions (as they are called), making searches much faster than with backups to single tapes.
One thing to watch out for is that data written to DATs are not as standardized as data written to QIC tapes. Therefore, it is possible that data written on one DAT drive cannot be read on another.
There are two reasons for this problem. This first is the blocking factor, which is the minimum space each file will take up. A 1KiB file with a blocking factor of 20 will have 19KiB of wasted space. Such a situation is faster in that the tape drive is streaming more, though there is a lot of wasted space. DAT drives use either a variable or fixed block size. Each drive has a default blocking factor that is determined by the drive itself.
Another problem is data compression, which, if it is done, is performed at the hardware level. Because there is no standard for data compression, it is very unlikely that two drives from different manufactures that both do data compression will be able to read each others tapes.
Keep in mind that that’s not all. There are many more standards that I didn’t list here. One place to start is the QIC consortium’s home page at www.qic.org, which lists dozens of tape standards and associated documents.
Before you buy a tape drive, be sure to find out how easy it is to get the tapes and how expensive they are. I bought a tape drive once that was fairly inexpensive, but the tapes were hard to find and more expensive than others. Eventually, I had to special order them from a distributor on the other side of the country, because my local vendor stopped carrying them (I was the only one who used them). The initial cost might have been more for a different tape drive, but I would have saved in the long run.
Tape Loaders
If you have a lot of data to backup, tape loaders can be a real time saver. In essence, a tape loader is a single tape drive with the ability to store multiple tapes. Because the mechanism can load any tape you choose, they function similarly to music jukeboxes. As a result, tape loaders are sometimes called tape jukeboxes.
Most of the tape loaders I have seen come with either five or seven slots. You can fill up all of the slots on Monday and write to a different tape each day of the week. Although this saves time, I would still recommend taking the tape out every day and storing it separately from the machines.
Even so, I still feel it is a time saver to fill the loader once on Monday for the week, particularly if you have a large pool of tapes. For example, in one company, we had enough tapes for a couple of months worth of backups. Our backup software keep track of which tapes were in the drive as well as on which tape any given file resided. We checked once on Monday to see what tapes were needed for the week, filled up the loader and then simply removed each tape as it was used.
On Friday, we did a full backup of every file on the system. This required the loader be filled up completely, since we had some much data. Therefore, having the loader was a necessity for the weekend backups. Therefore, we simply used the available functionality during the week.
As the company and quantity of data grew, we eventually needed more tapes than could fit in a single loader. That meant we had to get a second loader for that machine. Although most of the more advanced backup packages can handle loaders not all of them work well with multiple loaders. Therefore, you should check in advance before buying something that cannot grow with you.