From nobody Thu Nov 21 23:39:46 2024 X-Original-To: freebsd-stable@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XvZTb5Cvzz5dlbk for ; Thu, 21 Nov 2024 23:40:03 +0000 (UTC) (envelope-from rick.macklem@gmail.com) Received: from mail-wr1-x433.google.com (mail-wr1-x433.google.com [IPv6:2a00:1450:4864:20::433]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "WR4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XvZTb334zz4Tlb for ; Thu, 21 Nov 2024 23:40:03 +0000 (UTC) (envelope-from rick.macklem@gmail.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-wr1-x433.google.com with SMTP id ffacd0b85a97d-3824709ee03so1080265f8f.2 for ; Thu, 21 Nov 2024 15:40:03 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1732232402; x=1732837202; darn=freebsd.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=7CjQXytjQ0WknWB4ftuxhxyqHqmxOCQ84v2Zv99TOzM=; b=NsGIEVUlqAzh4Fo7deJS/XCrs0iOUSUvH1lHZs3LK1TW7zEB3wWOarenK0bhmV7icu 3/HSWPzaWmWkoYHc1ePCjEcqpE7YTURI9DLzGOXOUCZttWXVmd7qykBGvS4sjpxV941c J+EkqnQwZBquDPI6x9KdIC1JlHDL2I8MizhP4j+qtB2c1NVIJFjJNZxP1ODJRjfZtPF8 QQcD+2Qk1SDAsS/OKBsOIgkD+2NL83qXoix9TxgeFqZFbRmULmqYLI7RgdmwQkBdwanb hLvM/YQ88FDz26Kb1GkKMvzhdJt4i77oI58DbtznEwJ1V6KUHQuE+M0WkfTeZVrLRKlk g9yQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1732232402; x=1732837202; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=7CjQXytjQ0WknWB4ftuxhxyqHqmxOCQ84v2Zv99TOzM=; b=Ip/W0/IF2czkGF7egQ/q1Z77Jk6K+ShMH3O/D7ZiEN+g6IOUWXW2IYUvmvEJwwL7Lm 4djKzkHyvwlM0QXt1dB/2d2hsq9DmQyZ/oG5/BfB4JBykYOVxDmFO4tBBv5yZzxLgSyD mhjaNiC+JXm5vyDIZ6KkfU+iN+Yc0/NV0ASAXME4fTD2VlyK26CK3nOWwHvxlzgJykFK J+cD2crevUHlDWMYUz/GIJSb4qoou5YOCyIwFAtjLq6bA3s8eAjvjP3NIFIKAcdzSn9u LbdTtRb4Xa25h+YwSp//+BOFM07ssGRUWrzEdJEDseqJmEUYrbt/6V7CT5nAoxoYhD/D pGpg== X-Gm-Message-State: AOJu0YxqUxx/GYvIVd95MLF/42jOKyWeKRxWGG+anGngUPrm4yr/TWwO EAeMRG81bdNxxWGNqiIkoBRKc5HKze37oO+LqpZBuXqYMeFKVxc3X1lwhmxLEkrFgWlYR3PiIj8 fm/cQVHsx9JXJzK2L/eJeTak6omK31Gc= X-Gm-Gg: ASbGnctB71EIfJnVlwA4haQiY2Ecfp1G4VEIlg7VC25yIV6DN1fErUJAT9hFXsj+plq NJd1mHsmCte2L42NH1qJBdpuvajwtzw== X-Google-Smtp-Source: AGHT+IEBEfXQaxiPLBxY3PJ5xB1De9qFYKoPz35CJf6nzLPuDcbGODNhmXZB5YiM3KQxR4cTGttAGin9lxMzbjBQ0q8= X-Received: by 2002:a05:6000:1541:b0:382:4f5b:876b with SMTP id ffacd0b85a97d-38260b5ea16mr608725f8f.16.1732232401407; Thu, 21 Nov 2024 15:40:01 -0800 (PST) List-Id: Production branch of FreeBSD source code List-Archive: https://lists.freebsd.org/archives/freebsd-stable List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: freebsd-stable@freebsd.org Sender: owner-freebsd-stable@FreeBSD.org MIME-Version: 1.0 References: In-Reply-To: From: Rick Macklem Date: Thu, 21 Nov 2024 15:39:46 -0800 Message-ID: Subject: Re: 14.1 NFS / mountd : -alldirs not working as expected To: Michael Proto Cc: FreeBSD-STABLE Mailing List Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; TAGGED_FROM(0.00)[]; ASN(0.00)[asn:15169, ipnet:2a00:1450::/32, country:US] X-Rspamd-Queue-Id: 4XvZTb334zz4Tlb X-Spamd-Bar: ---- On Thu, Nov 21, 2024 at 1:56=E2=80=AFPM Michael Proto = wrote: > > On Thu, Nov 21, 2024 at 7:11=E2=80=AFAM Rick Macklem wrote: > > > > On Wed, Nov 20, 2024 at 8:01=E2=80=AFPM Michael Proto wrote: > > > > > > Hello all, > > > > > > Running into an issue with a 14.1 server that I think is a bug, thoug= h > > > it may be me not interpreting documentation correctly so I wanted to > > > ask here. > > =3Dalldirs simply means that any directory within the server file syste= m > > can be mounted. So, yes, everything up to the root dir can be mounted. > > > > Normally, the directory for such an exports line would be the root dire= ctory > > of the file system, but I doubt mountd actually enforces that, since th= e export > > line is for "all directories" in the file system. > > > > > > > > Using NFSv3, with FreeBSD 14.1 as the NFS server. Based on what I see > > > in exports(5), if I want to export conditional mounts (IE filesystem > > > paths that are intermittently mounted locally on server) > > No idea what you mean by "intermittently mounted locally"? > > (An export will be for whatever file system is mounted for the director= y > > at the time mountd is started or updates exports when a SIGHUP is > > sent to it.) > > > > Exporting a file system that is not always mounted on the server is > > a very bad idea imho. It would be much better to add the exports(5) > > line after the file system is mounted and remove it before the file > > system is unmounted, if you need to export a file system not always > > mounted. > > > > Agreed, for the rare circumstances where I use this the playbook has > always been to update /etc/exports before and after any (un)mounting, > just interested if mountd would programmatically enforce it for the > hopefully-rare time such steps are overlooked. Seeing that error in > the mountd.c code gave me hope mountd itself could assist there, > regardless I have other ways of achieving the same result. I suppose a new exports option that says "only do the export if the directory path is the root of a file system" might be useful. I'll stick it on my todo list, rick > > Appreciate the response. > > > -Michael Proto