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/&
  • Can you create a small file on the server (like echo hello > newfile) and show what this "scrambled" file looks like from the client? – BowlOfRed Aug 30 '16 at 21:39
  • @BowlOfRed: Thanks for offering your help. I did a very lengthy apt-get upgrade and apt-get dist-upgrade last night which fixed the problem. Apparently, some libraries were out of sync with both the 3.9 and 4.6 kernels. The effect is still interesting, though, since everything else worked. I'm wondering if I should delete the question since its benefits to others is probably minimal. – Marcus Rickert Aug 31 '16 at 9:36

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.