I have a setup with one server and two clients, all running Debian. The server has several exported file systems which are mounted on the clients using
autofs and NFS. Until a few days ago this worked perfectly. For some other reason I had to upgrade the kernel on the server from a very old 3.2 to a now very current 4.6. Since then I have the following effect:
The filesystems are visible on the clients and
ls works fine, that is the names and attributes of all files are correct. However, when I open any of the files the content is completely scrambled. The length of the files (tested for e.g. very short configuration files) seem to match the file length on the server, though. I've tried both NFS3 and NFS4 mounts and a lot of different parameters. None seem to work.
What is really strange is this: When I create a file on the client I can see the file on the server AND the content is correct! When I modify the file on the server and reload on the file on the client the content is scrambled again. So the scrambling is only one way!
The first thought was, that this related to the specific 4.6 kernel. So I installed a 3.9 kernel with the same effect. Somehow something broke in my NFS setup on my server (other than the kernel) and I have no clue what. Can anybody help? Thanks!
Here are some configurations:
/etc/exports: on the server
/nfs/export *.chaos-hs(sync,no_root_squash,no_subtree_check,fsid=0,rw,anonuid=65534,anongid=65534) /nfs/export/home/mr *.chaos-hs(sync,no_root_squash,nohide,no_subtree_check,rw,anonuid=65534,anongid=65534) # some more exports
/etc/autofs/auto.home on the client
* -fstype=nfs4,rw,wsize=16384,rsize=16384,proto=tcp,intr casimir-hs.chaos-hs:/home/&