Date: Thu, 21 Nov 2024 16:56:13 -0500 From: Michael Proto <mike@jellydonut.org> To: Rick Macklem <rick.macklem@gmail.com> Cc: FreeBSD-STABLE Mailing List <freebsd-stable@freebsd.org> Subject: Re: 14.1 NFS / mountd : -alldirs not working as expected Message-ID: <CAGAnWo1u%2BGv2TXwDXfEJqH5oD1PjdX2xo=fhZ=bs=WgJ56bmyA@mail.gmail.com> In-Reply-To: <CAM5tNy6P8v_f6gwoa-J%2BQbxznqz5mNOQ-w%2B-eOm34aRSeuEdeQ@mail.gmail.com> References: <CAGAnWo3=mWG70R3k7rP8U0Gh7aWpTvFc5u2GLDWV=vQo38fX6Q@mail.gmail.com> <CAM5tNy6P8v_f6gwoa-J%2BQbxznqz5mNOQ-w%2B-eOm34aRSeuEdeQ@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On Thu, Nov 21, 2024 at 7:11=E2=80=AFAM Rick Macklem <rick.macklem@gmail.co= m> wrote: > > On Wed, Nov 20, 2024 at 8:01=E2=80=AFPM Michael Proto <mike@jellydonut.or= g> wrote: > > > > Hello all, > > > > Running into an issue with a 14.1 server that I think is a bug, though > > it may be me not interpreting documentation correctly so I wanted to > > ask here. > =3Dalldirs simply means that any directory within the server file system > 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 direct= ory > of the file system, but I doubt mountd actually enforces that, since the = 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 directory > 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. Appreciate the response. -Michael Proto
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAGAnWo1u%2BGv2TXwDXfEJqH5oD1PjdX2xo=fhZ=bs=WgJ56bmyA>