Knowing Your Capacity Requirements

The capacity of tape drives ranges from a few megabytes for obsolete models from a decade or more ago to tens of gigabytes for single-tape units or hundreds of gigabytes for changers— drives that can accept several tape cartridges and change between them, presenting the illusion of a single larger tape to the computer. Naturally, the higher capacity drives and media generally cost more than do the lower capacity units and tapes. 8

Factoring in Compression

Most tape drives today are sold with two capacity estimates: raw capacity and compressed capacity. Because tape drives are generally used to store data for archival purposes, it's common to apply compression algorithms to the data when writing to tape. These algorithms typi cally achieve an average of approximately 2:1 compression, so a 4GB tape can hold 8GB of data. Manufacturers generally use this 2:1 ratio when computing the compressed data storage capacity.

Caution

When evaluating tape drives, be sure to consider whether the capacity quoted for the drive is compressed or uncompressed. Some models use the compressed capacity, and others the uncompressed capacity, in advertising or model names. As a hypothetical example, one model might be advertised as the BigTape 20, and another as the UltraTape 10, but both might use the same tape with a 10GB uncompressed capacity.

Precisely how much compression you can achieve, of course, depends upon what type of data you store on your tapes, and perhaps also what backup software you use. If your hard disk is filled with uncompressed graphics or text files, chances are you'll achieve far greater than 2:1 compression; a 4GB drive might suffice to store 12GB-16GB of data. If your hard disk is

Part II

filled largely with precompressed files, such as GIF graphics or Linux RPM files, then you' ll gain little storage space from compression. The same 4GB drive might then store only 4.5GB of data. In extreme cases, applying compression to precompressed files can actually increase the size of the files. In such a case, you should turn off the compression features of the drive or software.

Compression is achieved by one of two means:

• Hardware Some drives include small CPUs and firmware that can apply compression to data as it comes from the computer. With such drives, your backup software doesn't need to support compression; in fact, applying such compression just slows down the backup and can reduce the capacity of the tape. As far as Linux is concerned, such a drive has a variable capacity that's larger than the raw capacity of the tape.

• Software Some drives don't contain compression algorithms in their firmware, and so rely on the Linux backup software to do the compression. This software chews up CPU time and can slow down the backup, depending upon the CPU speed, the tape drive's bus speed and type, and the tape's speed.

Note

Applying both software and hardware compression produces no benefit. The hardware's compression algorithms won't be able to achieve any better compression than was achieved by the software compression. When using a drive that supports hardware compression, therefore, it's generally best to disable software data compression. In some cases, such as if you'll need to read the tape on a drive without hardware compression, you might prefer disabling the hardware compression. This process is described in the section titled "Using mt to Control a Tape Drive," later in this chapter.

Typically, hardware compression algorithms are the same for different models of drive that use the same media. For example, Travan NS drives all use the same compression algorithms. Therefore, a compressed tape created in one drive should be readable in another drive, provided both drives accept the same form and capacity of tape. There are exceptions to this rule, however, so using hardware compression can cause inter-drive compatibility problems. When you use software compression, no such problem arises, although you must use compatible software on both computers (as is true when using hardware compression). These factors are of interest mainly when you need to use a tape as a data transport mechanism or when you replace one drive with another.

Chapter 8

As a general rule, I favor drives with hardware compression. Using hardware compression removes some computing burden from the host computer and can often speed up backups. When necessary, you can disable compression using jumpers or the Linux mt command, described in the section "Using mt to Control a Tape Drive." One of the prime advantages of hardware compression, though, relates to Linux backup software. Some Linux backup programs, such as tar with its gzip compression, use compression algorithms that render all the data after an error unreadable. This flaw makes using software compression a risky prospect. If you decide to buy a drive that relies upon software compression, you should definitely look into more sophisticated backup programs than tar, or use it without compression, in order to avoid these problems.

Estimating Your Space Requirements

Whether or not you use compression, it's important to know how large a tape drive you need to get. As a general rule, it's best to buy a tape drive with enough capacity to hold all your data on a single tape (or a single set of tapes, in the case of a changer). If you're backing up a single desktop computer, finding your capacity requirements is relatively straightforward; you can use the Linux df command to find how much space your files consume. For instance

Filesystem /dev/sda6 /dev/sda8 /dev/sda5 /dev/sda3

The Used column indicates the space consumed by files (in bytes) on each partition. In the preceding example, the system's files consume 4.3GB. What's more, the total capacity of the computer's disk is 8.1GB, so files could conceivably expand to fill that much space.

In theory, a 2GB uncompressed capacity drive might be able to back up the entire hard disk. I recommend, however, buying a drive with enough capacity to handle your entire hard disk's filled capacity, preferably without compression. The reason is simple—expansion. As you install more software and generate new data files, your needs for backup capacity will expand. A tape drive that's barely adequate today will become inadequate tomorrow. Upgrading to a higher-capacity tape format can be expensive, because either the drives or the tapes will cost a fair amount of money. If you buy a drive with capacity to spare, you won't need to upgrade it or resort to multi-tape backups for some time to come. In practice, therefore, to back up the preceding hard drive, I would recommend a drive with an 8-10GB uncompressed capacity. That drive will be adequate for the present and probably for at least another year or two.

1k-blocks

Used

Available

Use%

Mounted on

2679650

1449936

1118867

56%

/

676435

202258

439238

32%

/usr/local

5135482

2879989

2255493

56%

/home

31077

11530

18906

38%

If your system dual boots between Linux and one or more other OSs, you can modify this rule to one of purchasing a drive that's adequate to back up any one OS. For instance, if 5GB were

Part II

devoted to Linux and 3GB to Windows, then a 5GB uncompressed tape backup might be adequate. The reason is that it's generally not too inconvenient to back up two OSs separately; in fact, it can be necessary in order to preserve important filesystem information.

In a pinch, you can also back up separate Linux partitions independently or in two or more groups. For example, given a 3GB tape unit, you might back up the preceding system in two chunks: one for /home and one for /, /usr/local, and /boot. Independently backing up partitions can sometimes be convenient because it keeps data separated in a way that might be handy in case of an emergency restore. For example, if the /home partition were damaged, you could restore it without having to read through other partitions' data. This procedure increases the work involved in backing up, however, which can be inconvenient. This inconvenience is particularly irksome if you want to run unattended backups—for instance, scheduling a backup to run at night.

If necessary, a backup can be split arbitrarily across multiple tapes. Most backup programs support this feature. Unless you use a changer, though, you'll need to be present to swap tapes when you do this.

If you're buying a tape backup to serve as a backup device for an entire network of computers, you must estimate the space requirements for the entire network, and consider tape speed and backup scheduling requirements. For example, you might not be able to perform a backup of your entire network in a single day because of network bandwidth limitations. If so, using multiple smaller tapes makes sense; you can then back up a few machines each night over the course of a week, as opposed to backing up everything one time each week.

Whether you back up a single computer or a network, you might also want to factor your backup strategy into the equation. So far, I've emphasized the need to back up an entire computer. This is known as a full backup, and it's the most important type of backup when it comes to true disaster recovery. It's often desirable, however, to mix full backups with smaller incremental backups, in which only files that are new or that have changed are backed up. For example, you might perform a full backup once a month and incremental backups once a week. If you rely heavily upon incremental backups, you can reduce the need for high capacity, because the full backup doesn't occupy most of your backup time. You might find it acceptable to swap tapes for a three-tape full backup once a month, for example, but to perform unattended incremental backups once a week, or even once a day. The flip side is that incremental backups can make recovery from a complete disaster more complex, because you need to restore the full backup and then one or more incremental backups. If you regularly create and delete large files, you might need to delete these files after each restore operation, or you'll run out of disk space when doing the incremental restores.

Chapter 8

Was this article helpful?

0 0
The Ultimate Computer Repair Guide

The Ultimate Computer Repair Guide

Read how to maintain and repair any desktop and laptop computer. This Ebook has articles with photos and videos that show detailed step by step pc repair and maintenance procedures. There are many links to online videos that explain how you can build, maintain, speed up, clean, and repair your computer yourself. Put the money that you were going to pay the PC Tech in your own pocket.

Get My Free Ebook


Post a comment