DB2 Data Links Manager Quick Beginnings

Listing or Adding Registered File Systems Under the Control of a Data Links Filesystem Filter on AIX

This section describes how to list any file systems that are under the control of a Data Links Filesystem Filter on AIX, and how to register other file systems to be controlled by a Data Links Filesystem Filter (DLFF).

To list any file systems that are currently under the control of a Data Links Filesystem Filter:

  1. Log on to the system as the DB2 Data Links Manager Administrator.
  2. Enter the dlfm list registered prefixes command on the Data Links server.

    To list any file systems where a DLFF is loaded in a JFS environment, enter the lsfs -v dlfs command.

    To list file systems where a DLFF is loaded in a DCE-DFS environment, enter the dfsexport | grep dmlfs command.

Adding a DLFF in a JFS environment

To add a Data Links Filesystem Filter in a Journaled File System environment:

  1. Prepare a JFS to use a Data Links Filesystem Filter as follows:
    1. Create a Journaled File System (JFS) file system using the smit manfs command and set the Mount AUTOMATICALLY at system restart? option to no. You can also use an existing JFS file system. For more information, refer to your AIX Administration Guide.
    2. Open the /etc/filesystems file, record the current setting for the vfs entry, and edit its stanza such that:
         mount    = false
         vfs      = dlfs
      
    3. Add the following attribute to the stanza of the /etc/filesystems file:
         nodename = -
      
      Note:You must ensure that there are no blank spaces after the null character (-) for this entry.
    4. Edit the stanza for the /etc/filesystems file for your file system and set the Basefs parameter, in the options attribute, to the value that you recorded for the vfs entry above. For example, the entry would be similar to the following:
         options = rw,Basefs=jfs
       
      
  2. Modify the properties of a file system, so that it comes under the control of the Data Links Filesystem Filter, and mount it by entering the following command:
       /usr/lpp/db2_07_01/instance/dlfmfsmd dlfm_mountpoint
    

    where dlfm_mountpoint is the mount point of the JFS file system that you created for the Data Links Filesystem Filter in the previous step.

  3. Log out.
  4. Log on to the system as the DB2 Data Links Manager Administrator.
  5. Start the Data Links File Manager by entering the dlfm start command.
  6. Register a file system that is under the control of a Data Links Filesystem Filter by entering the following command:
       dlfm add_prefix prefix_path
    

    where prefix_path is the location of the file system that is under the control of a DLFF.

    For our example, register the Data Links server to use the Data Links Filesystem Filter on the test file system by entering the following command:

       dlfm add_prefix /test
    

    To update an existing prefix, enter the following command:

    dlfm update_prefix prefix_path for dfs localpath local_mount_point
    

Adding a DLFF in a DCE-DFS environment

To add a Data Links Filesystem Filter in a DCE-DFS environment:

  1. Log in as root and dce_login as a DFS administrator.
  2. Create a logical volume by entering the following command:
       mklv -y aggregate_name -t aggregate_type lfs rootvg 1
    

    where aggregate_name represents the name of the logical volume, aggregate_type represents the aggregate type, rootvg represents the logical volume type, and 1 represents the number of logical partitions.

  3. Create an aggregate in the logical volume by entering the following command:
       newaggr -aggregate /dev/dmtest -block 8192 -frag 1024 -overwrite
    

    where /dev/dmtest represents the aggregate name, given as a device file. Note that if this aggregate name already exists, the -overwrite option will delete all data in the aggregate.

  4. Initialize and export the aggregate by entering the following command:
       mkdfslfs -d /dev/dmtest -n dmtest
    

    where /dev/dmtest is the device name for the aggregate.

  5. Create the filesets in the aggregate by entering the following command:
       mkdfslfs -f dmtest1.ft -m /:/dmtest/dmtest1 -n dmtest
    

    where /:/dmtest/dmtest1 represents the mountpoint in the DFS namespace and dmtest represents the name of the aggregate.
    Note:You must have a valid dce_login and the authority to create directories in the DFS namespace.

  6. Edit the /opt/dcelocal/var/dfs/dfstab file and change the entry for the aggregate you just created from lfs to dmlfs. For example, this file will have entries for each aggregate similar to the following:
       # blkdev aggname aggtype aggid [UFS fsid]
       /dev/aggrdev1 aggrname1 lfs 1 
       /dev/aggrdev2 aggrname2 lfs 2 
     
    

    Change aggtype to dmlfs for all aggregates that are to be brought under Data Links control. Save and close the file.

    Notes:

    1. When you create an aggregate using SMIT, you can also specify an aggregate id. However, the default id is the next available higher integer value.

    2. If the aggregate already has been exported, you must unexport it before performing this and the following step.
  7. Enable DFS SMT on the aggregate by running the following command:
       dmaggr -aggregate name [{-on | -off}] [{-needapp | -noneedapp}] [-help]
     
    

    We recommend you always use the -needapp option when running this command.

  8. Export the aggregate so that it can be controlled by the Data Links Filesystem Filter.
  9. Register a file system that is under the control of a Data Links Filesystem Filter by entering the following command:
       dlfm add_prefix prefix_path
    

    where prefix_path is the location of the file system that is under the control of a DLFF.

  10. To register a DCE-DFS fileset, you can either use the dlfm add_prefix /test command or you can use one of the following variations:
       dlfm add_prefix for dfs rwpath prefix_path
    

    This command specifies a read-only path for DCE-DFS.

       dlfm add_prefix for dfs rwpath prefix_path localpath local_mount_point
    

    where local_mount_point represents the native file system mount point of the prefix. The native file system mount point can be used to improve the performance of the archival and retrieval of files. For more information, see Performance Enhancements for Disk Backup in the DFS Environment.
    Note:You must issue all dlfm add_prefix commands from the node on which the DFS fileset resides. After issuing this command, you must issue a dlfm start command on the same node.

Performance Enhancements for Disk Backup in the DFS Environment

Consider the following scenario:

There are two prefixes registered with the File Manager. The two prefixes are:

  1. /.../cellname/fs/prfx1

    This prefix is native to node1. This prefix is referred to as prfx1. The fileset name is fileset1.

  2. /.../cellname/fs/prfx2

    This prefix is native to node2. This prefix is referred to as prfx2. The fileset name is fileset2.

The archive directory has to be a DFS fileset, for example /.../cellname/fs/dlfm_backup/.

The DB2 registry variables on both nodes of the DFS cell needs to be set as follows:

   db2set DLFM_BACKUP_TARGET=LOCAL db2set DLFM_BACKUP_DIR_NAME=/.../cellname/fs/dlfm_backup/

The archives of the files will be taken as follows:

  1. For files that reside in prfx1, the archive will be made by the copy daemon running on node1 to the following directory:
       /.../cellname/fs/dlfm_backup/node1/_prfx1/
    
  2. For files that reside in prfx2, the archive will be made by the copy daemon running on node2 to the following directory:
       /.../cellname/fs/dlfm_backup/node2/_prfx2/
    

The directory /.../cellname/fs/dlfm_backup/node[1-2] and /.../cellname/fs/dlfm_backup/node[1-2]/_prfx[1-2] will get created on startup.

Disk Backup Optimization Tip 1

By creating multiple backup DFS filesets instead on one backup fileset, one can take advantage of the localization of the fileset archives. In the above scenario, the administrator can create two backup filesets as follows:

   /.../cellname/fs/dlfm_backup/node1/

which is native to node1, and

   /.../cellname/fs/dlfm_backup/node2/

which is native to node2.

This way, archives for files that belong to filesets on node1 (that is, fileset1) will be done to a archive fileset which is native to node1. This will reduce network traffic.
Note:The DLFM_BACKUP_TARGET and DLFM_BACKUP_DIR_NAME registry variable will still have to be set to LOCAL and /.../cellname/fs/dlfm_backup/ respectively, on both node1 and node2.

Disk Backup Optimization Tip 2

The administrator can use the DLFM_BACKUP_DIR_LOCAL_MP registry variable to bypass the DFS client cache. This can be done only if Disk Backup Optimization Tip 1 is being used. Also, the DFS fileset should be mounted as a native Journaled File System (JFS) by performing the following steps:

  1. The fileset fileset1 (prefix: /.../cellname/fs/dlfm_backup/node1) can be mounted at /local_backup/node1 as a JFS by issuing the following command:
       mount -v lfs -o aggregate=lfstest1 -n node1 fileset1 /local_backup/node1
    

    where lfstest1 is the aggregate in which the fileset1 resides.

  2. In addition to setting the DLFM_BACKUP_TARGET and DLFM_BACKUP_DIR_NAME registry variables, set the DB2 registry variable as follows:
       db2set DLFM_BACKUP_DIR_LOCAL_MP=/local_backup/
    
Note:Although the native JFS mount point contains the node name, the DLFM_BACKUP_DIR_LOCAL_MP does not.


[ Top of Page | Previous Page | Next Page ]