From owner-freebsd-questions@freebsd.org Thu Oct 4 10:57:37 2018 Return-Path: Delivered-To: freebsd-questions@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id F186310C8599 for ; Thu, 4 Oct 2018 10:57:36 +0000 (UTC) (envelope-from felix@audiofair.de) Received: from mo6-p00-ob.smtp.rzone.de (mo6-p00-ob.smtp.rzone.de [IPv6:2a01:238:20a:202:5300::12]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "*.smtp.rzone.de", Issuer "TeleSec ServerPass DE-2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 7D5278F7EA for ; Thu, 4 Oct 2018 10:57:36 +0000 (UTC) (envelope-from felix@audiofair.de) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; t=1538650654; s=strato-dkim-0002; d=audiofair.de; h=In-Reply-To:Date:Message-ID:From:References:To:Subject: X-RZG-CLASS-ID:X-RZG-AUTH:From:Subject:Sender; bh=pVTZ2z3NVyf7AurTw+b+gXWrDhERdFL+4XQzTUo0x4Q=; b=qaXcfbN2rt9vCbBBnmOm3z1gi3i+VniZITRctJ4ZCaNvmZBIIjkej+TIKUOE4qsKST N5wIyclMOdT3O6/bm2lismU8VoRd/1juaZtL+lW7ybFhnPSjDBy9flH8FpzRBtRlNNhG sZ/PxCpt1tQYZZOxA6rIQS4jNXo3qWrAuCfb9+orTIZk1HhboEXPlOJudMVbM7TnB8FL cGRfkRJkpYrwCPUNm+1vXQCP3+XEF2HlzHFtIfZvZiPz/IxRJ94p0onKbpEvjSV1PGuC EvbCcJghg++Pgc0VsK4zxnC5evQecMvZJ+5LjOGmouKHtZJJh7Ptfki0UD3IKJtur8Un meNQ== X-RZG-AUTH: ":KmkIfFiIeuobF0ryGDOmdGJTFqaolieRUBb8W7m+IlV8fTgVa1I1Nqqo7krB5f1Lh7qYsj9h" X-RZG-CLASS-ID: mo00 Received: from [131.188.166.118] by smtp.strato.de (RZmta 44.2 AUTH) with ESMTPSA id k02759u94AvY7f6 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (curve secp521r1 with 521 ECDH bits, eq. 15360 bits RSA)) (Client did not present a certificate) for ; Thu, 4 Oct 2018 12:57:34 +0200 (CEST) Subject: Re: Mountd inconsistent error messages on nfsv4 mount To: freebsd-questions@freebsd.org References: <3079ec6e-6c28-a1d0-c12f-8a9114b8f02c@audiofair.de> From: Felix Winterhalter Message-ID: <9bd1f184-5fc3-6690-1413-5b579782175c@audiofair.de> Date: Thu, 4 Oct 2018 12:57:34 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.0 MIME-Version: 1.0 In-Reply-To: <3079ec6e-6c28-a1d0-c12f-8a9114b8f02c@audiofair.de> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Content-Language: de-DE X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Oct 2018 10:57:37 -0000 This is apparently caused by a quirk in linux mount as I found out. mount -t nfs4 tries a V4 mount first and then falls back to v3 unless -o vers=4 is explicitly specified. Leading to the error messages seen below. This is not a bug in FreeBSD but a weird fallback on Linux's side. On 10/2/18 2:06 PM, Felix Winterhalter wrote: > I am currently trying to set up nfsv4 exports on one of our servers. > I found out that the mountd output for denied mount requests is a bit weird. > > For example my exports file looks like this: > > V4: /shareroot clients > /shareroot -alldirs clients > > > Which would export the shareroot to the netgroup clients. > > So far so good. Mounting this directory works also fine from clients. > > > Now if I try to mount a directory which does not exist with a mountline > like this: > > mount -t nfs4 server:/directorywhichdoesnotexist > > I get an error in mountd along the lines: > > mountd[8274]: mount request denied from :: for /directorywhichdoesnotexist > > > which is a bit hard to debug especially with multiple trees. I would > have expected mountd to know about the V4 root and printed it > accordingly as: > > mountd[8274]: mount request denied from :: for > /shareroot/directorywhichdoesnotexist > > > Is there any reason why it doesn't do that? > > This also happens when a subdirectory does not exist. It maps the > complete tree back to / instead of the V4 root. > > > _______________________________________________ > freebsd-questions@freebsd.org mailing list > https://lists.freebsd.org/mailman/listinfo/freebsd-questions > To unsubscribe, send any mail to "freebsd-questions-unsubscribe@freebsd.org"