On 07/22/2013 12:50 PM, J. R. Okajima wrote:
> I think I could see the scenario.
> 
> - on wheezy, /etc/mtab becomes a symlink to /proc/mounts.
> - mount.nfs writes the given mount options to /etc/mtab, (but not to
>   /proc/mounts.)
> - I found the problematic option is "sec=sys".
> - when /etc/mtab is a regular file, "sec=sys" is not written since it
>   was not specified explicitly at the mount-time.
> - but /proc/mounts always shows "sec=".
> - when /etc/mtab is a symlink, mount(8) retrives the option strings from
>   /proc/mounts including "sec=sys" and passes it to mount.nfs.
> - NFS in kernel-space parses the given options, compares them with the
>   internally stored flags, and found that
>   + "sec=sys" is given explicitly.
>   + but the internal status doesn't have "sec=sys" flag set.
> - finally this un-matching is the cause of "mount.nfs: mount(2): Invalid
>   argument."
> 
> In order to fix the problem, there may exist several ways. But I am not
> sure which is best.
> - stop /etc/mtab symlink-ing /proc/mounts (by Debian developers).
> - at the mount-time of NFS, set "sec=sys" (NFS_MOUNT_SECFLAVOUR) by
>   default (by NFS developers).
> - mount.nfs always writes the "sec=sys" string (by mount.nfs
>   developers).
> 
> I suppose the best way should be decided after the discussion between
> NFS developers, mount.nfs developers and Debian developers.

Interesting.  I can confirm that the problem does happen on a test
wheezy instance using sec=sys with /etc/mtab symlinked to /proc/mounts,
and that it does *not* happen on a wheezy instance (also with the
/etc/mtab→/proc/mounts symlink) using sec=krb5p.

This suggests to me that it might be a bug in the way that sec=sys in
particular is handled by the NFS tools.

        --dkg

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to