Chapter 5. Setting the Initial Configuration

The first time that you run dmaudit you must configure it; this step must be done interactively. This consists of giving dmaudit a list of all the file systems that might contain migrated files, and specifying the location of a working directory where dmaudit can keep snapshot data for indefinite periods of time. dmaudit saves the configuration information that you enter in a file named HOME_DIR/dmaudit_dir/checkpoint (HOME_DIR is DMF home directory you specified in the DMF configuration file). The information is used in all subsequent invocations of the command.

Providing a Working Directory

To configure dmaudit, you must first either log in as root or use the su(1) command to become the super user. To execute the command interactively, enter the following:

dmaudit

The following display appears the first time that you invoke dmaudit:

This program must create a working directory named 'working_dir' to hold several very
large work files. The files may be needed in subsequent executions of this program,
so the directory should be placed in a file system that is not cleared frequently.

Please enter the full path name of an existing directory in which subdirectory
'working_dir' can be created (<CR> to quit):

Enter the name of a directory, such as /tmp. If the directory you specified does not exist or is otherwise invalid, dmaudit describes the nature of the problem and prompts for a new path name.

If you decide not to continue, you can exit the program at this time by pressing ENTER.

Specifying File Systems to Scan

After you have entered the directory name, dmaudit asks for the list of file systems it should search when looking for migrated files. It presents the following menu:

You must select the file systems to be scanned when this program searches for
  migrated files. By default the list contains all file systems
  currently mounted.

  IF THERE ARE ANY FILE SYSTEMS CONTAINING MIGRATED FILES THAT DO NOT APPEAR IN THIS
  LIST, EXIT THIS PROGRAM AND MOUNT THEM BEFORE CONTINUING!!!

  Failure to do so could mean the loss of the data in those files, because this
  program sometimes removes database entries if it cannot find matching migrated
  files for them. File systems that you are sure do not contain migrated files
  may be removed from this list to speed execution. Remember that using restore
  to load files dumped from a DMF-configured file system can result in migrated
  files in other file systems. If there is any question whether a file system
  contains migrated files, leave it in the list.

  Select:
     <view>     View the current file system scan list
     <edit>     Edit a fresh copy of the file system scan list
     <accept>   Accept the current file system scan list
     <quit>     Quit

  Please enter your selection:

Enter view to display the list of file systems that are currently mounted and that support data migration. (To support data migration, a file system must be mounted with the dmi option; see the DMF Administrator's Guide for IRIX for information about mounting file systems).

When the list has been shown, dmaudit automatically redisplays the File System Selection menu. You should see something like the following:

/                               /core
/admin                          /mnt_tmp
/cloudy/ccn                     /tmp
/cloudy/mktg                    /usr
/cloudy/sdiv/comp               /usr/adm
/cloudy/sdiv/lib                /usr/dm
/cloudy/sdiv/net                /usr/spool
/cloudy/sdiv/qte                /usr/src
/cloudy/sdiv/xfiles             /usr/tmp


Select:
   <view>     View the current file system scan list
   <edit>     Edit a fresh copy of the file system scan list
   <accept>   Accept the current file system scan list
   <quit>     Quit

Please enter your selection:

If you have many file systems mounted, they may not all fit on the screen at the same time, in which case the last line on the screen instead looks like the following:

Enter <CR> to continue:

If that is the case, then when you are done examining the current screen, press ENTER to view the remainder of your file systems.

Normally you should choose the accept selection to run with all dmi-mounted file systems included in the audit. This is the proper method to use when you are unsure which file systems contain migrated files. dmaudit saves the path name, device name, and file system type of each file system in the list in its checkpoint file and uses this list in all future snapshots.

You might want to remove some of the file systems from the list if you know they will never contain migrated files because of the following reasons:

  • File systems take time to scan. If you can remove file systems from the list, you will reduce dmaudit execution time.

  • Some file systems change frequently. dmaudit expects to find each file system in the list mounted in the same location every time it is run, and does not allow you to take a snapshot or fix discrepancies if any file system has changed. You may want to remove file systems that are not always mounted.

The important thing is to make sure that any file system that might contain migrated files is in the list. dmaudit does not allow you to add file systems to the list that are not currently dmi-mounted, so if any such file systems do not appear in the list, enter quit to exit the program and mount them before continuing.

To continue the example, assume that you do not want to scan any of the file systems shown in the previous screen starting with /usr because you know that they are large file systems and that no migrated files will ever reside in them. In addition, assume that no files will ever be migrated in /, that the /mnt_tmp file system is only used as a place to mount temporary file systems, and that /tmp is only used for temporary files that are not migrated. Assume the root file system should be removed from the list. (Sites that frequently switch root file systems when building new systems may want to remove the root file system from their list.)

If you want to exclude these file systems, enter edit. This puts your screen under control of the editor defined in the VISUAL or EDITOR environment variable, ( VISUAL takes precedence); if both are undefined, it uses vi(1). You are shown a list of file systems in alphabetical order, one per line.

For the previous example, you would see the following:

/
/admin
/cloudy/ccn
/cloudy/mktg
/cloudy/sdiv/comp
/cloudy/sdiv/lib
/cloudy/sdiv/net
/cloudy/sdiv/qte
/cloudy/sdiv/xfiles
/core
/mnt_tmp
/tmp
/usr
/usr/adm
/usr/dm
/usr/spool
/usr/src
/usr/tmp
~
~

Using the editor, remove the lines associated with file systems that you do not want to include in the audit. Next, save your changes and exit the editor.

After you exit the editor, dmaudit reports any errors that it found in your input and then redisplays the file system selection menu. If errors are detected, dmaudit discards your entire edit session, and you must select edit again and reenter all your changes.

It is a good idea to select the view option one last time to verify that dmaudit accepted your selections.

In the current example, you would see the following:

/admin                          /cloudy/sdiv/net
/cloudy/ccn                     /cloudy/sdiv/qte
/cloudy/mktg                    /cloudy/sdiv/xfiles
/cloudy/sdiv/comp               /core
/cloudy/sdiv/lib


Select:
   <view>     View the current file system scan list
   <edit>     Edit a fresh copy of the file system scan list
   <accept>   Accept the current file system scan list
   <quit>     Quit

Please enter your selection:

The unwanted file systems no longer appear in the list.

Once you are satisfied with your file system selections, enter accept to continue. dmaudit responds with the following menu:

MAIN MENU
---------

Select:
   <snapshot>   Take a snapshot and report status of file systems and databases
   <config>     Examine or modify configuration information
   <quit>       Quit

Please enter your selection:

Configuration of dmaudit is now complete. At this point you may quit, enter config to examine certain other optional configuration parameters, (see Chapter 8, “Changing the Configuration”), or enter snapshot to initiate a snapshot (as described in “The snapshot Option” in Chapter 6).