HP StorageWorks Clustered File System 3.6.0 Windows Storage Server Edition Installation Guide (418975-003, January 2008)

Appendix A: Configure the Cluster from the Command Line 50
Sample Configuration Script
The following example shows how a script can be used to configure the
cluster. Although this is a bash script, the same ideas apply to other
scripting methods. Note the following in the sample script:
The values for the mx commands are specified in a file named
cluster.conf.
The cluster specified by this script uses FibreChannel switch-based
fencing.
Some commands such as mx config protocol are not included in the
script because the default values for those commands will be used.
Also note that mx config fcfencing does not need to be specified
because that is the default.
#!/bin/bash
if [ ! -f cluster.conf ]; then
echo "you need cluster.conf"
exit 1
fi
set -x
source cluster.conf
MX="mx --matrix ${MATRIX} --user ${USER} --password ${PASSWORD}"
# Configure cluster.
${MX} config license ${LICENSE} || exit 1
${MX} config secret ${SECRET} || exit 1
${MX} config fcswitch --community ${COMMUNITY} ${SWITCHES} || exit 1
${MX} config mp set ${MP} || exit 1
# Export the config to all the other nodes and start them up.
${MX} server start ${MATRIX} || exit 1
for NODE in ${NODES}; do
${MX} server add ${NODE} || exit 1
${MX} config export ${NODE} || exit 1 done
The cluster.conf file defines the values for the commands in the script.
# Cluster Details
# Start Node