问题原文
原帖链接 · user2294468 · CC BY-SA 4.0
As I read from NFSv4 recovery process, client also held states and can help in rebuilding the NFS state in case NFS server crashes. I am trying to build a active-passive NFS HA using drbd. Do I need to still share the /var/lib/nfs/ folder on drbd between NFS-Servers?
I tried a simple setup. A single NFS-Client and two NFS-Server. Even without sharing the folder, NFS-Client is able to start the recovery process and after end of grace period NFS-Server and NFS-Client are able to do IO.
已采纳解答
原帖链接 · kofemann · CC BY-SA 4.0
The NFS server uses /var/lib/nfs directory to keep the recovery information that is used after the server is rebooted or crashed. When the server comes back, then, if the recovery directory is not empty, it enters into a GRACE PERIOD, that will allow previously recorded clients to reclaim their open states and locks.
https://datatracker.ietf.org/doc/html/rfc5661#section-5.8.1.14
If you want to be nice to the nfs clients and allow them to reclaim open files and locks before some other client locks them, then you should share the /var/lib/nfs as well.
If you have read-only exports and no locking is involved, then you can probably ignore it.
摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。
