Skip to main content
Center for Biomolecular NMR Spectroscopy
HomeUser GuidelinesSpectrometersSchedulingFeesUNIX Software InformationEducation and USER BASELinksContact Us
Tape Device Operation:

Bar Break


There are two tape drives available on the system. One, the DAT, with a capacity of 6 Gigabytes, is mounted on instinct. The other, the DLT, with a capacity of 20-40 Gigabytes, is mounted on inept.

Inserting the tape:

DAT: For the DAT, one can use either 60, 90, or 120-meter tapes. The tapes are inserted into the drive with the label on top and the arrow pointing forward into the drive. When inserted into the drive, the tape is automatically rewound, so if anything is written on the tape without fast forwarding to the last piece of data, the data at the beginning of the tape will be lost. To unload the tape, either eject it through a UNIX command or manually, by pushing the button on the right of the slot.

DLT: For the DLT tape, use "DLT tape IV." This will give the largest capacity (20 Gbytes uncompressed; 40 Gbytes compressed). For the DLT, make certain that the handle below the tape slot (with the DLT symbol on it) is up and the green light on the right panel next to "Operate Handle" is lit up. Do not attempt to move the handle on the drive if the "Operate Handle" light is not on. Load the tape just like a DAT. Once the tape is inserted, push down on the handle until it snaps. The orange light "Tape in Use" should come on and start blinking while the tape is being read in. Once the tape has initialized and the orange light has stopped blinking, press the "Density Select" button until both "Compress" and "20.0" orange lights light up. This setting gives the highest compression and allows more data to fit on the tape. To eject the tape, either type in the appropriate command or press the "Unload" button on the left panel of the drive. Either way, wait until the green "Operate the Handle" light comes on before ejecting the tape, then push the handle all the way up and pull out the tape.

Write-protecting the tapes:

DAT: For the DAT: on the front of the tape (the part that is visible when the tape is inserted) there is a square white plastic tab. If you slide the tab over to the left so that the square become black, the tape becomes write-protected. Sliding the tab back to the right enables writing again.

DLT:  For the DLT tapes, likewise, on the front of the tape, there is a panel with arrows on it. To write-protect the tape, slide the panel to the left so that the orange tab shows in the open slot. If it is slid to the right, and the opening is black, writing to the tape is enabled.

Operating the tape: UNIX commands
(identical for DAT and DLT tape drives)

The basic tape operating command is mt (stands for magnetic tape). By just typing in mt and pressing Enter, you will see a listing of all the commands available for use with the mt command.

Basic mt commands:

mt status - displays the status of the tape, i.e. ready for use, not ready, in use, etc. It is a good idea to check the status of the tape before doing anything else.

mt rewind - rewinds the tape to the beginning

mt fsf # - move or fast forward a specified number of data segments (for tar files that have been written to the tape)

mt bsf # - move back or rewind a specified number of data segments (for tar files that have been written to the tape)

mt feom - fast forward to the end of data written on the tape

mt unload or mt offline - rewind and unload the tape from the drive. DAT will eject the tape, and on the DLT "Operate Handle" light will come on.

The files are actually written onto the tape using the tar command. When files are written to the tape, the tape device is specified by /dev/tape, and each time after writing data a marker is inserted to mark the end of the data segment and the tape is rewound. As more data is written, more markers are inserted after each time data is written. To keep the tape from rewinding use /dev/nrtape instead of /dev/tape so that the new data is not written at the beginning erasing previous files.

Basic tar commands:

tar -cvf filename.tar directory -- this command compresses the given "directory" into the file filename.tar. cvf stands for "create-verbose-file" this command only creates the file on the hard drive, but does not actually write it to the tape. To write to the tape, use /dev/tape instead of filename.tar. for example,

tar -cvf /dev/tape directory -- writes the given directory to the tape, inserts a marker at the end of data, and rewinds the tape to the beginning

tar -cvf /dev/nrtape directory --does the same as above, but does not rewind the tape so that more data can be added without fast forwarding to the end of written material. Importantly, once a tar file has beed written to a tape and the drive has been positioned to be at the EOF marker, it is imperative to use /dev/nrtape for writing the second tar file (since using /dev/tape would first cause the tape to rewind before writing the new tar file) to avoid erasing older files.

tar -tvf /dev/tape -- lists the files located in the current data segment. to move to another, use mt fsf or mt bsf.

tar -xvf /dev/tape directory -- extracts all the files and/or directories from the current data segment to the specified directory on the hard drive. to move to another marker, use mt fsf or mt bsf.

Note: Often, after many commands, the tape automatically rewinds to the beginning. To avoid rewinding, use /dev/nrtape instead of /dev/tape.

Note: Since when the tape is written, the data segments are not named, it is often useful to keep a separate file listing all the data on the tape to ease keeping track.

Note: Since the backup operations can sometimes be slow, it may be useful to have the writing process in the background. To do so, add an & at the end of the command, i.e. tar -cvf /dev/nrtape directory >& tarfile.log
example: tar -cvf /dev/nrtape directory >& tarfile.log

Bar Break

Home  -  Getting Started  -  Spectrometers  -  Scheduling  -  Fees  -  UNIX Information  -  Technical Resources  -  Links  -  Contact
UTHSCSA  -  Center for Biomolecular Structure Analysis  -  Department of Biochemistry  -  Disclaimer  -  Copyright

Last updated on July 17, 2003