How to set-up reliable NFS server

Discussion in 'General Server' started by MitchL, Dec 9, 2013.

  1. MitchL

    MitchL New Member

    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    1
    We have 2 server machines (Server1, Server2), they backup each other using keepalived. We have NFS servers (nfs-kernel-server) running on each of servers.
    We have a client PC which mounts NFS share like this:
    Code:
    192.168.16.166:/var/acsd on /misc/acsd type nfs4 (rw,relatime,vers=4.0,rsize=1048576,wsize=1048576,namlen=255,hard,proto=tcp,port=0,timeo=1200,retrans=2,sec=sys,clientaddr=192.168.26.67,local_lock=none,addr=192.168.16.166)
    192.168.16.166 - is a keepalived interface for both servers.
    When we shut down Server1 - NFS mounting breaks like this:
    Code:
    ls: cannot open directory .: Stale NFS file handle
    If we remount just after this - everything works ok, I can see files from Server2. Something breaks when keepalived switches servers.
    Is there a way to fix that?

  2. grim76

    grim76 Active Member Staff Writer

    Messages:
    177
    Likes Received:
    48
    Trophy Points:
    28
    You need to export the location with the fsid option. Once you do that and remount it things should fail over properly. Make sure that since you are using NFSv4 not to use the fsid=0.

Share This Page