Received: by 2002:a05:6a11:4021:0:0:0:0 with SMTP id ky33csp2852059pxb; Tue, 21 Sep 2021 09:02:09 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwLSw6tRNBCm8mj8JSxjxEgULhap1pxRYL8JlRbv95dU2IDPnuyxTvKStI8xGSTMNw91fJX X-Received: by 2002:a17:906:ae9b:: with SMTP id md27mr35031572ejb.380.1632240129522; Tue, 21 Sep 2021 09:02:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1632240129; cv=none; d=google.com; s=arc-20160816; b=ST4Jiq6DQ3PRSZQXN2WSfI9yNHNdPckfLqHmCzcetFF+ZhXZIjxv6YmhBhz7pQIgZH 1yMjmZesUYXGENYXwjE2K59MzCgNpp7JNSZ4zEFShHTSHrTg7Sd/haNV0DwMabDsUtvd +ywWBIrHVqX29fFid8zO3OuKF7cUBgDRn9mMhX3uiVuuOzUXPz3iOpq9PyxiMHSZEXOH lDAQ0zdjT8oe5Wvk7XvQf1d3dU91kgfzfLMyvqmkKmsFXLbzvZvCGW8NohjEncsOnYDo Lz7cflZyQkeKyfO3hLrSXsUEVmlhFnUecG6m+t3Qfv7BQuWdnrz7VtlfMX5YCZMxgXEH qO9A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature:dkim-filter; bh=YV65ku4X7Jk7aAFKb7wEWlTcnAiyfZMqNNmP/+OXEpc=; b=jNoiz793JjtBxfz5SjkD1mV8nJfrrBY2vjEsyEQHPqnK5d/8Q5OOphuu6DDGN0o85p OMkhOAWxcN6bzV2vgOJmekr0fksRiRpSsXCK/lHwkvNrdnVZKmjt4BLprFhIEScaa+XW RWSmyDQDvtFM6fjtW8H2KLk5BVciI6vIBtFHqhTssIXhCqSIJWzk8rgdM+0OBfjVo+lP +MbrmzIwGTqJWeKDgeI7jWX91xyQSKQCfnB43cBiSGk//NeSSXISRNzUtr0mKjKsjAG7 JClnTOOVYxnWsa3uciAU5r5IbexSrJJIrs//KzAMXeI1P13EQYmV/4JZWOE5K0WYebX8 QUow== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@fieldses.org header.s=default header.b=A2bZHZhZ; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id j5si19946545ejm.413.2021.09.21.09.01.21; Tue, 21 Sep 2021 09:02:09 -0700 (PDT) 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=@fieldses.org header.s=default header.b=A2bZHZhZ; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234255AbhIUQCS (ORCPT + 99 others); Tue, 21 Sep 2021 12:02:18 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57854 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234333AbhIUQCA (ORCPT ); Tue, 21 Sep 2021 12:02:00 -0400 Received: from fieldses.org (fieldses.org [IPv6:2600:3c00:e000:2f7::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7AB69C061575 for ; Tue, 21 Sep 2021 09:00:31 -0700 (PDT) Received: by fieldses.org (Postfix, from userid 2815) id 7A2AE7027; Tue, 21 Sep 2021 12:00:30 -0400 (EDT) DKIM-Filter: OpenDKIM Filter v2.11.0 fieldses.org 7A2AE7027 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fieldses.org; s=default; t=1632240030; bh=YV65ku4X7Jk7aAFKb7wEWlTcnAiyfZMqNNmP/+OXEpc=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=A2bZHZhZ2A1JgMGp0DQ4M195rmnFH9x/4JB1cOX67KvSqOCKRVkaoDqJiQvjNIwqD WQX8PG3qAS/oN8q61l9WbrlJ/FJasHitpEn5Sq4OacvK81gmw9OnZDk+paXkUqDqPJ SIuBYT8yghsHt1+7Ca5zxKLuYmd26YWVPBAB1/DY= Date: Tue, 21 Sep 2021 12:00:30 -0400 From: Bruce Fields To: Chuck Lever III Cc: Linux NFS Mailing List Subject: Re: [PATCH] nfs: reexport documentation Message-ID: <20210921160030.GC21704@fieldses.org> References: <20210921143259.GB21704@fieldses.org> <37851433-48C9-4585-9B68-834474AA6E06@oracle.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <37851433-48C9-4585-9B68-834474AA6E06@oracle.com> User-Agent: Mutt/1.5.21 (2010-09-15) Precedence: bulk List-ID: X-Mailing-List: linux-nfs@vger.kernel.org On Tue, Sep 21, 2021 at 02:39:39PM +0000, Chuck Lever III wrote: > > On Sep 21, 2021, at 10:32 AM, J. Bruce Fields wrote: > > +It is possible to reexport an NFS filesystem over NFS. However, this > > +feature comes with a number of limitations. Before trying it, we > > +recommend some careful research to determine wether it will work for > > +your purposes. > > ^wether^whether Fixed. > > + > > +A discussion of current known limitations follows. > > + > > +"fsid=" required, crossmnt broken > > +--------------------------------- > > + > > +We require the "fsid=" export option on any reexport of an NFS > > +filesystem. > > Recommended approach? I would just say use 'uuidgen -r' Looking at the manual.... I'd somehow missed that fsid= would take a uuid (and not just a small integer) now. So, sure, I'll add that as a suggestion. Longer term I wonder if it would work to do this automatically for new nfs reexports. The annoying part is you'd have to keep the fsid= argument on disk somehow, either by modifying the export configuration in /etc or by keeping them on the side somewhere. That'd fix crossmnt too. > > +The "crossmnt" export option does not work in the reexport case. > > Can you expand on this a little? Consequences? Risks? crossmnt doesn't propagate fsid= (for obvious reasons), so if you cross into another nfs filesystem then it'll fail. Actually if you just had disk filesystems mounted underneath it'd probably work. > > +Reboot recovery > > +--------------- > > + > > +The NFS protocol's normal reboot recovery mechanisms don't work for the > > +case when the reexport server reboots. Clients will lose any locks > > +they held before the reboot, and further IO will result in errors. > > +Closing and reopening files should clear the errors. > > Any recommended workarounds? Or does this simply mean that > administrators need to notify client users to unmount (or > at least stop their workloads) before rebooting the proxy? I think so. If you don't use any file locking or delegations I suppose you're also OK. Delegations might be useful, though. I'd expect reexport to be useful mainly for data that changes very rarely, if that helps. --b. diff --git a/Documentation/filesystems/nfs/reexport.rst b/Documentation/filesystems/nfs/reexport.rst index 892cb1e9c45c..ff9ae4a46530 100644 --- a/Documentation/filesystems/nfs/reexport.rst +++ b/Documentation/filesystems/nfs/reexport.rst @@ -6,7 +6,7 @@ Overview It is possible to reexport an NFS filesystem over NFS. However, this feature comes with a number of limitations. Before trying it, we -recommend some careful research to determine wether it will work for +recommend some careful research to determine whether it will work for your purposes. A discussion of current known limitations follows. @@ -15,9 +15,12 @@ A discussion of current known limitations follows. --------------------------------- We require the "fsid=" export option on any reexport of an NFS -filesystem. +filesystem. You can use "uuidgen -r" to generate a unique argument. -The "crossmnt" export option does not work in the reexport case. +The "crossmnt" export does not propagate "fsid=", so it will not allow +traversing into further nfs filesystems; if you wish to export nfs +filesystems mounted under the exported filesystem, you'll need to export +them explicitly, assigning each its own unique "fsid= option. Reboot recovery ---------------