Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp4908754pxj; Tue, 22 Jun 2021 10:36:23 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx83cIE1kVf+Qfzyptab2+03X3fYlZUw5W/HQ9xS8BGBO9maIBa1sQ9wLZCKsEJhUbtYKnZ X-Received: by 2002:a92:da86:: with SMTP id u6mr3356123iln.215.1624383383521; Tue, 22 Jun 2021 10:36:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1624383383; cv=none; d=google.com; s=arc-20160816; b=VYi8C+bg153XW0lM5AcIyhijPMoaTag0YUKJlH2inIlqhKNLMaTPVIbrBAuyIX+oBA P/P9LI4KOU6rf/TACwXRHD/NPijqHjYwdOBBpXzdakxJl3MlexJJ9lspcEGGL5v4Uo2C C60SqjxS9HkRMNMJu15bapQjFBxAVorOMrfvZpAak6NRkTGVlkR3PhgrBHCEutnSH41P 7mGDekQrgnT4kI9Kgv1C88unu25KmvspICL/3UBEYjjFwUkD685CGr2CSXowTVILgGIO uMqua8BhoMDWmhnMReFygNVjxBKbAwjZRSbA9b+sm+ehrPxA+Q5vMZXW6IjWe/FFfd4R RKpQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-language:content-transfer-encoding :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject:dkim-signature; bh=TVtNJdZu0dZrKv60AsPsMQ8QLT37JNkD/0O90aTqUu4=; b=WyxChHkFFdWZz+3IFc4f0pPR7nrM6IA9+ozGKDjxSUAWLHR6f/8AHmWtVaPS62zex+ G7p3Oygb6HUdltymrxbeZwPEa/KSXFmNLDZ3fvqijts46PxkVYLRXPro5sXSUkgRwAq3 GoYIsjq7t7gqGe1oBTmFsXrPMtStfD/cvoPYIlvKhWM1AmHFCQZl5zM4yIZw1hIpNVVo nB7htjY66n8BZ/uHVob5zploczeAXe8NN2vw4M4POiFzG1qc3fWDy270dJpEbSSpbF+j D6tfiU3fsIIuZoZ5GUslUCiKWw/1dncCBS5C/dIA35F1JFCqrQDrAXcZcepUfIUY2NWz eqWg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=LlWhsq6D; 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 x6si18269186ilv.59.2021.06.22.10.35.56; Tue, 22 Jun 2021 10:36:23 -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=@redhat.com header.s=mimecast20190719 header.b=LlWhsq6D; 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 S231572AbhFVRg4 (ORCPT + 99 others); Tue, 22 Jun 2021 13:36:56 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]:59202 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231549AbhFVRg4 (ORCPT ); Tue, 22 Jun 2021 13:36:56 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1624383280; 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=TVtNJdZu0dZrKv60AsPsMQ8QLT37JNkD/0O90aTqUu4=; b=LlWhsq6DgRBigtLUZtuZ7RKPrvoh7r5CMvBokGpheTN/hqLBt5Jb0WH06QmPpLA5Nryajp 0xJRgXGxYtYzjZu5EU6cfHN5oEa07x+g4NvKAZTT6219tTtsay+gn0jRj3hrOhJqrzdwBo RKrldGnKZf8zqX7mT2ZUqjmNGnuKctA= Received: from mail-pj1-f70.google.com (mail-pj1-f70.google.com [209.85.216.70]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-376-sqpDuflGOmSeBfG4yMOcwg-1; Tue, 22 Jun 2021 13:34:38 -0400 X-MC-Unique: sqpDuflGOmSeBfG4yMOcwg-1 Received: by mail-pj1-f70.google.com with SMTP id x2-20020a17090ab002b029016e8b858193so2525641pjq.3 for ; Tue, 22 Jun 2021 10:34:38 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding :content-language; bh=TVtNJdZu0dZrKv60AsPsMQ8QLT37JNkD/0O90aTqUu4=; b=Mvng26SaiAmYw5MiSq6+aP9e3EZZ9gGoVMOY8h/qMSczqcAQczxJntVsHmGu6BoWiJ htX8f4mNfRH6gRm/8vDmavjC7h2p5m9iq5iXOd0/M9Ti2cRE7IJ8UsCmsJXUWOTpIdc7 tk0YbM3/dVVV4qEbaR1q0AqW7bcIX5JoeueUAd0okI1Xwynz+j5d4WxWUcp2ic6m34qS 5ZTZLPbv/rcanxh8fhCmkw6b5ol32JIxXKXVabm3eWs9k6FpwiQSGGD2hfxX5NFwuC1Q e/2wn2GlPJv2DoGNeB2ONAF2Jx6yM/lASItmQ4nPFGEVwXdqVexTd5GB2i1ja6YBTive VzTQ== X-Gm-Message-State: AOAM533skI8KQV0UTfk+wr2WCXfoCA6KZ0hRUEL25iBs9k2THpXIvKVY 178iopfk4woEUssraQrBP0yPwgiCOh+cc4msuwTTZMiIuhDk5/P+yzKd/zeELg6LMF5MFGa5scd 3YnSizrTCDU19VzrgUpFI X-Received: by 2002:a17:90a:8a95:: with SMTP id x21mr4952279pjn.154.1624383277763; Tue, 22 Jun 2021 10:34:37 -0700 (PDT) X-Received: by 2002:a17:90a:8a95:: with SMTP id x21mr4952261pjn.154.1624383277496; Tue, 22 Jun 2021 10:34:37 -0700 (PDT) Received: from localhost.localdomain (c-76-105-143-216.hsd1.or.comcast.net. [76.105.143.216]) by smtp.gmail.com with ESMTPSA id k6sm18552697pfa.215.2021.06.22.10.34.36 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 22 Jun 2021 10:34:36 -0700 (PDT) Subject: Re: any idea about auto export multiple btrfs snapshots? To: Wang Yugui , Frank Filz Cc: 'NeilBrown' , linux-nfs@vger.kernel.org, Frank Filz References: <20210621225541.3CEB.409509F4@e16-tech.com> <001901d766c5$cf427af0$6dc770d0$@mindspring.com> <20210622064158.98CA.409509F4@e16-tech.com> From: Frank Filz Message-ID: Date: Tue, 22 Jun 2021 10:34:35 -0700 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: <20210622064158.98CA.409509F4@e16-tech.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Content-Language: en-US Precedence: bulk List-ID: X-Mailing-List: linux-nfs@vger.kernel.org On 6/21/21 3:41 PM, Wang Yugui wrote: > Hi, > >> OK thanks for the information. I think they will just work in nfs-ganesha as >> long as the snapshots or subvols are mounted within an nfs-ganesha export or >> are exported explicitly. nfs-ganesha has the equivalent of knfsd's >> nohide/crossmnt options and when nfs-ganesha detects crossing a filesystem >> boundary will lookup the filesystem via getmntend and listing btrfs subvols >> and then expose that filesystem (via the fsid attribute) to the clients >> where at least the Linux nfs client will detect a filesystem boundary and >> create a new mount entry for it. > > Not only exported explicitly, but also kept in the same hierarchy. > > If we export > /mnt/test #the btrfs > /mnt/test/sub1 # the btrfs subvol 1 > /mnt/test/sub2 # the btrfs subvol 2 > > we need to make sure we will not access '/mnt/test/sub1' through '/mnt/test' > from nfs client. > > current safe export: > #/mnt/test #the btrfs, not exported > /mnt/test/sub1 # the btrfs subvol 1 > /mnt/test/sub2 # the btrfs subvol 2 > What's the problem with exporting /mnt/test AND then exporting sub1 and sub2 as crossmnt exports? As far as I can tell, that seems to work just fine with nfs-ganesha. Frank