From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.3 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,NICE_REPLY_A,SPF_HELO_NONE, SPF_PASS,USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 3B58CC43465 for ; Mon, 21 Sep 2020 15:48:44 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id DE65E20EDD for ; Mon, 21 Sep 2020 15:48:43 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726611AbgIUPsn (ORCPT ); Mon, 21 Sep 2020 11:48:43 -0400 Received: from cerberus.halldom.com ([79.135.97.241]:38361 "EHLO cerberus.halldom.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727654AbgIUPsn (ORCPT ); Mon, 21 Sep 2020 11:48:43 -0400 X-Greylist: delayed 4126 seconds by postgrey-1.27 at vger.kernel.org; Mon, 21 Sep 2020 11:48:43 EDT Received: from ceres.halldom.com ([79.135.97.244]:56248) by cerberus.halldom.com with esmtpsa (TLS1.3) tls TLS_AES_128_GCM_SHA256 (Exim 4.94) (envelope-from ) id 1kKMyw-0001cU-C4 for linux-nfs@vger.kernel.org; Mon, 21 Sep 2020 15:39:54 +0100 Subject: Re: mount.nfs4 and logging To: linux-nfs@vger.kernel.org References: <20200919163353.GA15785@fieldses.org> <20200919164020.GB15785@fieldses.org> <12298172-f830-4f22-8612-dfbbc74b8a40@gmch.uk> <20200920193245.GC28449@fieldses.org> From: Chris Hall Message-ID: Date: Mon, 21 Sep 2020 15:40:01 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:68.0) Gecko/20100101 Thunderbird/68.12.0 MIME-Version: 1.0 In-Reply-To: <20200920193245.GC28449@fieldses.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-GB Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-nfs@vger.kernel.org On 20/09/2020 20:32, J. Bruce Fields wrote: > On Sun, Sep 20, 2020 at 10:56:28AM +0100, Chris Hall wrote: ... >> Where nfsdcld, rpc.idmapd and rpc.mountd have indeed been started >> but are not bound to any ports. > That looks good. (And rpc.mountd does still serve a purpose in the > NFSv4 case, answering requests from the kernel for information related > to exported filesystems.) >> But rpc.statd and rpcbind have also been started, and various ports >> have been opened, including port 111 which is bound to systemd. Is >> there a way to inhibit that for nfs4 only ? > Unlike rpc.mountd, there's no reason for those to be running at all. > You can mask thoe corresponding systemd units. I tried masking all of: rpcbind.socket, rpcbind.service, statd.service and statd-notify.service. systemctl start nfs-server.service (eventually) gives, according to the logging: nfs-mountd.service: start operation timed out. Terminating. nfs-mountd.service: State 'stop-sigterm' timed out. Killing. nfs-mountd.service: Killing process x (rpc.mountd) with signal SIGKILL. nfs-mountd.service: Control process exited, code=killed, status=9/KILL If I unmask rpcbind.service, I can start nfs-server. It no longer starts rpc.statd. But I still have rpcbind running and port 111 open. > It'd be nice if there was a way to make that happen automatically if v2 > and v3 are configured out in the configuration files, but I don't know > how to make that happen. It would and me neither. Thanks, Chris