James Yarbrough wrote:
2. Adding a new flag into "exportfs" command, say "h", such that
"exportfs -uh *:/export_path"
would un-export the entry and drop the NLM locks associated with the
entry.
This is fine for releasing the locks, but how do you plan to re-enter
the grace period for reclaiming the locks when you relocate the export?
And how do you intend to segregate the export for which reclaims are
valid from the ones which are not? How do you plan to support the
sending of SM_NOTIFY? This might be where a lockd per export has an
advantage.
Yeah, that's why Peter's idea (different lockd(s)) is also attractive.
However, on the practical side, we don't plan to introduce kernel
patches agressively. The approach is to be away from mainline NLM code
base until we have enough QA cycles to make sure things work. The
unexport part would allow other nfs services on the taken-over server
un-interrupted. On the take-over server side, we currently do a global
grace period. The plan has been to put a little delay before fixing
take-over server's logic due to other NLM/posix lock issues - for
example, the current (linux) NLM doesn't bother to call filesystem's
lock method (which virtually disables any cluster filesystem's NFS
locking across different NFS servers). However, if we have enough
resources and/or volunteers, we may do these things in parallel. The
following are planned:
Take-over server logic:
1. setup the statd sm file (currently /var/lib/nfs/statd/sm or the
equivalent configured directory) properly.
2. rpc.statd is dispatched with "--ha-callout" option.
3. implement the ha-callout user mode program to create a seperate
statd sm files for each exported ip.
4. export the target filesystem and set up grace period based on
fsid (or devno). It will be used in NLM procedure calls by
extracting the fsid (or devno) from nfs file handle to decide
accepting or reject the not-reclaiming requests.
5. bring up the failover IP address.
6. send SM_NOTIFY to client machines using the configured sm
directory created by the ha-callout program (rpc.statd -N -P).
Step 4 will be the counter-part of our unexport flag.
-- Wendy
--
Linux-cluster@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/linux-cluster