6.5 Configuration File Manager (CFM)

 < Day Day Up > 

6.5 Configuration File Manager (CFM)

Configuration File Manager (CFM) provides a centralized way of managing configuration files within your CSM cluster. Files placed into /cfmroot on the management node will be copied out to the compute nodes, preserving permissions and ownership. By default, the files are copied out via a nightly cron job and placed in root's crontab at CSM install. The administrator may elect to alter the time and/or frequency of this job, configure CSM to automatically copy any files out once they change, or disable automatic updates and only push the updates out manually.

Commonly, /etc/hosts should be identical on all the nodes within the cluster, including the management node. If the file in /etc is symlinked into /cfmroot/etc, it will be distributed out to all the nodes:

 # ln -s /etc/hosts /cfmroot/etc/hosts 

Now you can copy /etc/hosts and any other files in /cfmroot to all the nodes:

 # cfmupdatenode -a 

If a file must be different on the nodes to the management node, it may be copied into /cfmroot. Files in /cfmroot are not propagated to the management node.

If a file should be copied to just a subset of nodes, create it with a _groupname extension. For example, to set up a file that will only be copied to those nodes in the MyrinetNodes group, run:

 # cp /home/file /cfmroot/some/file._MyrinetNodes 

CFM also supports pre- and post-installation scripts; these are particularly useful if you are replacing the configuration for a sub-system that needs to be shut down for the replacement to take place then re-started. Such scripts should be created with a .pre and .post extension and must be executable. Example 6-29 shows how we might use a .post script for /cfmroot/etc/ntp.conf.

Example 6-29: Creating a .post script for /cfmroot/etc/ntp.conf

start example
 [root@master /]# cd /cfmroot/etc [root@master etc]# cat > ntp.conf.post #!/bin/sh /sbin/service ntp restart ^D [root@master etc]# chmod 755 ntp.conf.post [root@master etc]# 
end example

ntp.conf.post will be automatically run if and when /etc/ntp.conf is replaced by CFM; it will not be run every time cfmupdatenode runs.

At CSM install time, an entry is created in root's crontab that runs cfmupdatenode -a every night at midnight. If you desire periodic updates, this crontab may be edited to suit your requirements.

To configure CSM event monitoring so the files are automatically distributed whenever they are created or modified, run the following:

 # startcondresp CFMRootModTimeChanged CFMModResp 

Now, whenever a file in /cfmroot is updated, it will be updated on all the nodes in the cluster, within approximately five minutes. This is very convenient in smaller clusters, but can cause a performance impact on larger systems. If you have a large or production cluster and/or you will be updating /cfmroot often, it is not recommended that you use automatic updates.

CFM will never delete files from the nodes; if you ever delete a file from /cfmroot, you must delete it from the nodes yourself, perhaps using dsh.

Note that /cfmroot physically stores data in /etc/opt/csm/cfmroot. If you have a small root (/) partition, you may need to place large files in another, larger file system and then symlink them into /cfmroot.

 < Day Day Up > 

Linux Clustering with CSM and GPFS
Linux Clustering With Csm and Gpfs
ISBN: 073849870X
EAN: 2147483647
Year: 2003
Pages: 123
Authors: IBM Redbooks

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net