Date: Fri, 2 Dec 2016 12:23:10 -0700 From: Jordan Ladora <vicepresjoebiden@gmail.com> To: freebsd-net@freebsd.org Subject: File duplication on NFSv4 exported ZFS filesystems to centos client Message-ID: <CAKC6PD2seS%2BPYNL-xCJ7L%2BRQTh8k83h64-ukbWTq90fnSd=k_A@mail.gmail.com>
next in thread | raw e-mail | index | archive | help
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=3Dtcp,nodev,noexec,nosuid 10.0.100.100:/zpool_nfsv4 /zpool_nfsv4 mount -t nfs4 -o rw,intr,hard,proto=3Dtcp,nodev,noexec,nosuid 10.0.100.100:/zpool_nfsv4/zfs2 /zpool_nfsv4_zfs2 mount -t nfs4 -o rw,intr,hard,proto=3Dtcp,nodev,noexec,nosuid 10.0.100.100:/zpool_nfsv4/zfs3 /zpool_nfsv4_zfs3 The FreeBSD share and centos client have the same username (nfsuser), groupname, and user:group IDs, which also owns the exported /zpool_nfsv4, so UID/GIDs map correctly on the client and permissions work fine. The unexpected behavior happens when the user touches a file on the client's share of either /zpool_nfsv4/zfs2 or /zpool_nfsv4/zfs3- sudo -u nfsuser touch /zpool_nfs4_zfs2/testfile # centos client ...this new file then also appears immediately on the client's share mount at- /zpool_nfs4_zfs3/testfile ...but not at /zpool_nfs4 (the top-level zfs). It is not duplicated on the server and there it only appears [in the correct location] at- /zpool_nfs4/zfs2/testfile # freebsd server If I unmount the share and remount it, it looks the same (you still see the duplicate file on the client) and =E2=80=98testfile=E2=80=99 can be manipul= ated on the client from either location. This also doesn't happen if touching a file on the top-level dir (/zpool_nfsv4) on the client (in other words, there is no duplication seen on the client if nfsuser touches e.g. /zpool_nfsv4/testfile). 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. It seems to me that two of the zfs filesystems (zfs1 and zfs2) are mapping to the same place on the client, but I'm not sure how to deal with this...
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAKC6PD2seS%2BPYNL-xCJ7L%2BRQTh8k83h64-ukbWTq90fnSd=k_A>