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 filesystems 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 the DMF home directory you specified in the DMF configuration file). The information is used in all subsequent invocations of the command.
This chapter discusses the following:
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.
After you have entered the directory name, dmaudit asks for the list of filesystems it should search when looking for migrated files. It presents the following menu:
Enter view to display the list of filesystems that are currently mounted and that support data migration. (To support data migration, a filesystem must be mounted with the dmi option on IRIX systems and with the dmapi and mtpt = mountpoint options on Linux systems. For information about mounting filesystems, see the DMF Administrator's Guide for SGI InfiniteStorage).
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 filesystems 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 filesystems.
Normally you should choose the accept selection to run with all dmi-mounted filesystems included in the audit. This is the proper method to use when you are unsure which filesystems contain migrated files. dmaudit saves the path name, device name, and filesystem type of each filesystem in the list in its checkpoint file and uses this list in all future snapshots.
You might want to remove some of the filesystems from the list if you know they will never contain migrated files because of the following reasons:
Filesystems take time to scan. If you can remove filesystems from the list, you will reduce dmaudit execution time.
Some filesystems change frequently. dmaudit expects to find each filesystem 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 filesystem has changed. You may want to remove filesystems that are not always mounted.
The important thing is to make sure that any filesystem that might contain migrated files is in the list. dmaudit does not allow you to add filesystems to the list that are not currently dmi-mounted, so if any such filesystems 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 filesystems shown in the previous screen starting with /usr because you know that they are large filesystems 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 filesystem is only used as a place to mount temporary filesystems, and that /tmp is only used for temporary files that are not migrated. Assume the root filesystem should be removed from the list. (Sites that frequently switch root filesystems when building new systems may want to remove the root filesystem from their list.)
If you want to exclude these filesystems, 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 filesystems 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 filesystems 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 filesystem 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 filesystems no longer appear in the list.
Once you are satisfied with your filesystem 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).