VCS : Sample Configuration to add new Service Groups
Below are the some sample configurations on how do we configure new service groups in two common scenarios i.e. while VCS online and while the VCS is stopped. It is good to know this information to perform various dynamic configuration to VCS cluster without disrupting the existing services.
Please keep in mind in one important factor, when ever you add new resource to the existing group as “critical Resource”".
For example : you marked a resource property as “critical” and then later you tried to enable the resource. At this stage if you make any wrong configuration that stops the resource to come online on the first attempt , the whole service group go down. so use the critical property wisely, and only once you understand it.
Add and Configuring new service group ad resources while VCS is running :
Perform the following steps on the system server1 in the Primary cluster Server, and then repeat the steps (with minor changes as noted) on the system gurkul1 in Secondary cluster Gurkul:
To create the replication service group
1.Log in as root.
2.Set the VCS configuration mode to read/write by issuing the following command:
# haconf -makerw – open the running configuration in read and write mode
3.Add the replication service group, SgGrp, to the cluster. This group will contain all the storage and replication resources. Modify the attributes SystemList and AutoStartList of the service group to populate SystemList and AutoStartList:
# hagrp -add SgGrp — Add new group SgGrp
# hagrp -modify SgGrp SystemList server1 0 server2 1 — there are two systems that this group can be online
# hagrp -modify SgGrp AutoStartList server1 server2 — by default the Sg grp Starts on Server1
4.Add the DiskGroup resource SampleDG to the service group SgGrp and modify the attributes of the resource:
# hares -add SampleDG DiskGroup SgGrp — add a resource of type Diskgroup
# hares -modify SampleDG DiskGroup emcDG – modify the resource parameter and mention emcDG is the diskgroup
5. Add a NIC resource mynic to the service group SgGrp and modify the attributes of the resource:
# hares -add mynic NIC SgGrp — add a NIC type resource, name mynic
# hares -modify mynic Device qfe3 — mention the qfe3 as Device parameter mynic
6.Add the IP resource myip to the service group SgGrp and modify the attributes of the resource:
# hares -add myip IP SgGrp — Add an IP type resource name myIP to the SgGrp
# hares -modify myip Address 192.168.1.100 – configure ipaddress value to the myip resource
# hares -modify myip NetMask “255.255.255.0″ - configure the netmask parameter for myip resource
7.Specify resource dependencies for the resources you added in the previous steps:
#hares -link SgGrp myip – Define the dependency like SgGrp depends on myip
#hares -link SgGrp emcDG – Define the dependency like SgGrp depends on the emcDG
# hares -link myip mynic – Define the dependency like myip depends on mynic
8.Enable all resources in SgGrp
# hagrp -enableresources SgGrp — Enable SgGrp
9.Save and close the VCS configuration
# haconf -dump -makero — Save the running configuration, and make it read only
Perform the following steps on the system server1 in the Primary cluster Server, and then repeat the steps (with minor changes as noted) on the system gurkul1 in Secondary cluster Gurkul:
VCS is already offline, then how to configure service groups;
1.Log in as root.
2.Ensure that all changes to the existing configuration have been saved and that further changes are prevented while you modify main.cf:
If the VCS cluster is currently writeable, run the following command:
# haconf -dump -makero
If the VCS cluster is already read only, run the following command:
# haconf -dump
3.Do not edit the configuration files while VCS is started. The following command will stop the had daemon on all systems and leave resources available:
# hastop -all -force
4.Make a backup copy of the main.cf file:
# cd /etc/VRTSvcs/conf/config
# cp main.cf main.cf.orig
5.Edit the main.cf ( located in /etc/VRTSvcs/conf/config) files for the Primary and Secondary clusters.
6.Save and close the file.
7.Verify the syntax of the file /etc/VRTSvcs/conf/config/main.cf:
# hacf -verify /etc/VRTSvcs/conf/config
8.Start VCS on all systems in both clusters.
9.Administer the service groups






