Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp1198196pxb; Thu, 4 Mar 2021 06:01:18 -0800 (PST) X-Google-Smtp-Source: ABdhPJzku0mEr/Lqq0VrnHRPEAiCwyBg7LmIQ00qKQlLlzxGs1WBIM3vUMgyroXm1RmqrbEeFhre X-Received: by 2002:a17:906:f0d0:: with SMTP id dk16mr4493162ejb.48.1614866478191; Thu, 04 Mar 2021 06:01:18 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1614866478; cv=none; d=google.com; s=arc-20160816; b=VmBU+SfwP5w3On3Iw30b3MgaudbbMbWWwd99+XYdUFELUiyRPGv4CzvZRnR83csfn2 vSqU2borETIzOCIdZh+p7ttArOxSrLoq0C4V1MXUi3shCjMuUpx3PHx0ABgnyqIdz6NC IjWq3mSPZxdZkjEgxhJfTFoL528+TxYSPWsF5Odnfdgz5bj4QKHTRomW8GNyGQN6Vv0l 0jTdA8w6rRP19Ci+VVwaHDfIKn7/PZeR95jpYJmIgQLenMn55Iqt1kXrob8Yxh3QI6Qe M400dUdLi6Edec0Nn1r5iie9x8iGDTPva3fOJ0fsSMfeh7m9HcaafTaG5ebdwUawoyDK sp5w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject:dkim-signature; bh=5aZpNHDO/X8w5gn+hdH2+/UUIs4Troz4+mS1I12x8jA=; b=mIyua4diiJetRl1gNSQLQqKOnm+zQhbdAiNo55fKKMdLPUyDnKxfpxILF3Klwz9Zw8 tQSdOhyQrfw6j+6J+Zd5wXRjKe66Bpb4bqwaBg7okeT2Js4c3jpVBL5p2ZaKsBgxLOF8 sf1wLkKd3fh157tcDj7g/4C0Y5As9z5YrBm1N+LSE6iiITOB5FUnPQUdHvOZ4SuQGOfA NoSI+I1JSo60ExmOo2zmX7dwVn7YY11DSbxpWdxolYLW5j0mpPkin9AkhJvDlVYWP6qU h908YOFFPl8nd9KLtljCI+oSvt7P228qV5ZMd7i7z2OlbecF1qY47S0AOJ438kM0XTvK fvmA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=C3RpgtAY; spf=pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-nfs-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id m19si15406802eds.451.2021.03.04.06.00.55; Thu, 04 Mar 2021 06:01:18 -0800 (PST) Received-SPF: pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=C3RpgtAY; spf=pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-nfs-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1346642AbhCDA3u (ORCPT + 99 others); Wed, 3 Mar 2021 19:29:50 -0500 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]:49813 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1347139AbhCCVWW (ORCPT ); Wed, 3 Mar 2021 16:22:22 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1614806443; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=5aZpNHDO/X8w5gn+hdH2+/UUIs4Troz4+mS1I12x8jA=; b=C3RpgtAYhApUjB1t5h4WElyGJC5J53dVnRGp96mkqsNEaQGp1L/mdZjZJjR/exiQSxW+u7 wA57VANmKnjP/op70PjDBLC2ucG5IfdU6auqObEc8EaHE8uDbNKRRwDJMS53TR+E1hyQdm JpgpnO54o2CPZRgPeFrx8IgVMkD/QL4= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-28-gy4sFE4-MUypVNC7ncP8sg-1; Wed, 03 Mar 2021 16:20:40 -0500 X-MC-Unique: gy4sFE4-MUypVNC7ncP8sg-1 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 7372A100A8E9; Wed, 3 Mar 2021 21:20:39 +0000 (UTC) Received: from madhat.boston.devel.redhat.com (ovpn-112-45.phx2.redhat.com [10.3.112.45]) by smtp.corp.redhat.com (Postfix) with ESMTP id BEB0E61F49; Wed, 3 Mar 2021 21:20:38 +0000 (UTC) Subject: Re: [PATCH 0/7 V4] The NFSv4 only mounting daemon. To: "J. Bruce Fields" Cc: Linux NFS Mailing list References: <20210219200815.792667-1-steved@redhat.com> <20210224203053.GF11591@fieldses.org> <1553fb2d-9b8e-f8eb-8c72-edcd14a2ad08@RedHat.com> <20210303152342.GA1282@fieldses.org> From: Steve Dickson Message-ID: <376b6b0a-5679-4692-cfdb-b8c7919393a5@RedHat.com> Date: Wed, 3 Mar 2021 16:22:28 -0500 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.8.0 MIME-Version: 1.0 In-Reply-To: <20210303152342.GA1282@fieldses.org> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 Precedence: bulk List-ID: X-Mailing-List: linux-nfs@vger.kernel.org Hey! On 3/3/21 10:23 AM, J. Bruce Fields wrote: > On Tue, Mar 02, 2021 at 05:33:23PM -0500, Steve Dickson wrote: >> >> >> On 2/24/21 3:30 PM, J. Bruce Fields wrote: >>> On Fri, Feb 19, 2021 at 03:08:08PM -0500, Steve Dickson wrote: >>>> nfsv4.exportd is a daemon that will listen for only v4 mount upcalls. >>>> The idea is to allow distros to build a v4 only package >>>> which will have a much smaller footprint than the >>>> entire nfs-utils package. >>>> >>>> exportd uses no RPC code, which means none of the >>>> code or arguments that deal with v3 was ported, >>>> this again, makes the footprint much smaller. >>> >>> How much smaller? >> Will a bit smaller... but a number of daemons like nfsd[cld,clddb,cldnts] >> need to also come a long. > > Could we get some numbers? > > Looks like nfs-utils in F33 is about 1.2M: > > $ rpm -qi nfs-utils|grep ^Size > Size : 1243512 > > $ strip utils/mountd/mountd > $ ls -lh utils/mountd/mountd > -rwxrwxr-x. 1 bfields bfields 128K Mar 3 10:12 utils/mountd/mountd > $ strip utils/exportd/exportd > $ ls -lh utils/exportd/exportd > -rwxrwxr-x. 1 bfields bfields 106K Mar 3 10:12 utils/exportd/exportd > > So replacing mountd by exportd saves us about 20K out of 1.2M. Is it > worth it? In smaller foot print I guess I meant no v3 daemons, esp rpcbind. It is not surprising mountd and exportd are similar size since they are using the same code to do the same thing. With the only exception is exportd does not have any RPC code. It only handles upcalls from the kernel. > >>>> The following options were ported: >>>> * multiple threads >>>> * state-directory-path option >>>> * junction support (not tested) >>>> >>>> The rest of the mountd options were v3 only options. >>> >>> There's also --manage-gids. >> Right... a patch was posted... >> >>> >>> If you want nfsv4-only at runtime, you can always run rpc.mountd with >>> -N2 -N3 to turn off the MOUNT protocol support. >> The end game is not to run mountd at all... >> >>> >>> If you don't even want v2/f3 code on your system, then you may have to >>> do something like this, but why is that important? >> Container friendly... Not bring in all the extra daemons v3 >> needs is a good thing... esp rpcbind. > > Looking at the output of > $ for f in $(rpm -ql nfs-utils); do if [ -f $f ]; then ls -ls $f; fi; done|sort -n > > It looks like removing statd, sm-notify, showount and their man pages > would free about another 170K. And rpcbind and rpcinfo... But thanks for taking a look. > > I think that's about how much we'd save by seperating out a separate > documentation package. hmm... interesting idea. > > I don't know, what sort of gains are container folks asking for? It is my understanding rpcbind and containers do not play nicely. Plus I don't think it is a bad idea to be able just install and nfsv4 client or just install an nfsv4 server. Maybe I'm wrong?? steved. > > --b. > >> >> steved. >> >>> >>> --b. >>> >>>> >>>> V2: >>>> * Added two systemd services: nfsv4-exportd and nfsv4-server >>>> * nfsv4-server starts rpc.nfsd -N 3, so nfs.conf mod not needed. >>>> >>>> V3: Changed the name from exportd to nfsv4.exportd >>>> >>>> V4: Added compile flag that will compile in the NFSv4 only server >>>> >>>> Steve Dickson (7): >>>> exportd: the initial shell of the v4 export support >>>> exportd: Moved cache upcalls routines into libexport.a >>>> exportd: multiple threads >>>> exportd/exportfs: Add the state-directory-path option >>>> exportd: Enabled junction support >>>> exportd: systemd unit files >>>> exportd: Added config variable to compile in the NFSv4 only server. >>>> >>>> .gitignore | 1 + >>>> configure.ac | 14 ++ >>>> nfs.conf | 4 + >>>> support/export/Makefile.am | 3 +- >>>> {utils/mountd => support/export}/auth.c | 4 +- >>>> {utils/mountd => support/export}/cache.c | 46 +++- >>>> support/export/export.h | 34 +++ >>>> {utils/mountd => support/export}/fsloc.c | 0 >>>> {utils/mountd => support/export}/v4root.c | 0 >>>> {utils/mountd => support/include}/fsloc.h | 0 >>>> systemd/Makefile.am | 6 + >>>> systemd/nfs.conf.man | 10 + >>>> systemd/nfsv4-exportd.service | 12 + >>>> systemd/nfsv4-server.service | 31 +++ >>>> utils/Makefile.am | 4 + >>>> utils/exportd/Makefile.am | 65 +++++ >>>> utils/exportd/exportd.c | 276 ++++++++++++++++++++++ >>>> utils/exportd/exportd.man | 81 +++++++ >>>> utils/exportfs/exportfs.c | 21 +- >>>> utils/exportfs/exportfs.man | 7 +- >>>> utils/mountd/Makefile.am | 5 +- >>>> 21 files changed, 606 insertions(+), 18 deletions(-) >>>> rename {utils/mountd => support/export}/auth.c (99%) >>>> rename {utils/mountd => support/export}/cache.c (98%) >>>> create mode 100644 support/export/export.h >>>> rename {utils/mountd => support/export}/fsloc.c (100%) >>>> rename {utils/mountd => support/export}/v4root.c (100%) >>>> rename {utils/mountd => support/include}/fsloc.h (100%) >>>> create mode 100644 systemd/nfsv4-exportd.service >>>> create mode 100644 systemd/nfsv4-server.service >>>> create mode 100644 utils/exportd/Makefile.am >>>> create mode 100644 utils/exportd/exportd.c >>>> create mode 100644 utils/exportd/exportd.man >>>> >>>> -- >>>> 2.29.2 >>> >