From: Karel Zak <kzak@redhat.com>
To: Chuck Lever <chuck.lever@oracle.com>
Cc: util-linux-ng@vger.kernel.org
Subject: Re: NFS remount bug
Date: Fri, 22 Oct 2010 22:57:27 +0200 [thread overview]
Message-ID: <20101022205726.GE1730@nb.net.home> (raw)
In-Reply-To: <9706D446-5B62-42FC-A3D7-23046AB96822@oracle.com>
On Fri, Oct 22, 2010 at 04:14:53PM -0400, Chuck Lever wrote:
> This is documented in
>
> https://bugzilla.linux-nfs.org/show_bug.cgi?id=188
>
> There are some interesting test results posted there.
>
> This looks like behavior that is totally controlled by mount(8),
> since mount(8) passes the correct options to mount.nfs in some
> cases, and sometimes it doesn't.
Yes (but it does not mean that you cannot read the original options
from mtab in mount.nfs).
> If the mount point is not already in /etc/fstab, and the remount
> command line does not include the "device" (it looks like "mount -o
> remount,foo /mntdir") then it gets it right (that is, it adds the
> correct set of mount options back to /etc/mtab). Other combinations
> don't get it right.
>
> Is there a reason why the set of mount options that appear in
> /etc/mtab should be different depending on how the remount command
> is specified and whether the mount point appears in /etc/fstab? Any
> chance this can be made to work consistently in each of these cases?
>
> Thanks for any advice, or history lessons.
This is old and documented behaviour. There is not a difference
between remount and normal mount.
# mount <source> <target>
means that you want to bypass fstab (mount(8) has all necessary
information on command line), but
# mount <source> | <target>
means that you have to use fstab (command line does not contain all
information).
If fstab does not contain <source> or <target> then it lookups mtab,
it's was probably added because
# mount /dev/sda1 /mnt
# mount -o remount,ro /mnt
is expected to work independently on fstab.
I see only one problem -- many many years ago there probably wasn't
difference between mount options in fstab and mtab, so it was correct
to lookup fstab before mtab on remount. This is problem now.
IMHO mount(8) should be fixed to read mount options only from mtab
on remount. The fstab file should be ignore at all.
Karel
--
Karel Zak <kzak@redhat.com>
http://karelzak.blogspot.com
prev parent reply other threads:[~2010-10-22 20:57 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-10-19 17:32 NFS remount bug Chuck Lever
2010-10-22 20:14 ` Chuck Lever
2010-10-22 20:57 ` Karel Zak [this message]
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=20101022205726.GE1730@nb.net.home \
--to=kzak@redhat.com \
--cc=chuck.lever@oracle.com \
--cc=util-linux-ng@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.