Chapter 5. Test the DMF System

This chapter describes how to test the DMF system:

Test that OpenVault Can Mount a Migration Volume

To test that OpenVault can mount a volume from a library for the dmf application, enter the following ov_mount(8) command:

dmfserver# ov_mount -A dmf -V VSN

For example, to test that OpenVault can mount the volume with the VSN C00BAB and then exit:

dmfserver# ov_mount -A dmf -V C00BAB
Mounted C00BAB on /var/opt/openvault/clients/handles//tEyedOqkcssi
dmfserver# exit 
exit

Repeat the steps in this section for each MAID shelf.

Validate the DMF Configuration

To verify the DMF configuration after the volumes have been created and imported into OpenVault, repeat the validation check in DMF Manager (as in step 7 of Chapter 4, “Configure DMF”) by right-clicking anywhere within the Overview panel and selecting:

Configure -> Validate Configuration

You could instead run the dmcheck(8) command on the DMF server, which provides similar functionality. There should not be any errors or warnings. For example:

dmfserver# dmcheck -h

Checking DMF installation.
  Linux dmfserver 2.6.32.45-0.3-default #1 SMP 2011-08-22 10:12:58 +0200 x86_64 x86_64 x86_64 GNU/Linux - dmfserver
  SuSE-release: SUSE Linux Enterprise Server 11 (x86_64)
  SuSE-release: VERSION = 11
  SuSE-release: PATCHLEVEL = 1
  sgi-issp-release:     SGI InfiniteStorage Software Platform, version 2.4, Build 704r10.sles11-1104042004
  sgi-foundation-release:       SGI Foundation Software 2.4, Build 704rp10.sles11-1104242013
  lsb-release: 
LSB_VERSION="core-2.0-noarch:core-3.2-noarch:core-4.0-noarch:core-2.0-x86_64:core-3.2-x86_64:core-4.0-x86_64"
  DMF version 5.5.0 rpm dmf-5.5.0-sgi250a74.sles11 installed.

Checking DMF config file
 Scanning for non-comment lines outside define/enddef pairs
 Scanning for DMF parameters without values
 Checking all objects for invalid names
 Checking base
 Checking daemon
 Checking policy space_policy
 Checking policy copan_policy
 Checking filesystem /dmi_fs
 Checking Library Server maid_ls
 Checking Drive Group dg_c00
 Checking Drive Group dg_c01
 Checking Volume Group vg_c00
 Checking Volume Group vg_c01
 Checking Migrate Group mg0
 Checking selection rules in policy space_policy.
 Checking selection rules in policy copan_policy.
 Checking Task Group daemon_tasks
 Checking Task Group dump_tasks
 Checking Task Group ls_tasks
 Checking for unreferenced objects

 Checking Task Group ls_tasks
 Checking for unreferenced objects
 Cross-checking LSs and task groups for duplicate VSNs

Checking other daemons.
 Checking OpenVault
 Checking chkconfig

No errors found.
No warnings found

If there are any errors or warnings, fix them and then rerun the validation. For more information, see the DMF 6 Administrator Guide for SGI InfiniteStorage.

Enable Audits of the DMF-Managed Filesystems

The DMF configuration file for COPAN MAID performs a nightly audit at 23:00 to check for database consistencies. To enable these audits of the DMF-managed filesystems, you must initialize the dmaudit(8) working environment. For more information about dmaudit, see DMF 5 Filesystem Audit Guide for SGI InfiniteStorage.

For example, on DMF server dmfserver (the characters ### in the right margin highlight comments related to the steps below):

dmfserver# service dmf start                                                      ### STEP  1

dmfserver# dmaudit                                                                ### STEP  2

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): /dmf/home

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: edit                                                 ### STEP  3

/dmf/move
/dmf_fs

Delete /dmf/move                                                                      ### STEP  4
/dmi_fs


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: accept                                               ### STEP 5

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: snapshot                                             ### STEP 6

DAEMON DATABASE ERROR REPORT
----------------------------

No errors were discovered comparing the file systems against the daemon
database.


DATA MIGRATION CONFIGURATION
----------------------------

Data migration home directory:          /dmf/home
Data migration binaries directory:      /usr/sbin

Server name:                            daemon
Server home directory:                  /dmf/home/daemon
Server spool directory:                 /dmf/spool/daemon

Data migration daemon process ID:        19275

No MSPs are configured

Name       Type
--------   --------
maid_ls    dmatls
vg_c00     volume group   in Library Server maid_ls
vg_c01     volume group   in Library Server maid_ls
vg_c02     volume group   in Library Server maid_ls
vg_c03     volume group   in Library Server maid_ls
vg_c04     volume group   in Library Server maid_ls
vg_c05     volume group   in Library Server maid_ls
vg_c06     volume group   in Library Server maid_ls
vg_c07     volume group   in Library Server maid_ls
mg0        migrate group  Group Members: vg_c00
mg1        migrate group  Group Members: vg_c01

LIST OF FILE SYSTEMS SCANNED
----------------------------

/dmf_fs   xfs

MAIN MENU
---------

Select:
   <inspect>    Inspect and correct file system and database errors
   <report>      Reprint status report for the current snapshot
   <verifymsp>   Check the dmatls tape library server databases against the
                 daemon databases
   <snapshot>    Take a snapshot and report status of file systems and
                 databases
   <free>        Release all file space used by the current snapshot
   <config>      Examine or modify configuration information
   <quit>        Quit

Please enter your selection: quit                                                 ### STEP 7

Comments:

  1. Start the DMF service:

    dmfserver# service dmf start

  2. Run the dmaudit(8) command to verify the filesystems:

    dmfserver# dmaudit

    In particular, set up the file system scan list and run a simple snapshot.

  3. Enter edit to edit a fresh copy of the filesystem scan list.

  4. Delete the /dmf/move filesystems, leaving just your DMF-managed filesystem (such as /dmf_fs).

  5. Enter accept.

  6. Enter snapshot .

  7. Enter quit.

Test the DMF Configuration

To test the completed DMF configuration, do the following from the DMF server:

  1. Change to a DMF-managed filesystem directory and create a test file of at least 1 MB. For example, to create the file mytestfile in the filesystem /dmi_fs:

    # cd /dmi_fs
    # /usr/lib/dmf/support/dmtwf -l 1m mytestfile

  2. Compute the checksum of the test file by using the cksum(1) command. For example:

    # cksum mytestfile
    3368297266 1000000 mytestfile

  3. Migrate the file and release its data blocks after the offline copies are made by using the dmput(1) command:

    # dmput -r mytestfile

  4. Idle the DMF daemon so that the dmput request will take place immediately by using the dmdidle(8) command:

    # dmdidle

  5. List the progressing status of the file by executing the dmls(1) command multiple times:

    # dmls -l

    For example, the following repeated execution of dmls shows that mytestfile moves from migrating ( MIG) to offline (OFL):

    # dmls -l 
    total 980
    -rw-r--r--  1 root      root    1000000 2010-11-05 12:36 (MIG) mytestfile
    #
    # dmls -l
    total 980
    -rw-r--r--  1 root      root    1000000 2010-11-05 12:36 (OFL) mytestfile

  6. Retrieve the file by using the dmget(1) command:

    # dmget mytestfile

  7. Use dmls again to show that the file is now dual-state (DUL):

    # dmls -l 
    total 980
    -rw-r--r--  1 root      root    1000000 2010-11-05 12:36 (DUL) mytestfile

  8. Verify that the checksum on the file has not changed:

    # cksum mytestfile
    3368297266 1000000 mytestfile

  9. Delete the test file. For example:

    # rm mytestfile