Received: by 2002:a05:7412:b130:b0:e2:908c:2ebd with SMTP id az48csp1766240rdb; Sun, 19 Nov 2023 09:17:54 -0800 (PST) X-Google-Smtp-Source: AGHT+IEcwtHm0AJEEMR8/YaucPgKFessDeb4BZGjeSXpyjGLsXqOpV80IOeZ2J3fGy7ZcOwUL9GY X-Received: by 2002:a05:6a20:26a4:b0:187:e3e8:e8d4 with SMTP id h36-20020a056a2026a400b00187e3e8e8d4mr4279116pze.53.1700414274092; Sun, 19 Nov 2023 09:17:54 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1700414274; cv=none; d=google.com; s=arc-20160816; b=A53E8WD8Oc0k84+Ey87d/NKc4E87+Gogg+ODKdsX18d1j55qvFBuS1a3hWpPD7YkI7 NPdQIU7LEpcSGfAWBOcImzc6+KBHqaI1MznLHRsR0vUiXYBBBZCzwk5rLMc4YKO+YdIM XP25N7RC3u5xtSluEyFziibIJCt95W4B/8tXFJpp9yT7cZ1xzB1VJJunofjXrQZHEeRg 3/yRzAvFgs5wmuW1NQ2tOWOS9pJIJltWWF3fTOOnS1S4PRHGSHTsygrRO5il+mHzAY4X /3cNjSVuipJ79rEa7kYf8K00FjLMZHaVwuevrH3T0PwO0L94h2/+YaCmguhHSX/x0pOl 0tww== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=FR/NuLgw0LjMLCkOwG88T/KrqveNwXOYtA5h4jE7sp0=; fh=rpb5uoH47E8jpg/RKZjMG1bB9U/EO8wjci0xSsH1JQg=; b=Spm5ByWoaeDm5jcyaWuwcgcPv0Fe3nbv3L/4h4o2Vn0aqKJC5k8vyYGngvKa8EhxR1 SlxC6RaSqn1TL3MI2QCwocfwhf46ZPa76AatjSTerNZ+4EdUHeptouQ0W7ew+cgTDKgV NTD6zkH2vWuZwpPtQVcBL0L8VCjpbSceprTDozhoFv3gK8/kwBM/7uY4/rehBJAGdlZk 59Tp5iLk/437OznmC+bBhDJGb0fyrwN71FPNf9ZuYuI2//51eue0y/b4jRuRB8U/ayA4 WB8HFXmx1aPeQENc+HAOTu2pdptFTz+lSpOaMpuxNzSFtyEMZRE29tokApvbGLx2fYiO n4RQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=nUX5pQTj; spf=pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) smtp.mailfrom=linux-nfs-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from snail.vger.email (snail.vger.email. [2620:137:e000::3:7]) by mx.google.com with ESMTPS id 33-20020a631061000000b005be3683ec6asi6447117pgq.184.2023.11.19.09.17.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 19 Nov 2023 09:17:54 -0800 (PST) Received-SPF: pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) client-ip=2620:137:e000::3:7; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=nUX5pQTj; spf=pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) smtp.mailfrom=linux-nfs-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id C92C280A5F7F; Sun, 19 Nov 2023 09:17:52 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231420AbjKSRRy (ORCPT + 99 others); Sun, 19 Nov 2023 12:17:54 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42190 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231417AbjKSRRx (ORCPT ); Sun, 19 Nov 2023 12:17:53 -0500 Received: from mail-ed1-x52b.google.com (mail-ed1-x52b.google.com [IPv6:2a00:1450:4864:20::52b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 21A9BD5 for ; Sun, 19 Nov 2023 09:17:50 -0800 (PST) Received: by mail-ed1-x52b.google.com with SMTP id 4fb4d7f45d1cf-5431614d90eso5145726a12.1 for ; Sun, 19 Nov 2023 09:17:50 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1700414268; x=1701019068; darn=vger.kernel.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=FR/NuLgw0LjMLCkOwG88T/KrqveNwXOYtA5h4jE7sp0=; b=nUX5pQTj7rWTn32TC4CyibwJ9S4mhZuGlkdT8ZLMY7XXeJvQTWnl/qI2Z9koHFGijB yirgSt9/K03hEIkdINfa8k4uj0TT41LB/Mdrb9mZWSNZ/CbMI7xQf4Lu9AoY1RPdva0X nPznIaambc2s5Aq/7RFcVyOgIgYKCb5MAbe362RdePI5id7kZZjS7liYDXA8RqfFbkhp 16WlO2nHxq6LngZiHQQP6hcYCLq/j6dphd7OHhRVI9KV6kQgkApBdd7VTa1+UH+zWI4u +djxz7/yINHqIBPM3nsf/pvKgz1ZUh1ovEpLJwN9B1dnf2wC0E3rpe3AkWQms7hWQQQJ mUBQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1700414268; x=1701019068; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=FR/NuLgw0LjMLCkOwG88T/KrqveNwXOYtA5h4jE7sp0=; b=tUgGPaA3Dj4dQg1suzlkhqnSqtEFF5PdwGj/0B7U7i2ZqPdQxIO7OAwj+sKuVoA2oQ 85rfDGELLKSqiM5mTk9RV+/5cIbGRYM5UbyGteZk3j2OJMlGWV95gBW7sAaEo7xCFv1k +Gm3t5wbRoJyeM9X80Ie2++MtHkPn7A9fLbuQtyTFtinXklsTrRKjei+2mq4euJ0o2ko 2dC6hYY6G9cR73UhJeI85d11hBObfAr03tY9S6pAHK5C9AOJJTsORV/Nypd7UMTjXLP7 gGukU7wvHMuxida7iXCRhaibHTyLAacwKhelFmEJs7BAgGs4hSkZLKV4H0/gbSFnUDUv Y18w== X-Gm-Message-State: AOJu0YzrBulb43dminji/zCSl/rASyAtV3jPqCeYx0PBx7/3M6gyqQd4 CfMguCCWfrimvtgCz0Ibw+RJUF8VdaMYZ7B4kfU= X-Received: by 2002:a05:6402:2056:b0:543:5c2f:e0e6 with SMTP id bc22-20020a056402205600b005435c2fe0e6mr3149282edb.17.1700414268537; Sun, 19 Nov 2023 09:17:48 -0800 (PST) MIME-Version: 1.0 References: <4F5C3573-2962-4072-ACB1-1CB8236866D5@oracle.com> <5DA015E1-50C6-4F56-B4E7-62A4BE90DBA4@oracle.com> In-Reply-To: From: Cedric Blancher Date: Sun, 19 Nov 2023 18:17:11 +0100 Message-ID: Subject: Re: Change "hostname" to "hostport" in text-based mountd downcall Re: BUG in exports(5), no example for refer= Re: Examples for refer= in /etc/exports? To: Steve Dickson Cc: Linux NFS Mailing List , Martin Wege , Chuck Lever III , Roland Mainz Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-nfs@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (snail.vger.email [0.0.0.0]); Sun, 19 Nov 2023 09:17:53 -0800 (PST) On Mon, 13 Nov 2023 at 16:48, Steve Dickson wrote: > > Hello Ced, > > On 11/12/23 8:01 PM, Cedric Blancher wrote: > > On Fri, 10 Nov 2023 at 20:17, Chuck Lever III = wrote: > >> > >> > >> > >>> On Nov 10, 2023, at 3:30 AM, Martin Wege wr= ote: > >>> > >>> On Fri, Nov 10, 2023 at 3:20=E2=80=AFAM Chuck Lever III wrote: > >>>> > >>>>> On Nov 9, 2023, at 7:47 PM, Cedric Blancher wrote: > >>>>> > >>>>> On Fri, 10 Nov 2023 at 01:37, Chuck Lever III wrote: > >>>>>> > >>>>>>> On Nov 9, 2023, at 7:05 PM, Cedric Blancher wrote: > >>>>>>> > >>>>>>> On Thu, 2 Nov 2023 at 10:51, Cedric Blancher wrote: > >>>>>>>> > >>>>>>>> Good morning! > >>>>>>>> > >>>>>>>> Does anyone have examples of how to use the refer=3D option in /= etc/exports? > >>>>>>> > >>>>>>> Short answer: > >>>>>>> To redirect an NFS mount from local machine /ref/baguette to > >>>>>>> /export/home/baguette on host 134.49.22.111 add this to Linux > >>>>>>> /etc/exports: > >>>>>>> > >>>>>>> /ref *(no_root_squash,refer=3D/export/home@134.49.22.111) > >>>>>>> > >>>>>>> This is basically an exports(5) manpage bug, which does not provi= de > >>>>>>> ANY examples. > >>>>>> > >>>>>> That's because setting up a referral this way is deprecated. > >>>>> > >>>>> Why did you do that? > >>>> > >>>> The nfsref command on Linux matches the same command on Solaris. > >>>> > >>>> nfsref was added years ago to manage junctions, as part of FedFS. > >>>> The "refer=3D" export option can't do that... > >>> > >>> Where in the kernel is the code for the refer=3D option? I'd like to = get > >>> some of my students to contribute support for custom NFS ports. > >> > >> IIRC supporting ports is one thing we can't do right now because > >> the mountd downcall interface is text-based, and its parser can > >> barely handle "refer=3D", let alone specifying a port. > > > > I had a chat this weekend with Roland Mainz (who works on the NFSv4 > > driver for Windows these days): > > ... > > That is the old mistake to think that "hostname" and "port" are > > separate entities. We had this kind of debate at SUN/MPK17 several > > times. Host and TCP port are the "location of the server", and they > > are inseparable. > > ... > > The RFCs even help out with that one, for example RFC1738 (URL RFC) > > defines a "hostport" in Page 18. > > And that's what I actually did for ms-nfs41-client: NIH&Institute > > Pasteur needed custom TCP server ports, and I implemented this by > > changing the communication of nfs41_driver.sys (kernel) to userland > > NFSv4 client daemon (nfsd_debug.exe) from "hostname" to "hostport", > > and added the port number in the UNC, so Windows always uses (and > > remembers!) the port number together with the hostname. > > Or easier: I changed "hostname" to "hostport" to embed the port number > > in the up-/downcalls for mount requests - and that is what the Linux > > people can use too. > > ... > > > >> Our plan is to replace the mountd downcall with a netlink protocol > >> that Lorenzo is working on, and then it would be very straightforward > >> to add a port to each target location. But getting to a mature > >> netlink implementation will take a while. > > > > Yeah, instead of waiting for NetLink you could implement Roland's > > suggestion, and change "hostname" to "hostport" in your test-based > > mount protocol, and technically everywhere else, like /proc/mounts and > > the /sbin/mount output. > > So instead of: > > mount -t nfs -o port=3D4444 10.10.0.10:/backups /var/backups > > you could use > > mount -t nfs 10.10.0.10@4444:/backups /var/backups > > > > The same applies to refer=3D - just change from "hostname" to > > "hostport", and the text-based mountd downcall can stay the same (e.g. > > so "foobarhost" changes to "foobarhost@444" in the mountd download.) > My suggestion is you and Roland attend the next Bakeathon, this > spring, which will have remote access for testing and > talk about this on one of @2pm talks. Where is the bakeathon hosted? San Francisco? Ced --=20 Cedric Blancher [https://plus.google.com/u/0/+CedricBlancher/] Institute Pasteur