Hey Guy's,

Wondering if there is a way to setup an HA NFSv4 server using HAPROXY and keepalived or if anyone tried that doesn't result in the client disconnecting with this error even when using the VIP through a basic HAPROXY + keepalived config:

[root@ipaclient01 ~]# cd /n
-bash: cd: /n: Stale file handle
[root@ipaclient01 ~]#

is the result when using the VIP while failing the active node.            nfs-c01 (nfs01, nfs02)  VIP           nfs01           nfs02

My google searches might be lacking as I don't get many results on this topic.

Looking for an example I could bounce off of.  My trial config is below:

[root@nfs01 haproxy]# cat haproxy.cfg|grep -v "#"

    log local2

    chroot      /var/lib/haproxy
    pidfile     /var/run/haproxy.pid
    maxconn     4000
    user        haproxy
    group       haproxy

    stats socket /var/lib/haproxy/stats

    mode                    http
    log                     global
    option                  httplog
    option                  dontlognull
    option http-server-close
    option forwardfor       except
    option                  redispatch
    retries                 3
    timeout http-request    10s
    timeout queue           1m
    timeout connect         10s
    timeout client          1m
    timeout server          1m
    timeout http-keep-alive 10s
    timeout check           10s
    maxconn                 3000

frontend  main *:80
acl url_static path_beg -i /static /images /javascript /stylesheets
    acl url_static       path_end       -i .jpg .gif .png .css .js

    default_backend             app

backend static
    balance     roundrobin
    server      static check

backend app
    balance     roundrobin
    server nfs01.nix.dom.loc check
    server nfs02.nix.dom.loc check
[root@nfs01 haproxy]#
[root@nfs01 haproxy]#
[root@nfs01 haproxy]#
[root@nfs01 haproxy]# cat /etc/keepalived/keepalived.conf
vrrp_script chk_haproxy {
  script "killall -0 haproxy"
  interval 2
  weight 2

vrrp_instance VI_1 {
  interface eth0
  state MASTER
  virtual_router_id 51
  priority 101
  virtual_ipaddress {
  track_script {
[root@nfs01 haproxy]#

In case it's not possible, I'll attempt the pacemaker / corosync method.

Tom K.

Living on earth is expensive, but it includes a free trip around the sun.

Reply via email to