| Exabytes and CD-ROMS |
Each computing environment at the ATCA handles exabytes and cdroms somewhat differently. Apart from the obvious differences between the VMS and UNIX machines, the three flavours of UNIX (Digital UNIX, SunOS 5.x and SunOS 4.x) differ in the details.
ATCA data is archived in
RPFITS files on cdroms or exabyte tapes. The format for the latter is an
ANSI tape, which is structured with a header, the data, and a trailer for
each RPFITS file written on it. A useful utility to access these tapes
is ansitape (see also
ansiread below). This can be used to get directory
listings of the tape as well as to read the contents onto disk, and even
to write an ANSI tape if desired. Note that if you read the data to disk
with this type of utility, you must still read the file into some package
such as Miriad or AIPS with their filler programs (called
atlod) for further
work.
| Usage |
There are a number of devices available on a variety of computers:
| General CD writer |
The off-line machine used
to write CDs is aine. There is a
separate
document describing using the cdrom writer.
| Mounting and Reading CD-ROMs on the UNIX machines |
Although the details of mounting and unmounting differ, once mounted a cdrom appears as a normal file system to the user (although it is read-only). Cdroms are infinitely more convenient to deal with than exabytes - their use is strongly encouraged.
Here we summarise how to mount and unmount a cdrom:
% cdmount xwhere x is 0 or 1. The mounted cdrom appears at /cdrom0, /cdrom1 or /cdrom2. To unmount, use
% cdumount xwhere again x is 0 or 1.
% eject cdrom
% cdswapThe mounted cdrom appears as /cdrom/xxxx, where again xxxx is the volume name of the cdrom. Note that the operating system will not allow you to unmount a cdrom while your current directory is still within the cdrom file system.
Because cdrom files are read-only,
data copied from cdroms will also usually be read-only. You can change
this with the
chmod command.
| The Exabyte Device on leon |
Leon's exabyte drive is located in the rack on the left as you enter the Computer Room (immediately above leon itself). VMS read and write ANSI tapes by default. You can mount an initialised tape with
$ allocate mka600: $ mount/override=ident mka600:The tape can then be used with the normal VMS COPY and DIRECTORY commands. For example:
$ copy mka600:96-07-29_0213.C537 []To initialise a brand-new exabyte (i.e. do not initialise an exabyte with data on it - the data will be lost), use
$ initialize mka600: xxxxwhere xxxx is a volume name.
| Exabyte Devices on the UNIX machines |
There is no software mounting
of tape devices in Unix so you access the drive directly. The form of the
device names differs between the UNIX flavours. There are two tape interfaces
of interest here - the so-called `non-rewinding raw' and `raw' interfaces.
Different programs require different interfaces. The following table summarises
the devices available at the ATCA.
| Machine | Raw Interface | Non-Rewinding Raw Interface |
| kaputar | /dev/rmt1a | /dev/nrmt1a |
| vladimir | /dev/rst0 | /dev/nrst0 |
Other variations on these names are possible. See the man page on mtio for more information (although this is at best cryptic).
Kaputar has two exabyte drives,
which are in the observers area near the printers. Each is labelled with
its ``non-rewinding raw'' name. Vladimir's drive is adjacent to the workstation,
it can handle 2 and 5GB exabytes. See the documentation on Exporting
ATCA data to find out how to get your data onto the Vladimir exabyte.
| Reading and Writing Exabytes on the UNIX machines |
There are basically two sorts of tape format that are used in the UNIX world - tar and ANSI format. Tar is the usual format for exchange between different UNIX environments. However, ANSI tapes are also sometimes used. In particular, exabytes written by the ATCA archiving software are in ANSI format. Utilities to read and write exabytes are as follows:
ansitape's command line
inputs are somewhat unusual. For example, the following command gives a
directory listing of the tape on Vladimir:
% ansitape t mt=/dev/rst0Filenames on ANSI tapes are case-insensitive -- ansitape treats them as if they are lower case, so, e.g., to extract all the files on the Kaputar tape whose names end with .C234, use the following command
% ansitape xv mt=/dev/rmt1a \*.c234
Note that we need to 'escape' the "*", to keep the unix shell from interpreting it before ansitape gets to it. See ansitape's man page for more detailed information.
% ansiread -f /dev/nrmt1a
-s 2 -r 4
skips 2 files (note that ansitape does not have this file skipping ability) and then extracts 4 files to disk. Their names will be constructed from the ANSI headers. See its man page for more information.
Note that the tar format
written by kaputar cannot be read by SunOS 4.x versions of tar.
For safety's sake, it is suggested that gtar be used on kaputar.
tar can recursively copy full directory trees and it is quite fast. One thing to be avoided is writing files with absolute paths. If you do this, that full path must exists when you extract files from the archive somewhere else. Always try and use relative paths. For example, to archive all the files in the home directory of user pwild onto an Exabyte tape we would issue the commands
% cd ~pwild
% tar -cvf /dev/nrmt1a
.
which instructs tar to act verbosely (switch v) whilst it creates (switch c) an archive on the device /dev/nrmt1a (switch f), acting recursively (default) from the current working directory (the .). DO NOT use a command with an absolute path such as
% tar -cvf /dev/nrmt1a /narusers/pwild
To extract files from a tar archive, the inverse operation is
% tar -xvf /dev/nrmt1a
where the x means extract. This will create any subdirectories as needed below the working directory.
You can list the files on the archive with the command
% tar -tvf /dev/nrmt1a
You can select a subset of the files on the archive by naming the files; you must name them with the full relative path that the above listing command gives. For example, let us say that the above example which lists the files in the archive gives the following output as part of its listing:
rw-r--r--503/100 29812 Aug 17 19:24 1959 ./ideas/jsquared.txt rw-rw-r--503/100 7088 Jan 22 18:52 1961 ./ideas/heliograph.txt rw-------503/100 7196 Feb 12 18:52 1982 ./ideas/closeit.txtThis indicates that there is a subdirectory called ideas beneath the directory from which we made the archive (we were in the pwild home directory, and accessed it by calling it . when invoking tar). In this directory are three files. If we want to extract the one called heliograph.txt then we would issue the command
% tar -xvf /dev/nrmt1a ./ideas/heliograph.txt
which would create the ideas subdirectory below our current working directory, and then fill it with the desired file.
Finally, tar archives are a convenient way to move files around if you have a lot of directories. The archive may be a disk file rather than a tape record. For example, the following commands create a compressed tar archive of a home directory tree ready for transport (perhaps by ftp) to another computer for reinstallation. We write the archive in some other directory of course to avoid recursive loops.
% cd ~pwild
% tar -cvf /DATA/HYDRUS_1/other/pwild/home.tar
.
% cd /DATA/HYDRUS_1/miriad/pwild
% compress home.tar
which would leave behind a file called home.tar.Z ready to be expanded with uncompress somewhere else.
For more information, see the man page on tar, or use
% gtar --help
for a summary of gtar options.
The non-rewinding raw device interface should be used with tar programs.
% mt -f /dev/nrmt1a
eom
% mt -f /dev/nrmt1a
fsf 6
% mt -f /dev/nrmt1a
bsf 2
% mt -f /dev/nrmt1a
rewind
% mt -f /dev/nrmt1a
offline
% mt -f /dev/nrmt1a
status
to wind the the tape to the end of the recorded media so that you can append some files, to skip forwards over 6 EOF marks, to skip backwards over 2 EOF marks, to rewind the tape, to rewind and eject the tape, and to get the tape unit to tell you where it thinks it is, respectively. See man mt for more details.
% dd if=/dev/nrmt1a
of=junk.fits ibs=2880
Note that you have to tell it the block size of the input record. This utility is very basic, and probably you won't need it. See man dd for more details.