Configure Resource on LVS cluster
To add an ip resource who's a member of group "ip_group" create an xml file :
XML:
-
<group id="group_vips">
-
<primitive id="vip_1" class="ocf" type="IPaddr2" provider="heartbeat">
-
<instance_attributes id="vip_170_instance_attrs">
-
<attributes>
-
<nvpair id="vip_1_ip" name="ip" value="192.168.1.1"/>
-
<nvpair id="vip_1_nic" name="nic" value="eth0"/>
-
<nvpair id="vip_1_netmask" name="netmask" value="255.244.255.0"/>
-
</attributes>
-
</instance_attributes>
-
<meta_attributes id="vip_1_meta_attrs">
-
<attributes>
-
<nvpair id="vip_1_metaattr_resource_stickiness" name="resource_stickiness" value="INFINITY"/>
-
<nvpair id="vip_1_metaattr_target_role" name="target_role" value="started"/> </attributes>
-
</meta_attributes>
-
</primitive>
-
</group>
import the resource using :
CODE:
-
cibadmin -V -M -o resources -x file.xml
( note you are using -M to modify the existing group ... )
delete the resource :
CODE:
-
cibadmin -V -D -o resources -X' <primitive id="vip_1"/>'