Date: Sun, 4 Dec 2016 12:55:12 -0700 From: Jordan Ladora <vicepresjoebiden@gmail.com> To: "freebsd-net@freebsd.org" <freebsd-net@freebsd.org> Subject: Re: File duplication on NFSv4 exported ZFS filesystems to centos client Message-ID: <CAKC6PD3G-puthSTozynxTxNFwQ2ZMX8mLHso7PnuPhfPnbOj9A@mail.gmail.com> In-Reply-To: <YTXPR01MB01898AEAA3BBC09ACDF3E338DD8E0@YTXPR01MB0189.CANPRD01.PROD.OUTLOOK.COM> References: <CAKC6PD2seS%2BPYNL-xCJ7L%2BRQTh8k83h64-ukbWTq90fnSd=k_A@mail.gmail.com> <YTXPR01MB01898AEAA3BBC09ACDF3E338DD8E0@YTXPR01MB0189.CANPRD01.PROD.OUTLOOK.COM>
next in thread | previous in thread | raw e-mail | index | archive | help
Ahh!! Thank you! Previously, I tried exporting just the top-level zfs, but then couldn't access the zfs filesystems inside from the client, but listing *all* of them in /etc/exports and only mounting the top-level zfs works perfectly. Just wondering, by the way, if you knew why 'echo' doesn't work on NFS shares? I've not tried it with any other version besides NFSv4, but every other command I've tried on the NFSv4 share works (e.g. cp, rm, cat, nano, rsync, mv, tar) but, for some reason, when I try to 'echo >> <some file on NFSv4 share from client>' it does not work. Again, thanks for your help. On Fri, Dec 2, 2016 at 3:04 PM, Rick Macklem <rmacklem@uoguelph.ca> wrote: > Jordan Ladora wrote: > >Curious phenomenon of file pseudo-dup with exported ZFS filesystems on > >FreeBSD 10.3-REL NFSv4 export to a centos7 client. > > > > > >*FreeBSD server-* > > > >zpool create zpool_nfsv4 ... > > > >zfs create zpool_nfsv4/zfs2 > > > >zfs create zpool_nfsv4/zfs3 > > > > > >/etc/exports- > > > >V4: / > > > >/zpool_nfsv4 > > > >/zpool_nfsv4/zfs2 > > > >/zpool_nfsv4/zfs3 > > > > > >zfs unshare -a > > > > > >*Centos client-* > > > >mkdir /zpool_nfsv4 > > > >mkdir /zpool_nfsv4_zfs2 > > > >mkdir /zpool_nfsv4_zfs3 > > > >mount -t nfs4 -o rw,intr,hard,proto=tcp,nodev,noexec,nosuid > >10.0.100.100:/zpool_nfsv4 > >/zpool_nfsv4 > > > - I'll call this mount #2. > >mount -t nfs4 -o rw,intr,hard,proto=tcp,nodev,noexec,nosuid > >10.0.100.100:/zpool_nfsv4/zfs2 > >/zpool_nfsv4_zfs2 > - I'll call this mount #3. > >mount -t nfs4 -o rw,intr,hard,proto=tcp,nodev,noexec,nosuid > >10.0.100.100:/zpool_nfsv4/zfs3 > >/zpool_nfsv4_zfs3 > By default (unlike NFSv3) NFSv4 mounts the entire tree of file systems > under the mount point and not just the file system being mounted. > You have two choices: > 1 - Don't do mount #2 or mount #3. The first mount should allow you to > access /zpool_nfsv4/zfs2 and /zpool_nfsv4/zfs3 with the addition > mounts. > OR > 2 - Turn of the "whole tree" behaviour on the server via: > # sysctl vfs.nfsd.mirrormnt=0 > on the FreeBSD server. > (I know, mirrormnt is a weird name for it, but that is what Linux used, > so... > I guess it means "mirror the tree of mounted file systems on the server > to the clients".) > [stuff snipped] > >This seems similar to this (https://serverfault.com/quest > >ions/535318/creating-two-nfs-shares-from-same-server-but- > >when-mounted-both-point-to-same-d) thread with NFSv4 exports on a centos > >server, but I cannot find anything similar to what I see here with a > >FreeBSD NFSv4 server. > What you did definitely had the same file systems mounted multiple times, > so I suspect that is what caused this behaviour. > > rick > > >
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAKC6PD3G-puthSTozynxTxNFwQ2ZMX8mLHso7PnuPhfPnbOj9A>