The Archiver Tool

While the ISS is running, data disks are mounted and unmounted through the Archiver program. Like the ingest scheduler (The Ingest Scheduler), the Archiver runs in the background regardless of whether a user is logged in or a window display is running. Once the iss user has logged in and a window display has started, the Archiver will open its own window through which it can be controlled and monitored.

Operating the Archiver

Figure 2-1. The Archiver Window

Figure 2-1 shows the Archiver window as it looks when waiting to mount a disk in the Jaz drive. Ordinarily the Archiver will have already mounted a Jaz disk and be in sleep mode. Table 2-1 lists most of the status messages of the Archiver and hints on actions to take for each status.

Table 2-1. Archiver Status Messages

MessageAction
Awaiting Jaz diskPut a Jaz data disk in the Jaz drive, then press the button Mount Jaz disk.
Scanning platformsArchiver is checking for files which have not been archived yet in preparation for writing the files to the Jaz disk.
Writing... Archiver is writing files to the Jaz disk.
Sleeping Archiver is in the midst of a two-hour wait. Every two hours it wakes up to write more files to the Jaz disk. Naturally this message will be seen the most often.
Bad file open on diskThe Jaz drive may not have a disk in it, or the disk may be bad. Check that there is Jaz disk in the drive.
Device write error!A system error occurred trying to open or write to the Jaz disk. Make sure there is a Jaz disk in the drive.

The Archiver reports problems and any conditions under which it cannot archive data in its status window as red messages. The problem may be that the Archiver could not mount a disk in the Jaz drive, either because there is no disk or the disk does not have the correct formatting for the system to mount it. In particular, the filesystem on the disk may have been left in an inconsistent state after a power failure, and the system was not able to fix the filesystem automatically. If no Jaz disks can be mounted, even freshly created data disks (or if data disks cannot be created because of Jaz drive errors), then try rebooting the system. If rebooting does not fix the problem, seek more help. Note that the disk in the Jaz drive must be a distribution disk or a data disk created by the jaz_install script or jaz command. Otherwise the Archiver will not be able to find the correct directory into which it needs to write its archive files. Jaz disks formatted on a PC with Windows or DOS will not work either, though they can still be converted into a data or distribution disk in the usual way.

The Archiver can be tested at any time by pressing the Write Now button, which is only enabled once a data disk has been successfully mounted. Pressing this button wakes up the Archiver just as if its two-hour sleep period had ended, causing the Archiver to attempt to write any new data files. As long as there are new data files, the Archiver will try to write them to the Jaz disk. This does not interfere with the normal operation of Archiver; it will wake up again in another two hours. Hence this can be a handy method of verifying that writes to the Jaz drive will succeed.

It is important to know how the Write Now button differs from Finish button. The Write Now button starts the periodic archive process, which does not archive the most recent data file of each platform, in case new data are still being appended to that file. However, the Finish button writes all data files to the Jaz disk and then exits the Archiver. This button is only meant for situations like the end of a project, where no more data are needed or no more are being recorded, so the Archiver is no longer needed. If the Finish button is pressed accidentally, the Archiver can be restarted by logging out and logging back in as iss.

If ever necesary, the Archiver can be started through the script /iss/etc/init.d/ as user iss:

iss1>  /iss/etc/init.d/archive start

The above command only starts the Archiver in the background; the Archiver will automatically try to mount the disk in the Jaz drive as a data disk and begin archiving. The following command tells any currently running Archiver to open a window on the desktop display.

iss1>  /iss/etc/init.d/archive show

Checking the Archiver

The archiver runs continuously in the ISS. Most of the time it sleeps. Periodically it wakes up, determines what new data have been added to the data store, and writes these data to the removable disk. The archiver keeps track of the total number of bytes and files written to the archive and displays these statistics in its window. Naturally, over time both of these values should be increasing.

If the Archiver is running, it should appear in the output of the mstatus command. See Example mstatus Output for a full example of mstatus output.

 Process  'Archiver-361' on 8 (p 361), send 24/697, rec 11/216, nd 0

You can also verify archiving by examining the directories on the removable Jaz disk. First, change to the directory which contains the data store archive files. The directory name includes the facility or site name, shown here as sitename:

51 iss2:/iss/home/iss> cd /jaz/dsArchive/sitename

Then list the files in this directory to verify that the archiver is writing properly. After the ISS has been operating for a while there will be a large number of files here, since they should be created every two hours, so use the tail command to limit the output from ls to only the most recent archive files:

52 iss2:/jaz/dsArchive/iss2> ls -l | tail -30

The file listing should list regularly occurring files, with reasonably consistent, non-zero lengths. Some files will be longer than others, corresponding to time periods which have more data, such as periods when there are CLASS soundings. Verify that the latest files have been written recently by checking the data times encoded into the file names.

It is also possible to examine the actual data files saved within the archive files. Choose a file to examine, then extract the archive file's table of contents with the tar command:

53 iss2:/jaz/dsArchive/iss2> tar -tvf filename

This will list all of the data store files contained within filename. Be sure to change out of the /jaz directory tree when finished working there; otherwise future attempts to unmount the Jaz disk will fail. A simple cd command returns to the iss user's home directory.

54 iss2:/jaz/dsArchive/iss2> cd
55 iss2:/iss/home/iss> 

More Archiver Information

More information about the Zebra Archiver program can be found in the Guide to Realtime Zebra manual.