From owner-freebsd-fs@freebsd.org Mon Nov 7 10:28:03 2016 Return-Path: Delivered-To: freebsd-fs@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 DB53EC331AC for ; Mon, 7 Nov 2016 10:28:03 +0000 (UTC) (envelope-from rmacklem@uoguelph.ca) Received: from na01-bn1-obe.outbound.protection.outlook.com (mail-bn1bon0057.outbound.protection.outlook.com [157.56.111.57]) (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 8DC23F74 for ; Mon, 7 Nov 2016 10:28:02 +0000 (UTC) (envelope-from rmacklem@uoguelph.ca) Received: from YTXPR01MB0189.CANPRD01.PROD.OUTLOOK.COM (10.165.218.133) by YTXPR01MB0189.CANPRD01.PROD.OUTLOOK.COM (10.165.218.133) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.707.6; Sun, 6 Nov 2016 20:51:25 +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.0707.006; Sun, 6 Nov 2016 20:51:25 +0000 From: Rick Macklem To: "freebsd-fs@freebsd.org" Subject: Mount protocol/showmount vs NFSv4 Thread-Topic: Mount protocol/showmount vs NFSv4 Thread-Index: AQHSOG1Vi/9I8/Ov0UO2Epz4od6j/g== Date: Sun, 6 Nov 2016 20:51:25 +0000 Message-ID: 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: aed86fd4-202b-4c87-f1bf-08d40686aca6 x-microsoft-exchange-diagnostics: 1; YTXPR01MB0189; 7:A3A21ZaN4PyBJzk9ZW7F0nOou7hc1pNRXtLc1xpFVo2BK4wlhFUhXPp8JX4wr2TzY7vrp1G7Vl8iZOn1CU6YWO5Qr9bhzEmPANlwnHWJlM3bHp/XSpSVSyelVAhy86dpZtjHh1xBDxC/AbPiKZSuBcByPGCoH0Mik201hFiBOYluJPoagYH2qNwefoIWr9am1Pp3d74kDQdsgMPEpVa9mIN8e3xcjA2zpMHkxUypZMYQjstOEGtseWcDWju9XBbk/Q/QuKD5lHodboqS+rndwRIMdAiCx3wFKrvtOxsMCuzzZUZ/hvy6O+2WpW1y5j5FEoNwG9G/hsmjsTAl2a+K8erlhxO/KN+IN/K8Ozlqvl4= x-microsoft-antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:YTXPR01MB0189; 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)(10201501046)(3002001)(6043046)(6042046); SRVR:YTXPR01MB0189; BCL:0; PCL:0; RULEID:; SRVR:YTXPR01MB0189; x-forefront-prvs: 0118CD8765 x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(6009001)(7916002)(199003)(189002)(81166006)(2906002)(97736004)(11100500001)(107886002)(101416001)(81156014)(6916009)(122556002)(7846002)(8676002)(450100001)(105586002)(5660300001)(2501003)(77096005)(106116001)(8936002)(74482002)(2900100001)(68736007)(50986999)(7696004)(2351001)(229853001)(106356001)(9686002)(86362001)(189998001)(110136003)(5002640100001)(33656002)(3280700002)(102836003)(10400500002)(305945005)(586003)(3660700001)(54356999)(92566002)(5640700001)(74316002)(87936001); DIR:OUT; SFP:1101; SCL:1; SRVR:YTXPR01MB0189; 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="iso-8859-1" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: uoguelph.ca X-MS-Exchange-CrossTenant-originalarrivaltime: 06 Nov 2016 20:51:25.7448 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: be62a12b-2cad-49a1-a5fa-85f4f3156a7d X-MS-Exchange-Transport-CrossTenantHeadersStamped: YTXPR01MB0189 X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 07 Nov 2016 10:28:04 -0000 Hi, NFSv2 and NFSv3 use a protocol called Mount (implemented by mountd) to try = and track mounts/unmounts and report exports to clients. Except for the one RPC= that maps a directory path to a File Handle, none of this is needed by NFS. The = rest is reported (and never guaranteed to be correct) by showmount(8). There are a couple of issues related to the Mount protocol. 1 - It uses a dynamically assigned port# via rpcbind (which means hassles f= or firewalls, etc). 2 - umount(8) currently assumes that it is supported over UDP and fails if = it is configured to work over TCP only. 3 - A recent issue was reported where there is a delay for systems configur= ed for IP6 only related to the handling of localhost. (I'll admit I didn't unders= tand quite why there was this 2sec delay, but others familiar with networking confirm= ed it was correct behaviour.) NFSv4 doesn't use the Mount protocol at all and does everything via the NFS= v4 protocol serviced at port #2049. I have never done anything about this, since most were still using NFSv3, b= ut it seems that maybe something should be done now? - What do people think of having a new option on mountd(8) that would be us= ed for NFSv4 only servers that disables servicing of Mount RPCs. --> This would imply that "showmount" would no longer work for it. --> Note that "showmount" returns nothing useful for NFSv4 mounts,= since mountd doesn't know about NFSv4 mounts (and the NFSv4 server doesn'= t know either, because there is no concept of a "mount" in the NFSv4 protoc= ol). --> It does imply that "showmount -e" will stop working and that in= fo might be useful w.r.t. NFSv4 servers. Umount(8) for NFSv3 is a slightly different problem. It has (for 30years) j= ust talked to UDP. If that doesn't work, there is a delay, but the umount still works (an= d the info from "showmount" is no longer correct, but it is never guaranteed to be cor= rect anyhow). - Should umount(8) use TCP if the NFSv3 mount is using TCP? --> This could cause it to break for a case where only UDP is supported f= or the Mount protocol on the server, but that would be a rare/broken case, I'd g= uess. Anyhow, any/all comments on this would be appreciated, rick