3.6.0 Matrix Server Installation Guide (5697-7079, February 2008)

Appendix A: Configure the Matrix from the Command Line 45
Copyright © 1999-2008 PolyServe, Inc. All rights reserved.
•The values for the mx commands are specified in a file named
cluster.conf.
The matrix 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
MATRIX="nodeA"
# Other Nodes
NODES="nodeB nodeC nodeD"
# FibreChannel Switch Information
SWITCHES="99.10.180.253"
# Membership Partitions