From owner-freebsd-net@freebsd.org Tue Oct 25 00:26:14 2016 Return-Path: Delivered-To: freebsd-net@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 88916C1E415 for ; Tue, 25 Oct 2016 00:26:14 +0000 (UTC) (envelope-from rmacklem@uoguelph.ca) Received: from na01-by2-obe.outbound.protection.outlook.com (mail-by2on0065.outbound.protection.outlook.com [207.46.100.65]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (Client CN "mail.protection.outlook.com", Issuer "Microsoft IT SSL SHA2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 42D529E2 for ; Tue, 25 Oct 2016 00:26:13 +0000 (UTC) (envelope-from rmacklem@uoguelph.ca) Received: from YTXPR01MB0189.CANPRD01.PROD.OUTLOOK.COM (10.165.218.133) by YTXPR01MB0191.CANPRD01.PROD.OUTLOOK.COM (10.165.218.135) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.679.12; Mon, 24 Oct 2016 21:52:12 +0000 Received: from YTXPR01MB0189.CANPRD01.PROD.OUTLOOK.COM ([10.165.218.133]) by YTXPR01MB0189.CANPRD01.PROD.OUTLOOK.COM ([10.165.218.133]) with mapi id 15.01.0679.015; Mon, 24 Oct 2016 21:52:12 +0000 From: Rick Macklem To: Ben Whaley CC: "freebsd-net@freebsd.org" Subject: Re: NFSv4 exports confusion Thread-Topic: NFSv4 exports confusion Thread-Index: AQHSLWucozDdtL+lyE6vm6JZQIT3LaC2kR0rgAEiVoCAAG7YWQ== Date: Mon, 24 Oct 2016 21:52:12 +0000 Message-ID: References: , In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: spf=none (sender IP is ) smtp.mailfrom=rmacklem@uoguelph.ca; x-ms-office365-filtering-correlation-id: 56740951-7947-487c-7461-08d3fc5802b1 x-microsoft-exchange-diagnostics: 1; YTXPR01MB0191; 7:DJADmpOP/tZXZQ19guwhVZZYBiMHrMId8db9tAXf7gq60lxtXvzQmmT0eETL1+6eKEZ0xJcHuVD3RnPF7M1HnwCJOBVTJbEmnCaOaiA3xmsfMg0d3G+hoSLd4SaQZCQB/tOfICcOncZGk431fS1+IWL1r6viMA1csOJmv58+dZbXLYQDExkYCB/vxutoTkRphpTIItnyz9TVd03aylbA15dcU1L5Kucx3vGtQurCoaaW4Hy/XvNMs143MUEM+4E4R+xHKn/qhZUQfKsZVE+1az+d8SZIMGy+8bJE+vKq9jRTHdvuaO4FQEXKfll2Lw0YE3xWZbCaZmIyHVxn4wWup+Yx0p03fgJOOZUe3ZhhkjE= x-microsoft-antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:YTXPR01MB0191; x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:(158342451672863); x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(6040176)(2401047)(5005006)(8121501046)(3002001)(10201501046)(6043046)(6042046); SRVR:YTXPR01MB0191; BCL:0; PCL:0; RULEID:; SRVR:YTXPR01MB0191; x-forefront-prvs: 0105DAA385 x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(6009001)(7916002)(24454002)(199003)(189002)(122556002)(5002640100001)(305945005)(86362001)(2906002)(586003)(68736007)(50986999)(102836003)(54356999)(106116001)(8676002)(92566002)(76176999)(106356001)(81156014)(81166006)(74316002)(3280700002)(9686002)(105586002)(101416001)(7846002)(4326007)(3660700001)(189998001)(8936002)(77096005)(11100500001)(5660300001)(7116003)(33656002)(6916009)(110136003)(7696004)(97736004)(1411001)(74482002)(10400500002)(2900100001)(2950100002)(87936001); DIR:OUT; SFP:1101; SCL:1; SRVR:YTXPR01MB0191; H:YTXPR01MB0189.CANPRD01.PROD.OUTLOOK.COM; FPR:; SPF:None; PTR:InfoNoRecords; A:1; MX:1; LANG:en; received-spf: None (protection.outlook.com: uoguelph.ca does not designate permitted sender hosts) spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM Content-Type: text/plain; charset="Windows-1252" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: uoguelph.ca X-MS-Exchange-CrossTenant-originalarrivaltime: 24 Oct 2016 21:52:12.0596 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: be62a12b-2cad-49a1-a5fa-85f4f3156a7d X-MS-Exchange-Transport-CrossTenantHeadersStamped: YTXPR01MB0191 X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 25 Oct 2016 00:26:14 -0000 Ben Whaley wrote: > Thank you, Rick, for taking the time to reply. > > In an NFSv4 server, is it possible to have multiple exports on the same > filesystem but not under the same tree without exposing the top level > directory? No. The same is actually true for NFSv3, except that the Mount command won'= t translate the path to an FH for the mount. (Or, the NFSv3 client must find = it via a Lookup on "..", which clients won't normally do.) > > E.g. if you wanted to export the following without also exporting / > > /path/to/export1 > /anotherpath/to/export2 > > Assuming export1 and export2 are both on the same server filesystem, coul= d > they both be exported without exporting / as the NFSv4 root? Again, no. > Also, exports(5) says: > > > The third form has the string ``V4:=92=92 followed by a single absolute= path > name, to specify the NFSv4 tree root. > This line does not export any fi= le > system, but simply marks where the root of the server=92s directory tree = is > for > NFSv4 clients. > > Yet the V4 root seems to behave like a =93normal=94 export with the -alld= irs > option. A V4 client can mount the V4 root and any subdirectory under it, > whether the subdir was exported or not. Am I misunderstanding what the ma= n > page says? No, if you created a /etc/exports with only a "V4:" line, no file system w= ould be exported. (You might be able to mount, but you wouldn't be able to do much = of anything with it. I don't think even a Readdir/ls works. It just allows Loo= kup and a few other Ops, so that the mount can work without all the parent files sy= stems being exported.) It is the line that exports any path in the file system that exports that f= ile system. ie. It is the /path/to/export that exports everything in that file system. --> So, yes, it is like all export lines except the "V4:" line have "-alldi= rs" on them. rick