Skip to content. | Skip to navigation

Personal tools
You are here: Home Telescopes Magellan Operations homepage Computers Linux DVD Instructions How to Write a DAT Tape

How to Write a DAT Tape

How to Write a DAT Tape on Linux PCs at LCO (Not favored)

Mark Phillips
September 2003


DAT drives are available on the Linux PCs at the Magellan telescopes: Llama and Burro in the Baade Telescope control room, and Guanaco and Zorro in the Clay control room. Basic storage capacity, which depends on the type of tape you have, is given below. Note that the DAT drives available on Llama, Burro, Guanaco, and Zorro support all of the formats from DDS to DDS4.

 

Type tape length Capacity
DDS 60m 1.2 GBytes
DDS 90m 2 GBytes
DDS2 120m 4 GBytes
DDS3 125m 12 GBytes
DDS4 150m 20 GBytes

 

To write a tape, put a DAT data tape in the DAT drive and run the following commands in an xterm window.

 

cd /d1/obsmag1a/night1 (or wherever your data happen to be)
mt -f /dev/nst0 rewind set the tape at the beginning
tar -cvf /dev/nst0 *.fits & write fits data to tar archive file 1 in the background
mt -f dev/nst0 rewind reset the tape at the beginning
tar -tvf /dev/nst0 check that data are on the tape by listing tarfile contents to screen
mt -f /dev/nst0 rewoff to rewind tape and eject it
rm *.fits to delete data if you want to or need disk space

 

Now suppose you want to append data from night 2 to the same tape. This procedure requires caution because it is very easy to erase your data if you make a mistake!

 

cd /d1/obsmag1a/night2 (or wherever your data happen to be)
mt -f /dev/nst0 rewind set the tape at the beginning
mt -f /dev/nst0 fsf 1 fsf = `forward skip files'
tar -cvf /dev/nst0 *.fits & write the fits data to tar archive file 2 in the background
mt -f dev/nst0 rewind reset the tape at the beginning
mt -f /dev/nst0 fsf 1 forward skip to tar archive file 2
tar -tvf /dev/nst0 check that data are on the tape by listing tarfile contents to screen
mt -f /dev/nst0 rewoff to rewind tape and eject it
rm *.fits to delete data if you want to or need disk space


Notes:

     

  1. Use `mt -f /dev/nst0 fsf n' to skip over `n' tar archives.

     

  2. The `n' in the device name `nst0' tells the tape drive not to rewind at the end of the command. Note that the commands `rewind' and `rewoff' will override the `n'.

     

  3. The above sequence of instructions can be written in a file (we will call this file a "script"), which can be executed in order to proceed with the instructions. This file contains one command per line (for example: tar cvf /dev/nst0 *.fits). To run your script (named, for example, "save.csh"), you simply type in the xterm window (be sure to be in the correct directory): csh save.csh &. The & symbol put the procedure in batch mode. This allow to you to run the script, save all the tars as necessary, while you are eating or sleeping or whatever.
Document Actions