apc, which uses the fence_apc fencing agent.
ccs -hhost--addmethodmethodnode
APC for the node node-01.example.com in the configuration file on the cluster node node-01.example.com, execute the following command:
ccs -h node01.example.com --addmethod APC node01.example.com
ccs -hhost--addfenceinstfencedevicenamenodemethod[options]
node-01.example.com that uses the APC switch power port 1 on the fence device named apc to fence cluster node node-01.example.com using the method named APC, execute the following command:
ccs -h node01.example.com --addfenceinst apc node01.example.com APC port=1
APC. The device for the fence method specifies apc as the device name, which is a device previously configured with the --addfencedev option, as described in Section 5.5, “Configuring Fence Devices”. Each node is configured with a unique APC switch power port number: The port number for node-01.example.com is 1, the port number for node-02.example.com is 2, and the port number for node-03.example.com is 3.
ccs -h node01.example.com --addmethod APC node01.example.com ccs -h node01.example.com --addmethod APC node02.example.com ccs -h node01.example.com --addmethod APC node03.example.com ccs -h node01.example.com --addfenceinst apc node01.example.com APC port=1 ccs -h node01.example.com --addfenceinst apc node02.example.com APC port=2 ccs -h node01.example.com --addfenceinst apc node03.example.com APC port=3
cluster.conf After Adding Power-Based Fence Methods ” shows a cluster.conf configuration file after you have added these fencing methods and instances to each node in the cluster.
cluster.conf After Adding Power-Based Fence Methods
<cluster name="mycluster" config_version="3">
<clusternodes>
<clusternode name="node-01.example.com" nodeid="1">
<fence>
<method name="APC">
<device name="apc" port="1"/>
</method>
</fence>
</clusternode>
<clusternode name="node-02.example.com" nodeid="2">
<fence>
<method name="APC">
<device name="apc" port="2"/>
</method>
</fence>
</clusternode>
<clusternode name="node-03.example.com" nodeid="3">
<fence>
<method name="APC">
<device name="apc" port="3"/>
</method>
</fence>
</clusternode>
</clusternodes>
<fencedevices>
<fencedevice agent="fence_apc" ipaddr="apc_ip_example" login="login_example" name="apc" passwd="password_example"/>
</fencedevices>
<rm>
</rm>
</cluster>