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 the following:

The dmaudit command saves the configuration information that you enter in the following file, where HOME_DIR is the DMF home directory you specified in the DMF configuration file:

HOME_DIR/dmaudit_dir/checkpoint

The information is used in all subsequent invocations of the command.

This chapter discusses the following:

Providing a Working Directory

To configure dmaudit, you must first either log in as root or use the su 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 pathname.

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

Specifying Filesystems to Scan

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:

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 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 filesystem 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 pathname, 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 the following:

  • 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

  • No files will ever be migrated in /

  • The /mnt_tmp filesystem is only used as a place to mount temporary filesystems

  • The /tmp filesystem is only used for temporary files that are not migrated

  • 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. 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).