CFHT archive manual - tapes and tape devices 

Tapes and Tape Devices

  • CFHT Tape Devices
  • UNIX Tape Devices
  • Tape Handling Guidelines
  • Compression and Density
  • Reading and Writing Tapes


  • Types of CFHT Tape Devices

    Type
    Native Capacity
    Compressed Capacity
    Where
    Transfer Rate
    dds2 dat
    4gb
    8gb
    kuanalu
    0.4M/sec
    dds3 dat
    12gb
    24gb
    onohi, mahina
    2.23M/sec
    dds4 dat
    20gb
    40gb
    druid, umi
    5.5M/sec
    exabyte
    5gb
    10gb
    onohi, mahina, hoku, kuanalu
    0.5M/sec
    exabyte-mammoth
    12gb
    40gb
    kuanalu
    3.0M/sec
    dlt 7000
    35gb
    70gb
    hoku, onohi, mahina, manao, kou, kapu, druid
    5.0M/sec
    sdlt
    160gb
    320gb
    manao
    10.0M/sec

    DDS or DAT tapes are 4mm cartridges. The media is very compact and relatively inexpensive. Because of the compact size of the tape, DAT tapes are more susceptible to breakage and short shelf life than other form factors. They are primarily used for applications where space is an issue like personal backups or collections of data where a lot of tapes are to be kept in an accessible and convenient location.

    Exabyte tapes are all 8mm cartridges. The media is bigger than a DAT but still relatively compact. It is more reliable and slightly more expensive. Almost all tape drives in this format are manufactured by Exabyte Corp. and so compatibility is usually good though using older type tapes in newer drives can cause problems. For example using a 5gb (black) exabyte tape in a "mammoth" drive that uses 20gb (tan) tapes renders the drive inoperable until it is cleaned.

    DLT tapes are square shaped and use 1/2 inch media. The popular DLT formats are currently 4000 7000 8000 and UltraDLT. All DLT drives are manufactured by Quantum Corp. and interoperability is excellent. All DLT drives with the possible exception of the UltraDLT can write tapes in the format of the DLT drives which came before them, which is very helpful when you are moving data from one site to another. Unlike cassettes which have two reels with tape wound around them, DLT cartridges have only a single reel and the tape is spooled onto a permanent reel within the tape drive. The tape leader which the drive grabs onto to spool a tape is inherently fragile and is prone to breaking or getting itself wound all the way into the cartridge and becoming inaccessible to the drive. A DLT drive that attempts to load a tape that has lost it's leader usually "swallows it's leader" which means it wraps the tongue it uses to grab the tape leader around its internal spool which in turn becomes unavailable to any tapes inserted in the drive. This condition is repairable but it will require the system administrator to service the drive. To protect against this situation it is recommended that you open the door of each cartridge to verify that the tape leader is visible before inserting it into a drive. Aside from this quirk, the reliability of the DLT format and its dedication to backward compatibility have made it the standard for site backups and archives almost everywhere.


    UNIX Tape Devices

    When you write or read a tape on a UNIX system you use a device file to address it; there are usually several device files for each tape drive and each one causes the drive to behave in a different manner. The first function of the device file is to identify the tape drive with a numeric value. For example /dev/rmt/0 is the first tape drive and /dev/rmt/1 is the second on a solaris host while linux hosts use device name like /dev/st0 and /dev/st1. There are usually a few variations of the default device file as well that you can use to get the drive to behave in specific ways like using compression, non rewinding, writing at different densities, etc. For example, the default device rewinds the tape after every operation so if you want to position the tape somewhere in the middle and begin reading or writing you will need to use a device file that doesn't rewind the tape as soon as you fast forward it to the place you want, like /dev/rmt/0n or /dev/st0n, where the "n" means "non rewinding". A summary of common tape device modifiers follow:

    n
    non rewinding
    c
    compressed
    h
    high density
    m
    medium density
    l
    low density (or uncompressed)
    u
    ultra density

    Note that not all of these options are available for all types of tape drive and that they don't always mean the same thing for all tape drives. In many cases for example, the drive may only be able to write at less than four densities or compression may be on or off by default for the unmodified device file. For more info on tape compression below. Normally the default device and and non-rewinding device are the only tape device files you will need.

    In a UNIX environment it is usually simple to use a tape drive on a remote host using gnu tar (which is called explicitly by using 'gtar' rather than just 'tar') and the following syntax:

    hosts:device file

    For example, to write a tar archive on the DLT on makani while logged into mahina you could use:

    [obs1@mahina:~/] gtar -cvf makani:/dev/rmt/2 filename


    Tape Handling Guidelines

    First read the section on DLT cartridges above. Then use common sense. Data tapes are fragile and you normally can't afford to loose a few bits here and there like you can with the audio cassettes you toss (or used to toss) around your car. Keep them in the plastic cases that they come in and don't leave them in the sun. They are made out of plastic so you might think that moisture isn't going to be problem but it most certainly will. Don't pass them through the X-ray machines at airports even though they say they won't be hurt. This is particularly important if you are traveling internationally, as non-US X-ray machines are often miscalibrated and exposure is cumulative; one pass may not ruin them but several might.

    Above all don't expect a data tape to last forever. Excellent climate control and handling can extend the life of a tape for many years but they all have a shelf life and will break down eventually. Tape drives become obsolete as quickly as the hard drives that they back up to, so if your data is really important consider reading it off of tape and rewriting to to a new and perhaps more modern tape every few years.


    Compression and Density

    Pretty much all modern tape drive utilize some sort or hardware data compression and the amount of compression that a drive can achieve is pretty much the same for all types of tape drives, but not all tape formats employ compression in the same way.

    The amount of compression that a tape drive can achieve depends on the type of data that is being compressed. On one end, data that has a lot of "holes" like text or raw images can compress very nicely, up to and even over 50%. On the other end data that has already been compressed with software like jpeg images or gzipped files can't be compressed much, if at all. Therefore most tape manufacturers advertise a "native" capacity and an optimistic "compressed" capacity and you can be assume that your results will be somewhere between the two. This can be problematic if you are counting on getting something on a predictable number of tapes so it's sometimes wise to simply count on only the native capacity.

    FITS files will generally compress by between 20-30%.

    Some tape formats use compression by default while others do not. Generally 4mm and 8mm tape drives use compression unless you tell them not to so /dev/rmt/0 is the same as /dev/rmt/0c and is the same as /dev/rmt/0u for that matter if you are using a DAT or exabyte. DLT however does not use compression by default and you would need to specify it on the front of the drive or by using the "c" device file if you wanted it. One reason for this is that the hardware that performs the compression has a certain throughput and in the case of the smaller tapes data could be compressed faster than it could be written to tape and so using it actually speeds up the total throughput of the device, whereas DLT for example has a very high native throughput, faster than the compression hardware (or at least faster than the hardware as it once existed) and using compression slowed down tape operations by nearly half in the case of the dlt7000.

    Some tape drives can write or read at more than one density. This is usually for backwards compatibility. On a DDS3 DAT drive for example, you can usually write a tape that can be read by a DDS2 drive using the "m" device.


    Reading and Writing Tapes

    There are a number of UNIX utilities for writing and reading tapes. Usually you must read a tape with the same utility that it was written with. Perhaps the most popular and useful tape utility is "tar" and its variants, like "gtar" and "star" which are all more or less compatible with each other.


    Kanoa

    Last modified: Wed Oct 10 10:31:21 HST 2001