Received: by 2002:a05:7412:5112:b0:fa:6e18:a558 with SMTP id fm18csp1160729rdb; Wed, 24 Jan 2024 06:43:43 -0800 (PST) X-Google-Smtp-Source: AGHT+IEtUR9J8lrYBVvZF3TPgswQNtua0jZoFUqvxUs/MQESTm+xZihFgKBp2GCujAHMBW2bjplq X-Received: by 2002:a17:902:e84c:b0:1d7:7664:f2bd with SMTP id t12-20020a170902e84c00b001d77664f2bdmr918302plg.2.1706107422954; Wed, 24 Jan 2024 06:43:42 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706107422; cv=pass; d=google.com; s=arc-20160816; b=fiCE01tdEFuhLM/n8+hpj3NwJiigmvDUyZF2FtRcwNScpnaRpurpIUfZVqMRHi2sU5 mDpDawFuSwwDI7LC8kQR8Sabk9Qb/1y9sC8zXYg4+tHF7ZepYWQJsEr4DYk8rh+NYeQd e9oKrpC2AlZM5LBKAq+w3zTEsy2osQczK55JmHmpfOq10EftvqjXctrY9arch27O7yd/ oEZpceBgo4hdLNRp1bpu3/IWbHko6L4UeVsxCyACPi8rEH62A0gKBNXpWQIArHHyheJY 1Q0OjSFHIf3xVPy/U902RMRLtyciL1TsHQaUXRxNLoWd87MK65hZQ2H/ox/Esphdc9I2 DoKw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:list-unsubscribe:list-subscribe :list-id:precedence:dkim-signature; bh=JhJajn1dlRnhQIzzLtUNOavOaD/8QtUQ8+ibIesZnws=; fh=IiW19e7m9ypCMNT5zTv/JiMg1cXTWq97OfhOUWSSZVA=; b=tU1OYFizu2sb8CvSQgWltxRFZ3PH+e+Sc6ctC5XqVBV7boL9Nvz8dW/0YNrOs2TkEF 7XERd4syGPzsy6AbFEgkkfCXTfQYmlhDYivFnKetn3Tu8mEJXMrV+8WeXC6GpjqU06Hl IgRgjwt4wpZCxP0aa2NH+Gvyr13yrjr8wAhkp63SfBDOx3K1D4raBvCC6ySQVgVQzDVh UBLdUsOwJ9DSK9Ucc/leyz4y10v58dpP9uvb/1zrRWTGmjc9MOZHhySBilmoEBnn6hLf P2iLY853ABYwLdsPLlOuh6QEJCHkYslujeEwAbT555ahc9yyp+aH8QAEFbSiEM0u4OkR b9mg== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=BV0sPz0E; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com dmarc=pass fromdomain=gmail.com); spf=pass (google.com: domain of linux-nfs+bounces-1308-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-nfs+bounces-1308-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id u4-20020a17090341c400b001d78b47f5f0si583274ple.621.2024.01.24.06.43.42 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 24 Jan 2024 06:43:42 -0800 (PST) Received-SPF: pass (google.com: domain of linux-nfs+bounces-1308-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) client-ip=147.75.48.161; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=BV0sPz0E; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com dmarc=pass fromdomain=gmail.com); spf=pass (google.com: domain of linux-nfs+bounces-1308-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-nfs+bounces-1308-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sy.mirrors.kernel.org (Postfix) with ESMTPS id 4B6D3B23A77 for ; Wed, 24 Jan 2024 14:06:13 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 52BE47A707; Wed, 24 Jan 2024 14:06:06 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="BV0sPz0E" X-Original-To: linux-nfs@vger.kernel.org Received: from mail-ed1-f45.google.com (mail-ed1-f45.google.com [209.85.208.45]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 8F5D277F3A for ; Wed, 24 Jan 2024 14:06:04 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.208.45 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706105166; cv=none; b=Eb/hji7KMXcI5fx4eTsSSTZJCjy5ylCyuO+TkdSfDZKJBsAP2+vF5S4VOZGvF3U7dk4b4hC7PF++3pix7ndAFzOHSCA+gO6LLPRCoQJ4bQ2KgxCnteWafd5qOM8brpRzZb5zmnmrhSYW1raMwiq/W+PYpPQYBczxNLdXFcOalnA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706105166; c=relaxed/simple; bh=JhJajn1dlRnhQIzzLtUNOavOaD/8QtUQ8+ibIesZnws=; h=MIME-Version:References:In-Reply-To:From:Date:Message-ID:Subject: To:Cc:Content-Type; b=QZR+jpXfWGHW73LCQ0rdxAbchO6FApLuFV+mFWim7uJVylkAtFTWwNKHO8w62Q/wYwwVEJiVd0a6nq7jyBIkoVumF+flLu+WV85HBqMYsw+tePF4kjbw95T5OAsEPozu9DbSuqNTr8jle0KeAHYdN8+vOZITrj8ok6jU8eXO3Vc= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=BV0sPz0E; arc=none smtp.client-ip=209.85.208.45 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-ed1-f45.google.com with SMTP id 4fb4d7f45d1cf-559f92bf7b6so9958260a12.0 for ; Wed, 24 Jan 2024 06:06:04 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1706105162; x=1706709962; 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=JhJajn1dlRnhQIzzLtUNOavOaD/8QtUQ8+ibIesZnws=; b=BV0sPz0ERpTD77RV9F8u1+p9jXRjcT/qj28bIoWIfdJcd25OIqOuTmKKnDDulUOkMh pxXwwPebQZ7pmA84IquRyeXQrrKNr+5bKF6tLFnx+Jngbg9xxoQ/ToQzr30sYLjw1/F/ S040i6c2LjEtjAOd0w6RfkGHumwilS1cwMQBwSzqjII4emRsS/Y1L9EPDi/5jTzp1+FN Rm1v2BSj5c4OwppLM4w7TGcC+KNbQJwvSQat1ghgJs45jVMl3PwCsvig6CuCz+HwOD/q E8Bzdz5mcsZQqa4AE4YnAqzrHJXWaxWCRheYpqjE5q+T3ms82h9HoSzeJfUaq1jfH5+v JmCg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1706105162; x=1706709962; 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=JhJajn1dlRnhQIzzLtUNOavOaD/8QtUQ8+ibIesZnws=; b=ieGjDf2ZqeuoYVE0eyBAmwtYVs1Xjp4SzfKFHaUkky6n1WqOzHtdWVbUKSFMwSIpAv LqD+chDoM3yMNBfuIPHjkjxNcu+c3sIYy+sFXoKYoooinZTBJAbGQQuO7CRkC2kFIieV /JAPHkEvbI8NWm0HYtBgkMZIFvMf+jDzahLqEv5Rvl/9Kd5hWtkxkxUeNiBUlNFG9UTL BnSmJO163gHNGWI67qK8wmbO6dd96ZBB+5yOzofZ/ReknNxgm5MzjaWrrp9cWIxwonfW zFdIOP1p0s7TBSGU5NUoi2W7XkQDAoTSgLUQxmnns0Mn/JzFTtMiPNN8wqAqi0mOxTbx A2/A== X-Gm-Message-State: AOJu0Yx6yGh/xFSbf8UtLhMbGz4G4ihABQCg9FK1YhNOSGIO5IdBebcO o+bemH/komiXx1utjO7mauFy9KOYZKPkpEhYhO/gpV+cqOulZvDTDW7m29Lbob/+VKhUkwbm5Lb WsBTeBhmrrGm/ljLwbI+NuK5HE29CdVCF X-Received: by 2002:a05:6402:350e:b0:55c:a84b:ca58 with SMTP id b14-20020a056402350e00b0055ca84bca58mr1827955edd.18.1706105162260; Wed, 24 Jan 2024 06:06:02 -0800 (PST) Precedence: bulk X-Mailing-List: linux-nfs@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: 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: Wed, 24 Jan 2024 15:05:26 +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: Linux NFS Mailing List Cc: Martin Wege , Chuck Lever III , Roland Mainz Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Mon, 13 Nov 2023 at 02:01, Cedric Blancher w= rote: > > On Fri, 10 Nov 2023 at 20:17, Chuck Lever III wr= ote: > > > > > > > > > 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.) This issue is still open, and BURNING! Ced --=20 Cedric Blancher [https://plus.google.com/u/0/+CedricBlancher/] Institute Pasteur