I have a FreeBSD 10 server with a ZFS filesystem which our XenServer hosts backup to, and I discovered some rather disturbing behavior when I attempted to use to it distribute a patch to the XenServers, namely that when the client reads a file from the NFS share, the file is corrupted. An example using Pride and Prejudice can be found in this repository: https://github.com/Whoops/crazy-nfs
It looks like in the corrupted version, every so often in the middle of the file there will be a binary string, which is followed by the start of the file. Writing over NFS results in a correct file on disk, but the same client reading it back will see a corrupted version. Each client appears to get a different corrupted version. I've replicated this on several Xenserver 6.2 (kernel 2.6.32) clients as well as an Ubuntu 10.04 (3.11.0), however when I tested on our only other FreeBSD based machine (PFSense 2.1.4) it did *not* see the issue, so I can't rule this out as a Linux bug. I (thankfully) do not see this issue on anything connected to our main storage server, which runs Ubuntu 10.04.
This occurs with both NFS3 and 4. My exports file is pretty straightforward:
And I'm not using an special options on the client
I'm not sure where to go from here in troubleshooting this. I've been unable to find anyone with similar problems on the web, nor have I been able to find an NFS bug that sounds related.
It looks like in the corrupted version, every so often in the middle of the file there will be a binary string, which is followed by the start of the file. Writing over NFS results in a correct file on disk, but the same client reading it back will see a corrupted version. Each client appears to get a different corrupted version. I've replicated this on several Xenserver 6.2 (kernel 2.6.32) clients as well as an Ubuntu 10.04 (3.11.0), however when I tested on our only other FreeBSD based machine (PFSense 2.1.4) it did *not* see the issue, so I can't rule this out as a Linux bug. I (thankfully) do not see this issue on anything connected to our main storage server, which runs Ubuntu 10.04.
This occurs with both NFS3 and 4. My exports file is pretty straightforward:
Code:
/backup/vm -maproot=root -alldirs
V4: /backup/vm -sec sys
And I'm not using an special options on the client
Code:
10.15.10.251:/ on /mnt/backup type nfs4 (rw,addr=10.15.10.251)
I'm not sure where to go from here in troubleshooting this. I've been unable to find anyone with similar problems on the web, nor have I been able to find an NFS bug that sounds related.