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.

192.168.0.80            nfs-c01 (nfs01, nfs02)  VIP
192.168.0.131           nfs01
192.168.0.119           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 "#"

global
    log         127.0.0.1 local2

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

    stats socket /var/lib/haproxy/stats

defaults
    mode                    http
    log                     global
    option                  httplog
    option                  dontlognull
    option http-server-close
    option forwardfor       except 127.0.0.0/8
    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 127.0.0.1:4331 check

backend app
    balance     roundrobin
    server nfs01.nix.dom.loc    192.168.0.131:80 check
    server nfs02.nix.dom.loc    192.168.0.119:80 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 {
    192.168.0.80
  }
  track_script {
    chk_haproxy
  }
}
[root@nfs01 haproxy]#

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

--
Cheers,
Tom K.
-------------------------------------------------------------------------------------

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



Reply via email to