Date: Fri, 24 Nov 2023 07:18:08 -0600 From: Mike Karels <mike@karels.net> To: Konstantin Belousov <kostikbel@gmail.com> Cc: Alexander Leidinger <Alexander@leidinger.net>, Rick Macklem <rmacklem@freebsd.org>, src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: git: f5f277728ade - main - nfsd: Fix NFS access to .zfs/snapshot snapshots Message-ID: <F4EB20B7-5AB8-4448-84BB-462BC7C37398@karels.net> In-Reply-To: <ZWCe8k_lxWSpDA1L@kib.kiev.ua> References: <202311231525.3ANFPBo6039293@gitrepo.freebsd.org> <987d4593d50b9cbffb9b6443d3825499@Leidinger.net> <ZWCe8k_lxWSpDA1L@kib.kiev.ua>
next in thread | previous in thread | raw e-mail | index | archive | help
On 24 Nov 2023, at 7:02, Konstantin Belousov wrote: > On Fri, Nov 24, 2023 at 08:50:22AM +0100, Alexander Leidinger wrote: >> Am 2023-11-23 16:25, schrieb Rick Macklem: >>> The branch main has been updated by rmacklem: >>> >>> URL: https://cgit.FreeBSD.org/src/commit/?id=3Df5f277728adec4c5b3e840= a1fb16bd16f8cc956d >>> >>> commit f5f277728adec4c5b3e840a1fb16bd16f8cc956d >>> Author: Rick Macklem <rmacklem@FreeBSD.org> >>> AuthorDate: 2023-11-23 15:23:33 +0000 >>> Commit: Rick Macklem <rmacklem@FreeBSD.org> >>> CommitDate: 2023-11-23 15:23:33 +0000 >>> >>> nfsd: Fix NFS access to .zfs/snapshot snapshots >>> >>> When a process attempts to access a snapshot under >>> /<dataset>/.zfs/snapshot, the snapshot is automounted. >>> However, without this patch, the automount does not >>> set mnt_exjail, which results in the snapshot not being >>> accessible over NFS. >>> >>> This patch defines a new function called vfs_exjail_clone() >>> which sets mnt_exjail from another mount point and >>> then uses that function to set mnt_exjail in the snapshot >>> automount. A separate patch that is currently a pull request >>> for OpenZFS, calls this function to fix the problem. >> >> May the same/similar fix like for ZFS be needed / useful for nullfs mo= unted >> stuff? >> >> I have a ZFS dataset which is mounted via nullfs into a jail. This >> nullfs-mount is then exported via samba. In samba I have the shadow-co= py >> stuff enabled, but it doesn't work, as the jails can't access the snap= shot. > > Jails cannot access snapshots because, as I understand, snapshots > are mounts. Nullfs does not provide an option to recursively bypass > into mounts. The patch you responded to does not automatically mounts > snapshots on clients, it only allows them to mount if wanted. It works for me, with main and this change, or 13.2 without a patch. I don't know the mechanics, but it doesn't use nullfs, and the snapshot does not show up as a separate filesystem with the mount command. Mike > You might try to set up something with autofs, no idea if it could be m= ade > to work usefully.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?F4EB20B7-5AB8-4448-84BB-462BC7C37398>