Date: Mon, 31 Oct 2011 20:23:42 +0100 From: Dimitry Andric <dim@FreeBSD.org> To: rc@FreeBSD.org Subject: An issue with nfsv4_server_enable=YES and /etc/rc.d/nfsd Message-ID: <4EAEF5BE.7060406@FreeBSD.org>
next in thread | raw e-mail | index | archive | help
This is a multi-part message in MIME format. --------------070507030101080807010708 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Hi, I recently experimented a bit with enabling NFSv4 on one of my -current boxes. While it worked fine eventually, I ran into a little snag: Whenever you boot up your machine with nfsv4_server_enable=NO in rc.conf, the /etc/rc.d/nfsd script sets vfs.nfsd.server_max_nfsvers to 3. Then, when you set nfsv4_server_enable=YES, and restart nfsd via the rc.d script, the sysctl does *not* get reset to max version 4, so NFSv4 still doesn't work! Obviously, if you just reboot the machine, it will get reset to its default value of 4 again, but it should not really be needed, just to change this setting, right? So I propose the attached patch, which resets server_max_nfsvers to 4, whenever you set nfsv4_server_enable=YES in rc.conf. I also added resetting of the nfs_privport sysctls, since this has the same issue: nfs_reserved_port_only=YES sets the nfs_privport sysctl to 1, but in the other case, the sysctl doesn't get reset to 0. Is this OK to commit? Would also be nice to have in 9.0, I think. P.S.: This looked good to rmacklem@. --------------070507030101080807010708--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4EAEF5BE.7060406>