I whipped up a quick NFS4 cluster in Xen after I got home, and tried to remember what I did to make it work. After I bit, it all fell back into place. This is quick and dirty, and not how I would do things in production, but it's a good start. Note that I didn't set up a shared filesystem, but that should be academic at this point<br>
<br>1) Create your nfs/nfsserver.mydomain keytab<br>2) Copy keytab to both node1 and node2<br>3) Modify /etc/init.d/portmap- in the start function, add "hostname nfsserver.mydomain". In the stop function, add "hostname nodeX.mydomain"<br>
4) Drop something that looks like the attached cluster.conf file in /etc/cluster<br>5) Set up your exports: /exports     gss/krb5p(rw,async,fsid=0)<br>6) Start CMAN and RGManager<br>7) ?<br>8) Profit - mount -t nfs4 nfsserver.mydomain:/ /mnt/exports -o sec=krb5p<br>
<br>The trick here is that we change the hostname before any Kerberized services start, so it will be happy when it tries to read the keytab. Also, I use all Script resources instead of the NFS resource. I never really liked it, and I'm old and set in my ways. This works, and I'm certain that it reads /etc/exports. First, we set up the IP, then start each necessary daemon as a dependency for the next. I've been bouncing the service back and forth for the last 10 minutes and only suffering from a complaint of a stale NFS mount on my client whenever I failover.<br>
<br><?xml version="1.0"?><br><cluster config_version="2" name="NFS"><br>        <fence_daemon post_fail_delay="0" post_join_delay="3"/><br>        <clusternodes><br>
                <clusternode name="node1.mydomain" nodeid="1" votes="1"><br>                        <fence><br>                                <method name="1"><br>
                                        <device name="Fence_Manual" nodename="node1.mydomain"/><br>                                </method><br>                        </fence><br>                </clusternode><br>
                <clusternode name="node2.mydomain" nodeid="2" votes="1"><br>                        <fence><br>                                <method name="1"><br>
                                        <device name="Fence_Manual" nodename="node2.mydomain"/><br>                                </method><br>                        </fence><br>                </clusternode><br>
        </clusternodes><br>        <cman expected_votes="1" two_node="1"/><br>        <fencedevices><br>                <fencedevice agent="fence_manual" name="Fence_Manual"/><br>
        </fencedevices><br>        <rm><br>                <failoverdomains><br>                        <failoverdomain name="NFS" ordered="0" restricted="1"><br>                                <failoverdomainnode name="node1.mydomain" priority="1"/><br>
                                <failoverdomainnode name="node2.mydomain" priority="1"/><br>                        </failoverdomain><br>                </failoverdomains><br>                <resources><br>
                        <ip address="192.168.0.73" monitor_link="1"/><br>                        <script file="/etc/init.d/portmap" name="Portmapper"/><br>                        <script file="/etc/init.d/rpcgssd" name="RPCGSSD"/><br>
                        <script file="/etc/init.d/rpcidmapd" name="IDMAPD"/><br>                        <script file="/etc/init.d/nfs" name="NFS"/><br>                </resources><br>
                <service autostart="1" domain="NFS" name="NFS" recovery="relocate"><br>                        <ip ref="192.168.0.73"><br>                                <script ref="Portmapper"><br>
                                        <script ref="RPCGSSD"><br>                                                <script ref="IDMAPD"><br>                                                        <script ref="NFS"/><br>
                                                </script><br>                                        </script><br>                                </script><br>                        </ip><br>                </service><br>
        </rm><br></cluster><br><br><div class="gmail_quote">On Wed, Apr 6, 2011 at 6:52 PM, Ian Hayes <span dir="ltr"><<a href="mailto:cthulhucalling@gmail.com">cthulhucalling@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;"><p>Shouldnt have to recompile rpc.gssd. On failover I migrated the ip address first, made portmapper a depend on the ip, rpc.gssd depend on portmap and nfsd depend on rpc. As for the hostname, I went with the inelegant solution of putting a 'hostname' command in the start functions of the portmapper script since that fires first in my config.</p>


<p></p><blockquote type="cite"><div class="im">On Apr 6, 2011 6:06 PM, "Daniel R. Gore" <<a href="mailto:danielgore@yaktech.com" target="_blank">danielgore@yaktech.com</a>> wrote:<br><br>I also found this thread, after many searches.<br>


<a href="http://linux-nfs.org/pipermail/nfsv4/2009-April/010583.html" target="_blank">http://linux-nfs.org/pipermail/nfsv4/2009-April/010583.html</a><br>
<br>
As I read through it, there appears to be a patch for rpc.gssd which<br>
allows for the daemon to be started and associated with multiple hosts.<br>
I do not want to compile rpc.gssd and it appears the patch is from over<br>
two years ago.  I would hope that RHEL6 would have rpc.gssd patched to<br>
meet this requirement, but no documentation appear to exist for how to<br>
use it.<br>
</div><p><font color="#500050"><div class="im"><br> <br><br>On Wed, 2011-04-06 at 20:23 -0400, Daniel R. Gore wrote:<br>> Ian,<br>> <br>> Thanks for the info.  <br>> <br></div>>...</font></p></blockquote>
</blockquote></div><br>