大网数据广告活动
服务器运维问答

Do we need to share /var/lib/nfs for NFSv4 recovery process?

· 52CE 我爱测

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/nf…

问题原文

原帖链接 · 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.

摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。

资料来源与适用范围

资料来源
Server Fault
适用范围
以原帖系统、软件版本与发布日期为准(2024-03-04)
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY-SA 4.0

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。