Linux – NFS v2 versus v3

linuxnfssolaris

I'm having problems with two systems (a Solaris client and Linux server) using NFS v3 to mount home directories. (NFS v4 simply doesn't work at all, for what I'm told by another sysadmin here is a "known issue".) NFS v2 appears to work properly.

My question is this: what are the tradeoffs between using NFS v2 and NFS v3? I need to make a decision as to whether to keep trying to debug this problem or just deciding to live with NFS v2 for this one client.

I know there's a file size limit with v2, although I've seen conflicting information — is it a 2 GB or 4GB limit? There's also a performance penalty to v2; is it possible to quantify the speed limitations with v2 in a general way, or does that depend too much on the specific systems and networks involved? (For what it's worth, I've got gigabit Ethernet between the systems.) What other tradeoffs are there between the two? Are there any security issues I should be aware of?

Best Answer

In addition to existing answer.

NFSv3 has READDIRPLUS operation, which allows to get directory listing with file attributes at once - a big performance improvements on directory listing. Additionally, V3 has weak cache consistency, which keep client cache happy and allows client not to aswk for too much information. Plus, TCP as a transport. With UDP you may have data losses with big read-write IO buffer size. ACCESS call, allows client to re-use cached data if an other user wants to access the same file.