Bug#1022172: Bug#1024082: Bug#1022172: Bug#1024082: Bug#1022172: /lib/modprobe.d/50-nfs.conf causes initramfs-tools to stop including sunrpc module for nfs
Hi Marco, On Mon, Nov 14, 2022 at 07:06:30PM +0100, Marco d'Itri wrote: > > Try something like this in /lib/udev/rules.d/60-nfs.rules: > > ACTION=="add", SUBSYSTEM=="module", KERNEL=="sunrpc", \ > RUN+="/sbin/sysctl -q --pattern ^sunrpc --system" > ACTION=="add", SUBSYSTEM=="module", KERNEL=="rpcrdma", \ > RUN+="/sbin/sysctl -q --pattern ^sunrpc.svc_rdma --system" > ACTION=="add", SUBSYSTEM=="module", KERNEL=="lockd", \ > RUN+="/sbin/sysctl -q --pattern ^fs.nfs.n[sl]m --system" > ACTION=="add", SUBSYSTEM=="module", KERNEL=="nfsv4", \ > RUN+="/sbin/sysctl -q --pattern > ^fs.nfs.(nfs_callback_tcpport|idmap_cache_timeout) --system" > ACTION=="add", SUBSYSTEM=="module", KERNEL=="nfs", \ > RUN+="/sbin/sysctl -q --pattern ^fs.nfs --system" > > Differently from the original file I tired anchoring the patterns, which > looks more correct to me. I have posted the patch(es) upstream implementing your proposal at https://lore.kernel.org/linux-nfs/20221125130725.1977606-1-car...@debian.org/T/ . Regards, Salvatore
Bug#1022172: Bug#1024082: Bug#1022172: /lib/modprobe.d/50-nfs.conf causes initramfs-tools to stop including sunrpc module for nfs
On Tue, Nov 15, 2022 at 10:00:43PM +0100, Salvatore Bonaccorso wrote: Hi, > > Try something like this in /lib/udev/rules.d/60-nfs.rules: > > > > ACTION=="add", SUBSYSTEM=="module", KERNEL=="sunrpc", \ > > RUN+="/sbin/sysctl -q --pattern ^sunrpc --system" > > ACTION=="add", SUBSYSTEM=="module", KERNEL=="rpcrdma", \ > > RUN+="/sbin/sysctl -q --pattern ^sunrpc.svc_rdma --system" > > ACTION=="add", SUBSYSTEM=="module", KERNEL=="lockd", \ > > RUN+="/sbin/sysctl -q --pattern ^fs.nfs.n[sl]m --system" > > ACTION=="add", SUBSYSTEM=="module", KERNEL=="nfsv4", \ > > RUN+="/sbin/sysctl -q --pattern > > ^fs.nfs.(nfs_callback_tcpport|idmap_cache_timeout) --system" > > ACTION=="add", SUBSYSTEM=="module", KERNEL=="nfs", \ > > RUN+="/sbin/sysctl -q --pattern ^fs.nfs --system" > > > > Differently from the original file I tired anchoring the patterns, which > > looks more correct to me. > > Thanks, I will try to test this and bring to nfs-utils upstream. > Michael or Andras, if you can help testing it in your use cases that > would be helpful. I don't have a real world test case for this; I don't set any of those sysctls. Incidentally, busybox sysctl doesn't support --pattern, so if this functionality is important, nfs-kernel-server needs to force inclusion of the "big" /sbin/sysctl in the initramfs. AndrĂ¡s -- To understand recursion, we must first understand recursion.
Bug#1022172: Bug#1024082: Bug#1022172: /lib/modprobe.d/50-nfs.conf causes initramfs-tools to stop including sunrpc module for nfs
Hi Marco, On Mon, Nov 14, 2022 at 07:06:30PM +0100, Marco d'Itri wrote: > > Try something like this in /lib/udev/rules.d/60-nfs.rules: > > ACTION=="add", SUBSYSTEM=="module", KERNEL=="sunrpc", \ > RUN+="/sbin/sysctl -q --pattern ^sunrpc --system" > ACTION=="add", SUBSYSTEM=="module", KERNEL=="rpcrdma", \ > RUN+="/sbin/sysctl -q --pattern ^sunrpc.svc_rdma --system" > ACTION=="add", SUBSYSTEM=="module", KERNEL=="lockd", \ > RUN+="/sbin/sysctl -q --pattern ^fs.nfs.n[sl]m --system" > ACTION=="add", SUBSYSTEM=="module", KERNEL=="nfsv4", \ > RUN+="/sbin/sysctl -q --pattern > ^fs.nfs.(nfs_callback_tcpport|idmap_cache_timeout) --system" > ACTION=="add", SUBSYSTEM=="module", KERNEL=="nfs", \ > RUN+="/sbin/sysctl -q --pattern ^fs.nfs --system" > > Differently from the original file I tired anchoring the patterns, which > looks more correct to me. Thanks, I will try to test this and bring to nfs-utils upstream. Michael or Andras, if you can help testing it in your use cases that would be helpful. Regards, Salvatore
Bug#1022172: Bug#1024082: Bug#1022172: /lib/modprobe.d/50-nfs.conf causes initramfs-tools to stop including sunrpc module for nfs
Try something like this in /lib/udev/rules.d/60-nfs.rules: ACTION=="add", SUBSYSTEM=="module", KERNEL=="sunrpc", \ RUN+="/sbin/sysctl -q --pattern ^sunrpc --system" ACTION=="add", SUBSYSTEM=="module", KERNEL=="rpcrdma", \ RUN+="/sbin/sysctl -q --pattern ^sunrpc.svc_rdma --system" ACTION=="add", SUBSYSTEM=="module", KERNEL=="lockd", \ RUN+="/sbin/sysctl -q --pattern ^fs.nfs.n[sl]m --system" ACTION=="add", SUBSYSTEM=="module", KERNEL=="nfsv4", \ RUN+="/sbin/sysctl -q --pattern ^fs.nfs.(nfs_callback_tcpport|idmap_cache_timeout) --system" ACTION=="add", SUBSYSTEM=="module", KERNEL=="nfs", \ RUN+="/sbin/sysctl -q --pattern ^fs.nfs --system" Differently from the original file I tired anchoring the patterns, which looks more correct to me. -- ciao, Marco signature.asc Description: PGP signature
Bug#1022172: Bug#1024082: Bug#1022172: /lib/modprobe.d/50-nfs.conf causes initramfs-tools to stop including sunrpc module for nfs
Control: tags 1024082 + upstream Control: forwarded 1024082 https://lore.kernel.org/linux-nfs/y1kokwu88pulc...@eldamar.lan/ On Mon, Nov 14, 2022 at 03:45:42PM +0100, Marco d'Itri wrote: > On Nov 14, Michael Prokop wrote: > > > FYI: I reported this one as #1024082, looks like the new > > /lib/modprobe.d/50-nfs.conf file is causing quite some problems. > At this point we have established that for good or for worse kmod is > behaving as documented, so we are down to one of: > > - initramfs-tools learns to parse the install directives > - nfs-kernel-server uses udev rules instead > > I recommend the second option, which is much more general and robust. FWIW, I asked a while back upstream about it, and they would be open to change this. https://lore.kernel.org/linux-nfs/y1kokwu88pulc...@eldamar.lan/ and https://lore.kernel.org/linux-nfs/166656275785.12462.14027406790454668...@noble.neil.brown.name/ But it needs someone who is implementing the change and submits it upstream. Michael, would you be able to work on this and submit the change upstream? Once accepted there we can happily cherry pick it for us. We should not diverge to much from upstream at this point, this was exactly one of the problems that nfs-utils remained for ages at an ancient 1.3.4 based version. Now we have reduced the delta massively, which helps keeping on track with upstream versions. Regards, Salvatore