[Pacemaker] Patch: use NFSv4 with RA nfsserver
Vogt Josef
Josef.Vogt at telecom.li
Wed Dec 28 10:35:04 UTC 2011
On Tue, Dec 27, 2011 at 3:30 PM, Vogt Josef <Josef.Vogt at telecom.li> wrote:
>> Just a question here: I could't get it to work without setting the gracetime - which isn't set in the exportfs RA. Are you sure this works as expected?
> Thanks, good input. I'd be happy to add that (as in, wait_for_gracetime_on_start or similar). However, can you do me a favor please? Take a look at the discussion archived at http://www.spinics.net/lists/linux-nfs/msg22670.html and let me know if nlm_grace_period (as mentioned in
http://www.spinics.net/lists/linux-nfs/msg22737.html) made any difference?
Yes, that did the trick. /proc/sys/fs/nfs/nlm_grace_period is not needed for NFSv4 so I just set it to a very small value.
The problem is this: When using boht, NFSv2/NFSv3 and NFSv4, in case of a failover a v4 client could get a new lock on a locked file by a v2/v3 client before the v2/v3 client has a chance to reclaim its lock... Thats why we have to wait the whole 90 seconds (nlm_grace_period).
The other two values (leasetime and gracetime) need to be small (which means higher load but faster failover). As far as I understand it, you would have to wait just until the bigger of /proc/fs/nfsd/nfsv4leastime and /proc/fs/nfsd/nfsv4gracetime is reached.
Note: when you set this values manually, they are gone after you boot the machine.
That's why I made sure in a case of failover, these values are set properly.
I guess it would not be so easy to use NFSv4 and NFSv2/NFSv3 at the same time. On the other hand: Setting all this 3 values mentioned above to 10 should be save.
I found this thread very helpful:
http://marc.info/?l=linux-nfs&m=131590701830261&w=2
Kind regards
Josef
More information about the Pacemaker
mailing list