Service Guard Commands
Service Guard Commands
Service Guard Commands
On testnode1
# pvcreate /dev/rdsk/c0t4d0
# pvcreate /dev/rdsk/c1t4d0
# mkdir /dev/vg01
# mknod /dev/vg01/group c 64 0×010000
# vgcreate vg01 /dev/dsk/c0t4d0 /dev/dsk/c1t4d0
# mkdir /etc/cmcluster/maps
# vgexport –p –s –m vg01 /etc/cmcluster/maps/vg01
On testnode2
# mkdir /dev/vg01
# mknod /dev/vg01/group c 64 0×010000
# mkdir /etc/cmcluster/maps
# rcp testnode1:/etc/cmcluster/maps/vg01 /etc/cmcluster/maps/vg01
# vgimport –s –m /etc/cmcluster/maps/vg01 vg01
# vgchange –a y vg01
# vgchange –a n vg01
You can now go ahead and create the cluster.
# cd /etc/cmcluster
# cmquerycl –v –C cmclconfig.ascii –n testnode1 -n testnode2
After creating this file, you will need to edit it to suit your cluster. You will need to
alter the following lines:
# vi cmclconfig.ascii
CLUSTER_NAME simeon1
NODE_NAME testnode1
NETWORK_INTERFACE lan0
HEARTBEAT_IP 192.168.100.101
NETWORK_INTERFACE lan1
HEARTBEAT_IP 164.39.8.92
NETWORK_INTERFACE lan2
NODE_NAME testnode2
NETWORK_INTERFACE lan0
HEARTBEAT_IP 192.168.100.102
NETWORK_INTERFACE lan1
HEARTBEAT_IP 164.39.8.93
NETWORK_INTERFACE lan2
HEARTBEAT_INTERVAL 2000000
NODE_TIMEOUT 5000000
MAX_CONFIGURED_PACKAGES 10
To check that there are no mistakes in the file, use the check command.
# cmcheckconf –C /etc/cmcluster/cmclconfig.ascii
To apply the configuration file, usr the apply command.
# cmapplyconf –C /etc/cmcluster/cmclconfig.ascii
You are now ready to startup the cluster.
On testnode1
# vgchange –a n vg01
# cmruncl –v
# cmviewcl –v
# vgchange –c y vg01
On Both nodes
# netstat -in
# vi /etc/rc.config.d/cmcluster
AUTOSTART_CMCLD=1
On testnode1
# cmhaltcl –v
# vgchange –a n vg01
Deleting a cluster
When there are no packages left in the cluster, and you want to delete the cluster, use
the following commands.
# vgchange –c n vg01
# cmhaltcl –f
# cmdeleteconf –c <cluster_name>
# vgchange –a y vg01
# lvremove /dev/vg01/lvol1
# vgremove vg01
# rm –r /dev/vg01
This entry was posted on Friday, March 19th, 2010 at 3:06 pm and is filed under Unix and Linux. You
can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or
trackback from your own site.