source: gpfs_3.1_ker2.6.20/lpp/mmfs/samples/syncfsconfig.sample @ 152

Last change on this file since 152 was 16, checked in by rock, 17 years ago
  • Property svn:executable set to *
File size: 3.8 KB
RevLine 
[16]1#!/bin/ksh
2# @(#)95  1.3  src/avs/fs/mmfs/ts/config/syncfsconfig.sample, mmfs, avs_rgpfs24, rgpfs240610b 11/1/04 16:23:45
3##############################################################################
4#
5# When properly installed, this script will be invoked after each
6# GPFS administration command that may change the configuration of
7# a GPFS file system.  Examples of such changes include:
8# - creation or deletion of GPFS file systems (mmcrfs, mmdelfs)
9# - addition or removal of disks (mmadddisk, mmdeldisk, mmrpldisk)
10# - changing of a mount point or some other mount attribute (mmchfs)
11#
12# This script can be used to keep the file system configuration data
13# in replicated GPFS clusters automatically synchronized.
14#
15#
16# INSTALLATION GUIDELINES FOR THIS SCRIPT
17#
18#   a) edit this script using the guidelines below
19#   b) copy this script to /var/mmfs/etc/syncfsconfig
20#   c) ensure this script is executable: chmod +x /var/mmfs/etc/syncfsconfig
21#
22#   Since mm commands can be started on any node in the cluster,
23#   it is suggested that this script is installed on all nodes.
24#
25#
26# DESCRIPTION OF THE CROSS-CLUSTER SYNCHRONIZATION PROCESS
27#
28#   The synchronization of the file system configuration data in two
29#   GPFS clusters can be accomplished by invoking mmfsctl syncFSconfig.
30#   This command uses variations of the GPFS mmexportfs and mmimportfs
31#   commands to extract relevant information from the source cluster
32#   configuration data (mmsdrfs file) and restore it in the target
33#   cluster's configuration data.
34#
35#
36# CONFIGURATION AND EDITING GUIDELINES
37#
38#   This script will always be invoked synchronously.  It is up to
39#   the user to decide whether the tasks coded in this script will
40#   be performed synchronously as well, and as a result, the return
41#   from the invoking mm command delayed until this script completes.
42#   Or, alternatively, the tasks coded in this script can be started
43#   in the background and control returned to the invoking command.
44#
45#   Similarly, it is up to the user to decide whether any output
46#   generated by this script will show up as part of the output
47#   of the invoking GPFS command, or whether such output will be
48#   send to some log file or discarded altogether.
49#
50#
51# INPUT FILES
52#
53#   The mmfsctl syncFSconfig command expects the following files:
54#
55#   targetNodesFile  The path name to a file containing, one per line,
56#                    hostnames or IP addresses of nodes that belong to
57#                    the target cluster.  It is suggested that you
58#                    list more than one node in this file to reduce
59#                    the risk of failure due to node unavailability.
60#
61#                    Note: targetNodesFile must be installed on all
62#                          nodes in the local cluster on which this
63#                          script has been activated.
64#
65#   nsdSpecFile      The path name to a file with the NSD server designations
66#                    in the target cluster for all affected disks.  The file
67#                    format is the same as for the -S parameter of mmimportfs.
68#
69#                    Note: nsdSpecFile refers to a file in the target cluster.
70#                          It must exist on all nodes listed in targetNodesFile.
71#
72##############################################################################
73
74# Initialize path names.
75mmfsctl=/usr/lpp/mmfs/bin/mmfsctl
76# targetNodesFile=
77# nsdSpecFile=
78
79# Define log file for error messages.
80logFile=/dev/null
81
82
83# Uncomment the following line if you want the command to be executed
84# synchronously and all output appear on the console.
85
86# $mmfsctl all syncFSconfig -n $targetNodesFile -S $nsdSpecFile
87
88
89# Uncomment the following line if you want the command to be executed
90# asynchronously and all output redirected to a log file or /dev/null.
91
92# $mmfsctl all syncFSconfig -n $targetNodesFile -S $nsdSpecFile >$logFile 2>&1 &
93
94return 0
95
Note: See TracBrowser for help on using the repository browser.