Score:0

Default timeout for server commands - NFS mount

ug flag

Noticed the following: if a NFS mount becomes unavailable for whatever reason, most linux commands will wait endlessly.

Doing an ls -lahF on the mount path just waits... forever. And never returns.

I could run everything with a timeout 5 in front of it, but that feels hamfisted.

Especially when one trusts services either run, or generate an error log that can be picked up, this behavior is dangerous as things could run for a long time like this without being noticed.

What can I do to immunize myself and my systems against this? Wrap everything in checks? Surely there must be a better way? Like a mount option for NFS mounts?

Looks like there is: https://linux.die.net/man/5/nfs

But experience shows it doesn't do anything.

Mounting as soft with default settings should throw a server not responding message after 3 minutes. But even after 30 minutes, all commands I tried just keep hanging...

EDIT: Setting a lower timeo and retrans in combination with "soft" seems to work.

de flag
The timeouts in the NFS protocol handled by the RPC layer. As a result, it's not possible to have different commands for different operations...
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.