| 1 |
Intro: |
| 2 |
------ |
| 3 |
This is an SNMP-based fencing agent for RHCS. It was designed with the use-case |
| 4 |
of disabling ethernet ports on an iSCSI SAN, but could be used to disable any |
| 5 |
port on any SNMP v1/2c/3 device that implementes the IF-MIB. |
| 6 |
|
| 7 |
The script requires NetSNMP to be installed and working on all nodes |
| 8 |
in the cluster. There are no requirements for any MIBs to be setup --- all of |
| 9 |
the required OIDs are hard-coded into the script. Since the IF-MIB is an IETF |
| 10 |
standard, these identifiers are very widely supported and will not change. |
| 11 |
|
| 12 |
|
| 13 |
Typical usage: |
| 14 |
-------------- |
| 15 |
To use this agent with the switch used on the iSCSI network, you'll need: |
| 16 |
1) A managed switch running SNMP. |
| 17 |
2) An SNMP community with write privileges. |
| 18 |
3) Permission to send SNMP through any ACLs or firewalls from the nodes. |
| 19 |
4) The ifIndex or ifPort associated with the ports being used by the cluster nodes. |
| 20 |
|
| 21 |
Consider a three-node cluster composed of A, B, and C. Each node has two |
| 22 |
network interfaces - one used for network and cluster communication, the second |
| 23 |
used for iSCSI traffic. If A needs to be fenced, B and C will run this script |
| 24 |
to administratively disable the switchport for A's connection to the iSCSI |
| 25 |
storage. |
| 26 |
|
| 27 |
If you are using a single interface for cluster and iSCSI traffic, this will |
| 28 |
still work, but you will lose network connectivity to the fenced host. |
| 29 |
|
| 30 |
|
| 31 |
cluster.conf: |
| 32 |
------------- |
| 33 |
There is no GUI support for this fence agent at this time. To use it, you will |
| 34 |
need something like this cluster.conf |
| 35 |
|
| 36 |
<fencedevice agent="fence_ifmib" name="myswitch" comm="fencing" ipaddr="sw1"/> |
| 37 |
|
| 38 |
In a node's fencing methods, you'll include a line like this: |
| 39 |
|
| 40 |
<device name="myswitch" port="43" option="off"/> |
| 41 |
|
| 42 |
This node will be fenced by disabling the port with ifIndex 43 on the host sw1. |
| 43 |
In SNMP speak, we set IF-MIB::ifAdminStatus.43 = down(2). |
| 44 |
|
| 45 |
If you will use port name (like fc1/1), script will try to find ifIndex. |