From mboxrd@z Thu Jan 1 00:00:00 1970 From: Wendy Cheng Date: Mon, 07 Aug 2006 18:38:00 -0400 Subject: [Cluster-devel] Re: [NFS] [PATCH 0/3] NLM lock failover In-Reply-To: <17617.30732.643539.353696@cse.unsw.edu.au> References: <44A41246.2070106@redhat.com> <1154397341.3378.10.camel@localhost.localdomain> <17617.30732.643539.353696@cse.unsw.edu.au> Message-ID: <44D7C0C8.3050403@redhat.com> List-Id: To: cluster-devel.redhat.com MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Neil Brown wrote > >This patch makes an assumption that any given filehandle will only arrive at >one particular interface - never more. This is implicit in the fact >that f_iaddr is stored in 'struct nlm_file' which is indexed by >filehandle. > >In the case where you are intending to support active-active failover >this is should be the case, but obviously configuration errors are >possible. > >I think what I would like is that if requests arrive at two (or more) >different interfaces for the one file, then f_iaddr is cleared and some >flag is set. >When an IP is written to nlm_unlock, if the flag is set, then a >warning message is printer > Note: some files access via multiple interfaces will not be > unlocked. > > Have given this issue a long thought during the weekend. The suggested changes will work but so is "fsid" approach. I prefer "fsid" because it is simpler to implement and very effective. The problem with this approach is that it is a little bit awkward to explain - I don't believe it is well-understand (or even aware of ) by most of the system admin(s). We may need a good write-up for the procedures. It, however, effectively handles the issues associated with an export entry getting accessed by multiple virtual ip interfaces. The test runs (with fsid) today have been encouraging. Will push the revised patches for review as soon as they pass some sanity checks and testings. However, the following is the main changes made by this new implementation: First, it is required to export the filesystem using "fsid"; e.g. "export *:/mnt/tank1 (fsid=9468,rw) ". Patch 1: Drop the locks based on fsid; e.g. "echo 9468 > /proc/fs/nfsd/nlm_unlock" Patch 2: Set individual grace period based on fsid "echo 9468 > /proc/fs/nfsd/nlm_set_igrace" Patch 3: Utility functions to allow cluster suite (or system admin) to implement its own client reclaim notifications. Unfortunately, it is too cumbersome to switch Patch 3 using fsid. So the old trick stays (we still use server ip to facilitate the client reclaim notification process). In the mean time, the following is how I yank the fsid out of file handle. Send it here for preview purpose. If anyone spots anything wrong, please do let me know. This will be the "guts" of this whole thing: -- Wendy -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: fsid_from_fh.txt URL: