[zfs-discuss] NFSv4 client: cat to changed file ends with not found

Jörg Ullmann via zfs-discuss zfs-discuss at list.zfsonlinux.org
Thu May 7 08:07:47 EDT 2015


Hey all.

We get in trouble since an update from our clients from Ubuntu 12.04 to Ubuntu 14.04.

The behavior:

On client A I change an existing file foo on a nfs share.
On client B I do a cat foo.

1st time after mounting it works. cat shows the content of foo. But if I change foo on client A again and do the cat on
B I get the error:
cat: foo: No such file or directory

Doing a `ls` on B resolves the problem and `cat foo` works again showing the new content. But if I change foo on client
A again the cat wont work.

Analysis:

If a Program on B does the system call "stat" first, everything works. But if a program like cat directly uses the system
call open it will not find the file!

With tcpdump and wireshark I can see that Ubuntu 12.04 calls in the NFS paket under "PUTFH" using the correct (updated)
filehandle but
in 14.04 the filehandle is wrong (equals the old filehandle. before the change on system A)

Now the very interesting part: If my nfs share on the server site resides on ext4 filesystem and I share it over
the /etc/exports, the nfs server answers with the error code NFS4ERR_STALE. The client (B) will do a second request with the
correct filehandle and everything works fine. Even on 14.04.

If my nfs share on the server site rsides on a ZFS filesystem (ZoL 0.6.4.1, CentOS 7) and I share it over the
sharefs option, the nfs server answers with the error code NFS4ERR_NOENT. The client will fail.

Questions:
1. How can I get the newer clients (14.04+) to update the filehandle correctly like on 12.04
2. (Alternatively) How can I get the server to answer with NFS4ERR_STALE on a ZFS filesystem? Or how should the server
answer look like according to the specifications?

regards Joerg
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ullmann.vcf
Type: text/x-vcard
Size: 224 bytes
Desc: not available
URL: <http://list.zfsonlinux.org/pipermail/zfs-discuss/attachments/20150507/05b21d81/attachment.vcf>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: OpenPGP digital signature
URL: <http://list.zfsonlinux.org/pipermail/zfs-discuss/attachments/20150507/05b21d81/attachment.sig>
-------------- next part --------------
_______________________________________________
zfs-discuss mailing list
zfs-discuss at list.zfsonlinux.org
http://list.zfsonlinux.org/mailman/listinfo/zfs-discuss


More information about the zfs-discuss mailing list