Re: NFS remount bug

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxx>
 http://karelzak.blogspot.com
--
To unsubscribe from this list: send the line "unsubscribe util-linux-ng" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Netdev]     [Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux