Results 1 to 2 of 2

Thread: [zfs] nfs client: cat to changed file ends with not found

  1. #1
    Join Date
    May 2015
    Beans
    2

    [zfs] nfs client: cat to changed file ends with not found

    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 on client B 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 resides on a ZFS filesystem (ZoL 0.6.4.1, CentOS 7 and Ubuntu 14.04) and I share it over the sharefs option or /etx/exports, 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

  2. #2
    Join Date
    May 2015
    Beans
    2

    Re: [zfs] nfs client: cat to changed file ends with not found

    patched within ZFS on Linux:

    https://github.com/zfsonlinux/zfs/pull/3404


    get the git version and compile it:

    git clone https://github.com/zfsonlinux/zfs.git

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •