linux-nfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Chuck Lever <chuck.lever@oracle.com>
To: Steve Dickson <SteveD@redhat.com>
Cc: Jeff Layton <jlayton@redhat.com>,
	Trond Myklebust <Trond.Myklebust@netapp.com>,
	Linux NFS Mailing List <linux-nfs@vger.kernel.org>
Subject: Re: whither NFS umount?
Date: Mon, 18 Oct 2010 11:18:55 -0400	[thread overview]
Message-ID: <7FF47D63-DC22-4EC5-B6D1-0CD9A128AC1F@oracle.com> (raw)
In-Reply-To: <4CB8B4BC.7070800@RedHat.com>

Happy Monday...

On Oct 15, 2010, at 4:08 PM, Steve Dickson wrote:

> On 10/15/2010 12:00 PM, Chuck Lever wrote:
>> On Oct 15, 2010, at 9:11 AM, Steve Dickson wrote:
>> The options in /proc/mounts worked at one point in time, but /etc/mtab 
>> has the options that are probably used every time you do the mount.  
>> They are basically copied from /etc/fstab or the command line.  So we know
>> that, no matter what the server does, the /etc/mtab options are tested and
>> known to allow the client to negotiate the correct settings.
>> 
>>> Now that there is a real possibly that /etc/mtab could deprecated,
>>> I think we should start looking into making the info in /proc/mounts 
>>> work, since /proc/mounts not going anywhere... 
>> 
>> Again, I agree /etc/mtab should be deprecated, but we must not use 
>> /proc/mounts for this purpose.  Save the original mount options and 
>> use them for the umount.  That way the negotiation behavior of the MNT 
>> and the behavior of the UMNT follow exactly the same rules.
> As I've said, we already do use /proc/mounts which is fine.. IMHO.. 

The "fallback to /proc/mounts case" breaks UMNT in exactly the ways I've described.

umount.nfs will use /proc/mounts as a fallback because, without /etc/mtab, that's the only way it can match a mount point directory on the client with the file server name and export information.  However, the mount options can still be incorrect, just as I have described.  Thus this fallback is weak to worthless for sending UMNT (it will get the local umount(2) call right, but that's all that truly matters for the client, anyway).

Using /proc/mounts as a substitute for /etc/mtab works fine for a vast majority of Linux file systems, because during an unmount, they don't care what the mount options were.  They just need to know what device is associated with the mount point being unmounted.

Unfortunately for us, NFS does care about those mount options, and uses /etc/mtab in a way that most other file systems do not.  Yet another reason why no-one else but us chickens cares that a remount can rewrite mount options in /etc/mtab at whim.

>> Let's just write these options to another place besides /etc/mtab, 
>> and read them from that place during unmount.  The only change I'm 
>> talking about is putting a second copy of these options on disk somewhere.
>> 
> I don't think I'm a fan of creating yet another non-scalable
> list we need to maintain.. but that's for another day.. if/when
> /etc/mtab goes away.. 
> 
> For now, I agree with you, lets keep using /etc/mtab to 
> maintain the original options...  

We have to do something now to address this remount bug.  I'm going to code up a patch that stores the mount command line somewhere under /var/run.

Plus, as you have said, /etc/mtab is destined to be removed; has been for some time.  We will have to do this at some point anyway.

-- 
chuck[dot]lever[at]oracle[dot]com





  reply	other threads:[~2010-10-18 15:19 UTC|newest]

Thread overview: 36+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-10-12 16:29 whither NFS umount? Chuck Lever
2010-10-12 17:04 ` Trond Myklebust
     [not found]   ` <1286903046.24878.13.camel-rJ7iovZKK19ZJLDQqaL3InhyD016LWXt@public.gmane.org>
2010-10-12 17:57     ` Chuck Lever
2010-10-12 19:18       ` Jeff Layton
2010-10-12 19:44         ` Trond Myklebust
2010-10-12 19:52           ` Jeff Layton
2010-10-12 19:59             ` Chuck Lever
2010-10-12 20:21             ` Trond Myklebust
2010-10-12 20:26               ` Jeff Layton
2010-10-12 20:34                 ` Chuck Lever
2010-10-12 20:50                   ` Jeff Layton
2010-10-12 21:19                     ` Chuck Lever
2010-10-13  1:00                       ` Jeff Layton
2010-10-13 17:40           ` Steve Dickson
2010-10-13 18:13             ` Jeff Layton
2010-10-13 18:45               ` Steve Dickson
     [not found]                 ` <4CB5FE65.3090409-AfCzQyP5zfLQT0dZR+AlfA@public.gmane.org>
2010-10-13 18:56                   ` Jeff Layton
2010-10-13 18:58                     ` Jeff Layton
     [not found]                     ` <20101013145601.468acc2a-4QP7MXygkU+dMjc06nkz3ljfA9RmPOcC@public.gmane.org>
2010-10-13 19:31                       ` Steve Dickson
2010-10-13 20:47                         ` Chuck Lever
2010-10-13 23:19                           ` Steve Dickson
2010-10-14 15:29                             ` Chuck Lever
2010-10-14 18:27                               ` Steve Dickson
2010-10-14 19:13                                 ` Chuck Lever
2010-10-14 21:24                                   ` Steve Dickson
2010-10-14 22:22                                     ` Chuck Lever
2010-10-15 13:11                                       ` Steve Dickson
2010-10-15 13:41                                         ` Jeff Layton
2010-10-15 16:00                                         ` Chuck Lever
2010-10-15 20:08                                           ` Steve Dickson
2010-10-18 15:18                                             ` Chuck Lever [this message]
2010-10-13 18:18             ` Trond Myklebust
2010-10-13 19:28               ` Steve Dickson
2010-10-14 14:00                 ` J. Bruce Fields
2010-10-14 14:17                   ` Trond Myklebust
     [not found]                     ` <1287065841.3015.233.camel-rJ7iovZKK19ZJLDQqaL3InhyD016LWXt@public.gmane.org>
2010-10-14 14:34                       ` J. Bruce Fields

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=7FF47D63-DC22-4EC5-B6D1-0CD9A128AC1F@oracle.com \
    --to=chuck.lever@oracle.com \
    --cc=SteveD@redhat.com \
    --cc=Trond.Myklebust@netapp.com \
    --cc=jlayton@redhat.com \
    --cc=linux-nfs@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).