C H A P T E R  5

Using and Managing System Files

For information about how to manage system files, see the following sections:


Using Data Caches in Shared File Systems

If the impact on performance is acceptable, do not use data and attribute caches when writing data to shared file systems. If it is necessary to use data and attribute caches to improve performance, ensure that your applications minimize the risk of using inconsistent data. If the cluster is running the Solaris OS, consider using the O_SYNC or O_DSYNC mount options on some files. For information about these options, see the fcntl3head man page.

Data and attribute caching is disabled by the noac mount option. The following procedure describes how to enable or disable the noac mount option.

procedure icon  To Enable or Disable Data and Attribute Caching on Solaris

  1. Log in to the vice-master node as superuser.

  2. Open the /etc/vfstab file in a text editor.

    • If data and attribute caching is disabled, the file should contain the noac option, as follows:


      master-cgtp:/SUNWcgha/local/export/data -       \
      /SUNWcgha/remote  nfs     -       no    rw,hard,fg,intr,noac
      master-cgtp:/SUNWcgha/local/export/services/ha_3.0/opt  \
      -    /SUNWcgha/services   nfs     -   no   rw,hard,fg,intr,noac
      master-cgtp:/SUNWcgha/local/export/services/ha_3.0 -     \
      /SUNWcgha/swdb  nfs    -       no     rw,hard,fg,intr,noac
      

    • If data and attribute caching is enabled, the file should not contain the noac option, as follows:


      master-cgtp:/SUNWcgha/local/export/data -       \
      /SUNWcgha/remote  nfs     -       no    rw,hard,fg,intr
      master-cgtp:/SUNWcgha/local/export/services/ha_3.0/opt  \
      -    /SUNWcgha/services   nfs     -   no   rw,hard,fg,intr
      master-cgtp:/SUNWcgha/local/export/services/ha_3.0 -     \
      /SUNWcgha/swdb  nfs    -       no     rw,hard,fg,intr
      

  3. Remove or add the noac option, as required.

    • To enable data and attribute caching, remove noac from the lists of options.

    • To disable data and attribute caching, add noac to the lists of options.

  4. Save and close the file.

  5. Reboot the node:


    # uadmin 1 1
    

  6. Trigger a switchover, as described in To Trigger a Switchover With nhcmmstat.

  7. Repeat Step 1 through Step 5 on the new vice-master node.

  8. Log in to each of the diskless peer nodes or dataless peer nodes and repeat Step 2 through Step 5.

procedure icon  To Enable or Disable Data and Attribute Caching on Linux

  1. Log in to the vice-master node as superuser.

  2. Open the /etc/fstab file in a text editor.

    • If data and attribute caching is disabled, the file should contain the noac option, as follows:


      master-cgtp:/SUNWcgha/local/export/data \
      /SUNWcgha/remote        nfs    noauto,rw,hard,fg,intr,noac 0 0
       
      master-cgtp:/SUNWcgha/local/export/services/ha_3.0/opt \
      /SUNWcgha/services      nfs     noauto,rw,hard,fg,intr,noac 0 0
       
      master-cgtp:/SUNWcgha/local/export/services/ha_3.0 \
      /SUNWcgha/swdb nfs      noauto,rw,hard,fg,intr,noac 0 0
      

    • If data and attribute caching is enabled, the file should not contain the noac option, as follows:


      master-cgtp:/SUNWcgha/local/export/data \
      /SUNWcgha/remote        nfs    noauto,rw,hard,fg,intr 0 0
       
      master-cgtp:/SUNWcgha/local/export/services/ha_3.0/opt \
      /SUNWcgha/services      nfs     noauto,rw,hard,fg,intr 0 0
       
      master-cgtp:/SUNWcgha/local/export/services/ha_3.0 \
      /SUNWcgha/swdb nfs      noauto,rw,hard,fg,intr 0 0
      

  3. Remove or add the noac option, as required.

    • To enable data and attribute caching, remove noac from the lists of options.

    • To disable data and attribute caching, add noac to the lists of options.

  4. Save and close the file.

  5. Reboot the node:


    # reboot -n -f
    

  6. Trigger a switchover, as described in To Trigger a Switchover With nhcmmstat.

  7. Repeat Step 1 through Step 5 on the new vice-master node.

  8. Log in to each of the diskless peer nodes or dataless peer nodes and repeat Step 2 through Step 5.


Changing the Location of the Scoreboard Bitmap

When data is written to the master node, a write is made to the replicated partition on the disk and to the corresponding scoreboard bitmap.



Note - The term "scoreboard bitmap" is the Solaris name for the data area used to keep track of modifications to data blocks. On Linux, the term "DRBD metadata" is used for the same purpose. DRBD on Linux supports only metadata stored on disk. The information presented in this section of the guide applies only to clusters running the Solaris OS.



The scoreboard bitmap can be configured in two ways:

The scoreboard bitmap is only needed for IP-replicated systems. Systems using shared disk do not need it.

For examples of the two methods available for storing the scoreboard bitmaps, see “IP Mirroring” in the Netra High Availability Suite 3.0 1/08 Foundation Services Overview. For information about how to reconfigure the scoreboard bitmap, see the following section and procedure.

Storing Bitmap Scorecards on Disk or in Memory

The "bitmaps on disk" and "bitmaps in memory" setting is a system-wide tunable, which cannot be set for each slice. The setting can be changed in the file /usr/kernel/drv/rdc.conf. Netra HA Suite software supports two of the available modes for the rdc_bitmap_mode parameter:

These options have the following advantages and drawbacks:



Note - Storing the scoreboard bitmap in memory is encouraged only when data is continuously and frequently updated, or when data is written to a replicated partition during a switchover. In most other cases, storing the scorecard bitmap to memory is not recommended because synchronizing the partitions after a switchover or during a full synchronization can require a significant amount of time.



procedure icon  To Change the Location of the Scoreboard Bitmap

  1. Log in to the vice-master node as superuser.

  2. Open the /usr/kernel/drv/rdc.conf file in a text editor.

    • If the scoreboard bitmap is stored on a replicated partition, the value of the rdc_bitmap_mode parameter is 1.

    • If the scoreboard bitmap is stored in memory, the value of the rdc_bitmap_mode parameter is 2.

  3. Change the value of the rdc_bitmap_mode parameter:

    • To store the scoreboard bitmap on a replicated partition, set the value of the rdc_bitmap_mode parameter to 1.

    • To store the scoreboard bitmap in memory, set the value of the rdc_bitmap_mode parameter to 2.

  4. Save and close the file.

  5. Reboot the node:


    # uadmin 1 1
    

  6. Trigger a switchover, as described in To Trigger a Switchover With nhcmmstat.

  7. Repeat Step 1 through Step 5 on the new vice-master node.

  8. Verify that the master node and vice-master node are synchronized, as described in To Verify That the Master Node and Vice-Master Node Are Synchronized.


Managing Differences Between Files That Are Not Shared

Files on a shared file system have the same content, as viewed from the master node and vice-master node. The following files are stored locally on the master node and vice-master node. The files must contain identical information, but they are not shared.


cluster_nodes_table Contains the nodeid and node name of each peer node. For more information, see the cluster_nodes_table4 man page.
/etc/hosts Contains the hostnames of all nodes on the cluster network. For more information, see the hosts4 man page.
nhfs.conf Describes the cluster configuration, including network interfaces, mirrored disk partitions, and the floating external address. For more information, see the nhfs.conf4 man page.

To manage differences that exist between files that are not shared, perform the procedure as follows.

procedure icon  To Manage Differences Between Files That Are Not Shared

  1. Log in to the master node as superuser.

  2. Open or create the /SUNWcgha/remote/etc/nhadmsync.conf file in a text editor.

  3. Specify the names of the files that you want to compare by adding them to the nhadmsync.conf file.

    For more information, see the nhadmsync.conf4 man page.

  4. Save the nhadmsync.conf file and exit the text editor.

  5. Log in to the vice-master node as superuser.

  6. Repeat Step 2 through Step 4.

  7. Verify that the listed files are the same on the master node and the vice-master node:


    # nhadm synccheck
    

    • If the files are not identical on the master node and vice-master node, analyze the differences between the copies of the files.

    • If the differences between the files are acceptable, accept them:


      # nhadm syncgen
      

      If you accept the differences between two files, the differences will no longer be signaled by the nhadm synccheck command.

    For more information about the nhadm command, see the nhadm1M man page.


Using the Naming Services

This section provides guidelines for using naming services with the Foundation Services.

If you use a naming service such as the Network Information Services (NIS) or the Domain Name System (DNS), avoid conflicts between the names of nodes and services by doing the following:

  1. Verify that the names of nodes specified in the /etc/hosts file are used before node names generated by your naming service.

    The name assigned to a node during cluster configuration must not conflict with the name assigned to a node by the naming service.

  2. Verify that the entries for hosts, network, and services in the /etc/nsswitch.conf file are set as follows:


    [...]
    hosts:      files [...]
    network:    files [...]
    [...]
    services:   files [...]