Chapter 3. How dmaudit Detects Errors

The dmaudit command collects and analyzes information from the filesystems and the daemon database, and stores that information in a directory known as the working directory. This process is known as taking a snapshot and is normally done in batch mode. dmaudit takes a snapshot by performing the following actions:

  1. Scans filesystems for migrated files. Each filesystem that might contain migrated files is searched for files that contain a BFID. Information about the state of each of these files is saved in the working directory. At the same time, dmaudit instructs the daemon to maintain a log of all changes that occur to migrated files while the search is in progress.

  2. Copies the daemon database to the working directory. When the filesystem scans are complete, dmaudit asks the daemon to place a copy of the daemon database into the working directory together with the log of changes that occurred during the filesystem scan.

  3. Brings the filesystem information up-to-date. The data collected during the filesystem scan is updated using the migrated file change log supplied by the daemon. When completed, this makes the filesystem information appear as if it were collected at the same instant that the daemon database copy was made. The filesystem and database data files are now synchronized with each other.

  4. Sorts and merges the filesystem and database information. The filesystem information and database entries are each sorted into BFID order and are then merged together into a large file stored in the working directory.

  5. Analyzes each BFID set for errors. All data available for each BFID set in the composite file is examined for inconsistencies. dmaudit compares the state in the user file's inode against any daemon database entries and flags any inconsistencies. It also computes and saves information on how to correct each error.

  6. Issues a report. The report gives a brief summary of the kinds of errors encountered.

dmaudit retains in its working directory all snapshot information for each run. After the report has been issued, you have the option of using dmaudit interactively to examine each BFID set that contains errors.