From owner-freebsd-fs@freebsd.org Thu May 13 21:00:01 2021 Return-Path: Delivered-To: freebsd-fs@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id CCCC262E9BC for ; Thu, 13 May 2021 21:00:01 +0000 (UTC) (envelope-from rmacklem@uoguelph.ca) Received: from CAN01-TO1-obe.outbound.protection.outlook.com (mail-eopbgr670041.outbound.protection.outlook.com [40.107.67.41]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mail.protection.outlook.com", Issuer "DigiCert Cloud Services CA-1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Fh3vP4W8fz3sWP; Thu, 13 May 2021 21:00:00 +0000 (UTC) (envelope-from rmacklem@uoguelph.ca) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=EZgfzvVAj9qpnhSaakaKDFvp8rzDRN/0OqzdvgKOLR0aKoo/nRvKvg7LUZuP5Iv2J5iTnSUh9fAXuc8AIKSZEj5cnqJip95NRZzVAbLN+TgHHgfKXtp4q9xzSYz7+GmAypd0rvfEwCMHQETZnSi7hiTH8eBolS0SLOq3x2KjMzQcnurNa7BDDQSc1vPETJqXObNXNQC+MQ0wxPoL0XGUN5Awl9vjr9tkPGZ41Q4aoaDUEGIFrw2Atl0RskivJMElaR7hLV7H3Db0lGb+BnJ7afvLc9K92NEyOQ5GUvMibSMOjZoXonm/9r/CzZ+fHmMkLp2xYNuiLQiUDSP5gCCBOg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=6+EROnEFosAW64oe+2BmEeFNQjngppQl6APgeqavqZE=; b=nMfdHvZnms6jBQotBh3U4ethX60wZtgMxP5SBhQCVbsjLhQK5qrpAER66LT6icR7UKo8L2a8Mau2qsU/u9WcB2RaeVH6t8xtvg1eYoZHpk3oBLF67Y4s1JI1P+/dlkXKvnb0o4kdIAL8d5ax4CtTj9+lRxRna7N9LqMRGuLFv2G8Qe+xrCqfi7kLPZk3gWnWDnJAPRzjvsBYp18JyDVC5d68SWte98rJRMGaR5P0An2vnUSGoQWIfo65t+kCPtC7HCc/n8cBU/7VkWgd+GTcGNArpX5kSsoh7fupnCQyWvIW6qJ97ACmzdIaXNlXFlvO8jRcMzbfR366p8dxt5Lnkg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=uoguelph.ca; dmarc=pass action=none header.from=uoguelph.ca; dkim=pass header.d=uoguelph.ca; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=uoguelph.ca; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=6+EROnEFosAW64oe+2BmEeFNQjngppQl6APgeqavqZE=; b=FbS05Q6WrX3IhKn8IrLkSr4JG1boDuzjhJ9+qD0q9DrySbEw2vpMEK63PAewJB/b1Dt+zHDzqAoZ/EH6N+P/X6U7R2AQiA7K3jxrQyatNfHzRaioM1Fe5APlrUjt3LMzd+m9qh3u1VxfdG3mOYRF4SwsjibNvbLBd5MHa7AC3pK5p/JKa9Jd97hMI2R7snnO5VuMfQqwTAOMvb0GbHGLSP6BIg7apnlwpRAOyjg77d64zPtzW9/KhSNQtTTUOWw9oAO+fXipEejCE6aaqzDQXhMCNgAv6adxOIP0UJU8fe6vUm8xvDXBcCoV7XiJynVpTx77RksP3ey16R5gSR25RA== Received: from YQXPR0101MB0968.CANPRD01.PROD.OUTLOOK.COM (2603:10b6:c00:19::29) by YQXPR01MB3910.CANPRD01.PROD.OUTLOOK.COM (2603:10b6:c00:50::33) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4108.31; Thu, 13 May 2021 20:59:59 +0000 Received: from YQXPR0101MB0968.CANPRD01.PROD.OUTLOOK.COM ([fe80::1c05:585a:132a:f08e]) by YQXPR0101MB0968.CANPRD01.PROD.OUTLOOK.COM ([fe80::1c05:585a:132a:f08e%4]) with mapi id 15.20.4087.050; Thu, 13 May 2021 20:59:59 +0000 From: Rick Macklem To: freebsd-fs , "lev@FreeBSD.org" Subject: =?Windows-1252?Q?Re:_autofs_+_default_/net_map_+_NFS4_=97_how_to=3F?= Thread-Topic: =?Windows-1252?Q?autofs_+_default_/net_map_+_NFS4_=97_how_to=3F?= Thread-Index: AQHXSDTehlz7BIdTUUCWCIESmwlUl6rh4Mg7 Date: Thu, 13 May 2021 20:59:59 +0000 Message-ID: References: <36080caf-4aa1-d262-cb93-9df9b72f884d@FreeBSD.org> In-Reply-To: <36080caf-4aa1-d262-cb93-9df9b72f884d@FreeBSD.org> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: a72cf0b9-0112-401e-c72d-08d916521211 x-ms-traffictypediagnostic: YQXPR01MB3910: x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:10000; x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: 3ICyTIp3Z3W11d04bhZsSV5IiR/9BHn/8hyuraJEo87ndRQBxRdbuwOP9+jQKUJpoyP3pvrxP4QwXF+G84xB5UfNBkDYOT9GG2qFmMpPHwzgPWrpmOqgJFCiH2Y6DAzIfs03aJ6cpf0OtHc7/XYE03o/UB3Tt038WFFxIQ05/f1ycc0Yc+tH9NFd25XfXZuJDZENMszjJyG96JqnyGOShs+ePDmHUzOusE4f16shdjorsNmoM2uPv5bxW4dlFq8DIzSMhWsmRwvwb8HB8OO1Yf73YZikcNV6jgA4uwaOHi6BjdtoAr0dwGm/wSLxzvIkf37Pp3GH5GGFrHjf5XRlLaSAL1Q9s8FQBzweHt4K98b0WdQ7DTXCSvuD/RlsAr1V8o/sRfAEuW+JKhn6+/LesoGggkhbsACElQJsSipb9TCOTV5RzOIIIC32npsZa+/fqcZi+ukQtWMzXxY1NDuxHRWNmwCCy6e672cMn8SJEsaMXHfhdk4J7Bvn23RZTgOyDwZspL3cQjxAo4VeZGH6Zjs6uq+X2Mlp2hdK1wasVk+WEo/hfhyzujHKEHLIXwLiiMk5SdoDN1nIavLxL3mtOMwtpDW9BmmGzyg4tkFgdVg1zsOXXBYES5skKYhUwfc4kYHEFAVkRGEul/dvMgWiFFhf9DuK4RdRtWKarff3foY= x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:YQXPR0101MB0968.CANPRD01.PROD.OUTLOOK.COM; PTR:; CAT:NONE; SFS:(366004)(396003)(376002)(346002)(136003)(39860400002)(8936002)(86362001)(186003)(5660300002)(2906002)(966005)(316002)(478600001)(52536014)(110136005)(450100002)(33656002)(55016002)(76116006)(9686003)(66446008)(64756008)(83380400001)(7696005)(66946007)(66476007)(6506007)(38100700002)(66556008)(122000001)(71200400001)(786003); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata: =?Windows-1252?Q?f3Jd1dCO1LUiEoJGrlDv0b0AHD2CBTmLihPIPfNY9yfpLV/++7r8gFCj?= =?Windows-1252?Q?kvGRR5KXTTTxmXarx+Itaj6MGDewA6TJRKgcjyYoucosbRZNQwR66K71?= =?Windows-1252?Q?6ZwmsbIUhKoWWTu2ar0XF3VBH5D0t2mywiqbWtAVe8n6IY9NMYg8S0pB?= =?Windows-1252?Q?pH9NdVg4LqggnDNWQh8TDc81MbAM8OYqllITyhFYrWRFZH9bYFNbqUYr?= =?Windows-1252?Q?9DHPn42L0L+FtlblSQhJ/mUGBzobRZIrhcPvYXdT4VrNKjjzGAfEXBPH?= =?Windows-1252?Q?mpm5pxCFcdz3PMhBIIgfq7BKSt1epnKSgf/MVLYrSUAgIKaSa0I1d4Xv?= =?Windows-1252?Q?cnt0YVualIpFDH0lxLfqqAOGOzUNP7rHuDQZlUPq+63u/LZv+wPaNUo8?= =?Windows-1252?Q?i7ztC03bSV7g8SWKiFiYoJmT/eAN8RZP7a+DhtytIp2hJ32h1cMfmJyh?= =?Windows-1252?Q?/hhhgSaYKznwhOUjNNOmS6BHQWOL5IEMzxcMxh8A/7k2MwMIt9qqosM1?= =?Windows-1252?Q?z0zYtBhn9sJxuJrHQkhX9lF6fg4y5PQXw3jxX+gYQzVlL+FE4uFU0k3p?= =?Windows-1252?Q?mARe1MM6RUmzsBZJu9cRb9nzncTX5hrwTYd6SLQRciRCfvCHzfmko2lb?= =?Windows-1252?Q?REseRavjifOCiEQKtkLAu55T3c6WIrRlzV2YzW16QVdzDIXiqGtwtzW0?= =?Windows-1252?Q?G5vL7T/9Da1MKGooB30u9F2oySg9mw1Spa5RFRwfcRPC3ekogCftepFD?= =?Windows-1252?Q?DxtgK86waRqFHFHM7AFDkR78wTtv91jXbpBjsYkAGx9XEmcf11bQkcj2?= =?Windows-1252?Q?3DdLttdwKnQgxoafydnaOXNgFuTmg7fAm9JMPMqbfzO+IG0bDeF+63DI?= =?Windows-1252?Q?RpVuz12SpKN6YJRItCokaTIsQP3vKrGZY08ErLTV+oazPcGz8eCx9+r8?= =?Windows-1252?Q?7N8/PGQNbbt3wIsKfmfE8rRinhvUdqdnETKjNl2a4ziuQREOzJQ5ZdYA?= =?Windows-1252?Q?qvpajfXZXTEbsRvtT6/KT9GjxHRQwdt1pO7Jwe1v4/O2vcoWo6NE7SNK?= =?Windows-1252?Q?wtVDzGRlAG56mmwrCWXtcuerfroWHf9mzSzb/tabx8rcZLWTy2NV3LBs?= =?Windows-1252?Q?kJMTJB+6QsWw1GvipieBA7Sc+N1XYZK2mfe8ZUv1RVgSX3Co84ZK5h86?= =?Windows-1252?Q?LAoTFL/UvxNM1pIl8DgAcCt2o9UgSCWNWu09VwWm8mcJKj5iuxwMDowc?= =?Windows-1252?Q?EgPnsuhwoDJZ0fkBAxfesWmKY0wbsNNIchAnrTlr/Do0/iwGvwhxHgre?= =?Windows-1252?Q?dJqd/2lt0UvIvPqRzWpszvTDQOLARNicIYS5yM6lCYLoBTLTvbPrjtJv?= =?Windows-1252?Q?Hjscww8DUIa8KKbpDiO6IfeHnQJ7AtpI6peiBbBpAu1Hx+mH/nGGtIl4?= =?Windows-1252?Q?gHAzI3mwlP9puSLc0V9p4ieclG3Yr42jnY4rSaFjKiU=3D?= x-ms-exchange-transport-forked: True Content-Type: text/plain; charset="Windows-1252" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: uoguelph.ca X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: YQXPR0101MB0968.CANPRD01.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-Network-Message-Id: a72cf0b9-0112-401e-c72d-08d916521211 X-MS-Exchange-CrossTenant-originalarrivaltime: 13 May 2021 20:59:59.5230 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: be62a12b-2cad-49a1-a5fa-85f4f3156a7d X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: A2u80G4M0jSRoLn7SwWp/sUJ7SWq+Sj1Mg2QAFH4d7dWeUlRwOs+fEjDDPwthAQK9CKwW1l/Oq3QKKgqNlyygw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: YQXPR01MB3910 X-Rspamd-Queue-Id: 4Fh3vP4W8fz3sWP X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[] X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 13 May 2021 21:00:01 -0000 lev wrote:=0A= > I have server, named "blob", which exports some shares via NFSv4:=0A= >=0A= >/usr -maproot 0:0 -network 192.168.134.0 -mask 255.255.= 255.0=0A= >... ...=0A= >/usr/ports -maproot 0:0 -network 192.168.134.0 -mask 255.255.= 255.0=0A= >/usr/ports/distfiles -maproot 0:0 -network 192.168.134.0 -mask 255.255.= 255.0=0A= >/usr/home -maproot 0:0 -network 192.168.134.0 -mask 255.255.= 255.0=0A= >/usr/home/lev -maproot 0:0 -network 192.168.134.0 -mask 255.255.= 255.0=0A= >... ...=0A= >V4: /usr -sec=3Dsys -network 192.168.134.0 -mask 255.255.255.0=0A= >... ...=0A= >=0A= >(it is shame, that I need to enumerate all home directories separately, fo= r each my network!)=0A= You can do the exports lines without "-network..." and then they apply to a= ll subnets.=0A= Not recommended unless you have an external firewall/nat gateway that is bl= ocking=0A= incoming traffic to port#2049.=0A= =0A= >So, NFSv4 uses "/usr" as export root and exports shares with stripped "/us= r" prefix ("/home", /ports" not "/usr/home", >"/usr/ports").=0A= >=0A= >I could mount "blob:/home" or "blob:/ports" with mount -t nfs like this:= =0A= >=0A= ># mount -t nfs -o nfsv4,tcp blob:/home /mnt=0A= ># ls /mnt=0A= >.... lev ....=0A= ># umount /mnt=0A= ># ls /mnt=0A= >#=0A= >=0A= > No problem, it works.=0A= >=0A= >I've added "nfsv4,tcp" options to "/net" map in "/etc/auto_master", run "a= utomount" and try:=0A= >=0A= ># cd /net/blob/home=0A= >/net/blob/home: No such file or directory=0A= ># ls /net=0A= >blob=0A= ># ls /net/blob=0A= >usr=0A= ># cd /net/blob/usr/home=0A= >WARNING: autofs_trigger_one: request for /net/blob/usr/ completed with err= or 5, pid 1519 (csh)=0A= >May 13 23:05:15 hamster automountd[2564]: mount failed=0A= >... ...=0A= >/net/blob/usr/home: Input/output error=0A= >#=0A= >=0A= >Looks like it is because "autofs" uses "showmount -E" to determine availab= le mount points, and "showmount" shows >NFSv3 mounts, which conflicts with = NFSv4.=0A= I know nothing about autofs and never use it. (/etc/fstab is your friend;-)= =0A= However, if it is using "showmount -E" (an RPC for the Mount protocol that = is an auxiliary=0A= to NFSv3) for NFSv4 then, yes, it is broken.=0A= --> It should either "just try the mount" or do the following NFSv4 compoun= d RPC:=0A= PutRootFH=0A= Lookup =0A= ... for each directory in mount path=0A= Getattr=0A= - If the above succeeds (NFS_OK) and the getattr reply shows the type = as DIR,=0A= then that is roughly the same as above (although it might work even = when the=0A= directory is not exported, so it probably is not worth the effort an= d just trying=0A= the mount would be better, I think?=0A= =0A= >Should it work out-of-the-box? Or I need to custom-fix script in "/etc/aut= ofs" (I don't like this idea!)=0A= I suspect changing your V4: lines to specify "/" may work around this, sinc= e the=0A= mount paths then look the same as for NFSv3.=0A= =0A= rick=0A= =0A= --=0A= // Lev Serebryakov=0A= _______________________________________________=0A= freebsd-fs@freebsd.org mailing list=0A= https://lists.freebsd.org/mailman/listinfo/freebsd-fs=0A= To unsubscribe, send any mail to "freebsd-fs-unsubscribe@freebsd.org"=0A= =0A=