
# Add both interfaces of each node known_hosts of the other
ssh ${MGMT1_NAME} ssh ${MGMT2_NAME} date
ssh ${MGMT1_NAME%.${FQD}} ssh ${MGMT2_NAME%.${FQD}} date
ssh ${MGMT1_IP} ssh ${MGMT2_IP} date
ssh ${MGMT1_ICIP} ssh ${MGMT2_ICIP} date
# Wait for creation of JON, MRG, and RHEV-M VMs
while [[ "`/usr/bin/ssh ${MGMT1_IP} /bin/ls /tmp/mgmtVMs 2> /dev/null`X" == "X" ]]; do sleep 5;
done
# Shutdown standalone satellite VM for later restart as cluster service
/usr/bin/ssh ${MGMT1_IP} /usr/bin/virsh shutdown ${SAT_NAME}
while [[ ! `/usr/bin/ssh ${MGMT1_IP} /usr/bin/virsh list --all |grep ${SAT_NAME} |grep "shut
off"` ]]; do sleep 2; done
# Deactivate the management service volume group
/usr/bin/ssh ${MGMT1_IP} /sbin/vgchange -a n MgmtServicesVG
# Set cluster locking type in LVM configuration file on both cluster members
/usr/bin/ssh ${MGMT1_IP} "/bin/sed -i -e 's/locking_type = 1/locking_type = 3/'" /etc/lvm/lvm.conf
/bin/sed -i -e 's/locking_type = 1/locking_type = 3/' /etc/lvm/lvm.conf
# Configure services for clustering on both cluster members
/usr/bin/ssh ${MGMT1_IP} /sbin/service acpid stop
/usr/bin/ssh ${MGMT1_IP} /sbin/chkconfig acpid off
/usr/bin/ssh ${MGMT1_IP} /sbin/chkconfig cman on
/usr/bin/ssh ${MGMT1_IP} /sbin/chkconfig clvmd on
/usr/bin/ssh ${MGMT1_IP} /sbin/chkconfig --level 345 gfs2 on
/usr/bin/ssh ${MGMT1_IP} /sbin/chkconfig rgmanager on
/sbin/service acpid stop
/sbin/chkconfig acpid off
/sbin/chkconfig cman on
/sbin/chkconfig clvmd on
/sbin/chkconfig --level 345 gfs2 on
/sbin/chkconfig rgmanager on
# Start the cluster services on both cluster members
/usr/bin/ssh ${MGMT1_IP} /sbin/service cman start
/usr/bin/ssh ${MGMT1_IP} /sbin/service clvmd start
/sbin/service cman start
/sbin/service clvmd start
# Modify the management service volume group for shared cluster use and activate
/usr/bin/ssh ${MGMT1_IP} /sbin/vgchange -c y MgmtServicesVG
/usr/bin/ssh ${MGMT1_IP} /sbin/vgchange -a y MgmtServicesVG
# Create a GFS2 file system for VM config file storage
/sbin/mkfs.gfs2 -p lock_dlm -t mgmt:gfs2-1 -j 2 /dev/mapper/GFS2_disk <<-EOF
y
www.redhat.com 86
Komentáře k této Příručce