We are currently using NFSv4 for file sharing in a small office.

Unfortunately the network is not very stable and it seems to have huge impact on the Ubuntu clients if the network is gone: The whole system freezes - I think this is due to the nfs mount.

So what would be the alternatives to make files available on the network?

I am used to Samba, but this does not seem to be right, as only Linux is involved.

Security is not an issue in the network.

  • 3
    why/how is your network unstable? Also, I would argue that using linux does not make using samba wrong. Dec 5, 2012 at 12:54
  • @FrankThomas: The network is unstable because we partially use WLAN - and our cabling is bad. Sometimes hard to get good cables here in Ethiopa :-(
    – Alex
    Dec 5, 2012 at 17:37

2 Answers 2


You are probably getting freezes because you are exporting NFS shares with the "hard" option (which is the default). You can change that by using explicitly the "soft" option. The NFS man page has more.

mount -o soft <nfs server ip>:/mountpoint /local_mountpoint

Then in the clients you should no longer have a problem with freezes.

As for a convenient way to implement file sharing, among Linux boxes, NFS is the way. I confess, I too, didn't think the NFS was as versatile as Samba, but if you follow a couple of guidelines NFS can work completely transparently.

  • create the folder /nfs and make links in it for all the folders you want to share.
  • update your /etc/exports file with paths to this /nfs folder.
  • using automount utilities in the clients in order to automate the process of mounting transparently.
  • last but not least, verify that each username on the server and on the clients has the same UID. This way users can access their files (without permission problems) from every client. (if LDAP or NIS is used, then this option is inferred).

Hope this helps.

  • * Exporting directories for NFS kernel daemon... exportfs: /etc/exports:2: unknown keyword "soft"
    – Alex
    Dec 5, 2012 at 13:21
  • hm, my bad, i remembered wrongly. you add the "soft" in the mounting options (mount -o)in the client: [tldp.org link] (faqs.org/docs/linux_network/x-087-2-nfs.mountd.html)
    – nass
    Dec 5, 2012 at 13:25
  • Using "soft" option can lead to silent data corruption. That should be mentioned in the answer. I don't think that is really an option in an office environment.
    – Twonky
    Jan 5, 2019 at 15:19

I agree with the comment from Frank Thomas, using Linux does not preclude you from using Samba. I would prefer NFS shares in an all Linux environment as do a lot of other people but Samba is perfectly fine as well. It is not the only solution to your problem though. Try looking at your NFS mount options. Specifically, look into the intr, soft, tcp, timeo= and retry= options to see if any apply to your environment.

More info can be found here: RHEL 6 Common NFS Mount Options

You can also just man nfs and/or man mount which I use all the time to remind myself of what is available.

  • The "intr" option sounds helpfull, but is no longer supported in kernels > 2.6.25 :-(
    – Alex
    Dec 6, 2012 at 13:14

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.