<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 TRANSITIONAL//EN">
<HTML>
<HEAD>
  <META HTTP-EQUIV="Content-Type" CONTENT="text/html; CHARSET=UTF-8">
  <META NAME="GENERATOR" CONTENT="GtkHTML/3.6.2">
</HEAD>
<BODY>
Hi Karl,<BR>
<BR>
GNDB is a block server, like ISCSI.  Unfortunately there does not appear to be any standard fencing mechanism for ISCSI.  I hacked up one of the existing fence agents to use SNMP to turn off the network ports in a Cisco 3750 switch.  My test systems are using an old HP switch that the network team was not using -- it works also.<BR>
<BR>
System-config-cluster would not allow me to specify my own fence agent.  Well, I looked quickly, did not see any thing obvious, gave up and edited cluster.conf with vi.<BR>
<BR>
I have attached fence_cisco to this message, and here are some notes to use it.  You may need to get the Net-SNMP perl module from CPAN.org.<BR>
<BR>
The config file for fence_cisco looks like this:
<PRE>
community:<PUT YOUR SNMP COMMUNITY STRING HERE>
switch:10.1.4.254
oneoften:A1:C1
twooften:A5:C2
threeoften:A2:C3
</PRE>
The first line is your community string, the second line is the IP address of the network switch, the rest are the hosts.  The first column is the host name followed by a colon separated list of the ports that the host is attached to on the Ethernet switch.  In the cluster.conf file, the port parameter must match an entry in the host name column.  
<PRE>
<?xml version="1.0"?>
<cluster alias="DEV_ACN" config_version="11" name="DEV_ACN">
        <clusternodes>
                <clusternode name="oneoften_a.devstorage.local" votes="1">
                        <fence>
                                <method name="1">
                                        <device name="ciscofence1" port="oneoften" switch="do not know"/>
                                </method>
                        </fence>
                        <multicast addr="224.0.0.1" interface="eth1"/>
                </clusternode>
                <clusternode name="twooften_a.devstorage.local" votes="1">
                        <fence>
                                <method name="1">
                                        <device name="ciscofence1" port="twooften" switch="do not know"/>
                                </method>
                        </fence>
                        <multicast addr="224.0.0.1" interface="eth1"/>
                </clusternode>
                <clusternode name="threeoften_a.devstorage.local" votes="1">
                        <fence>
                                <method name="1">
                                        <device name="ciscofence1" port="threeoften" switch="do not know"/>
                                </method>
                        </fence>
                        <multicast addr="224.0.0.1" interface="eth1"/>
                </clusternode>
        </clusternodes>
        <fencedevices>
                <fencedevice agent="fence_cisco" ipaddr="10.1.4.254" login="testing" name="ciscofence1" passwd="password"/>
        </fencedevices>
        <rm>
                <failoverdomains/>
                <resources/>
        </rm>
        <fence_daemon post_fail_delay="0" post_join_delay="3"/>
        <cman>
                <multicast addr="224.0.0.1"/>
        </cman>
</cluster>
</PRE>
<BR>
The fence_cisco agent will 'fence a nic' in the network switch.<BR>
<BR>
I have attached fence_cisco to this message.  I would suggest that you test every thing carefully.<BR>
<BR>
Matt<BR>
<BR>
On Tue, 2007-06-12 at 16:30 -0700, Karl R. Balsmeier wrote:
<BLOCKQUOTE TYPE=CITE>
<PRE>
<FONT COLOR="#000000">Hi,</FONT>

<FONT COLOR="#000000">I have three (3) servers built and entered into the </FONT>
<FONT COLOR="#000000">system-config-cluster tool as nodes.  Basically the first node has node </FONT>
<FONT COLOR="#000000">2 and node 3 as members of the cluster.</FONT>

<FONT COLOR="#000000">For a fence device, I do not have any of the SAN or network/switch </FONT>
<FONT COLOR="#000000">devices listed in the dropdown menu, and where I have read in the </FONT>
<FONT COLOR="#000000">documentation that says "gnbd" Generic Network Block Device seems to be </FONT>
<FONT COLOR="#000000">what i'm looking for.</FONT>

<FONT COLOR="#000000">Basically I read in the docs you can use a NIC card as a fence device, </FONT>
<FONT COLOR="#000000">is this true?</FONT>

<FONT COLOR="#000000">Right now each of the 3 servers have 3 NICs, so I have a total of 9 to </FONT>
<FONT COLOR="#000000">play with.  Right now I am bonding the two GB NIC's together no </FONT>
<FONT COLOR="#000000">problem.  That leaves each server a 100mbps NIC.</FONT>

<FONT COLOR="#000000">My ultimate goal is to use these 3 machines to make a Vsftpd GFS cluster </FONT>
<FONT COLOR="#000000">that I can run Iscsi over. </FONT>

<FONT COLOR="#000000">Being new to this though, i'll stick to the primary questions:  How does </FONT>
<FONT COLOR="#000000">one configure a fence device in the form of a NIC card?  Is the gnbd </FONT>
<FONT COLOR="#000000">item relevant to this?</FONT>

<FONT COLOR="#000000">-karl</FONT>


<FONT COLOR="#000000">--</FONT>
<FONT COLOR="#000000">Linux-cluster mailing list</FONT>
<FONT COLOR="#000000"><A HREF="mailto:Linux-cluster@redhat.com">Linux-cluster@redhat.com</A></FONT>
<FONT COLOR="#000000"><A HREF="https://www.redhat.com/mailman/listinfo/linux-cluster">https://www.redhat.com/mailman/listinfo/linux-cluster</A></FONT>
</PRE>
</BLOCKQUOTE>
</BODY>
</HTML>