-   Linux - General (
-   -   NFS efficiency (

sjreilly 03-01-2010 07:21 AM

NFS efficiency

I have used NFS for a number of year but recently I was wondering about which was the more efficient as a mounting method.

On the server there are two areas that are exported /home and /opt
Thus on the client fstab file I have two nfs entries;

server:/home /home nfs defaults,intr 0 0
server:/opt /opt nfs defaults,intr 0 0

What I am wondering is, would the network be more (or less) efficient if I moved the contents of /opt on the server to, say, /home/opt, then on the client had only one mount line then a bind mount line;

server:/home /home nfs defaults,intr 0 0
/home/opt /opt auto bind 0 0

Or, should I be moving away from nfs.



acid_kewpie 03-01-2010 07:45 AM

Well there would be slightly less overhead on a single connection, in terms of the outright connectivity, but when comparing the management overhead with the files themselves, there is no worthwhile saving to be made.

There is a big difference between NFSv3, which you're presumably using, and NFSv4. the old version is UDP and portmap based, whilst the newer stndards are much simpler and purely TCP based on a single connection port, and also only have one export per server as the formal model, using the fsid=0 terminology, largely similar to your thoughts about a single mount point on v3.

sjreilly 03-01-2010 11:25 AM

Hi Chris,

I did give nfs4 a go last year but ran into issue with servers running Solaris 8, but lets ignore that for a minute.

I've set the server up to export a la nfs 4, this is the exports file;

/data *.localnetworkname(rw,sync,no_root_squash,no_subtree_check)
/exports *.localnetworkname(rw,fsid=0,insecure,no_subtree_check,async)
/exports/data *.localnetworkname(rw,nohide,no_root_squash,insecure,no_subtree_check,async)

The NFS3 entry is still there so I don't mess up the rest of the network.

I then restarted idmapd.

On the client fstab I have;

server:/data /mount/server/data nfs4 defaults 0 0
/mount/server/data/home /home auto bind 0 0
/mount/server/data/opt /opt auto bind 0 0

But during boot I get a message;

mount: special device /mount/server/data/opt does not exist.

Do I need to put the bind mounts in rc.local or am I doing something wrong.
mount -a works once the machine has fully booted.



sjreilly 03-03-2010 09:48 AM

Now that I have my server running NFSv4 I have run into a couple of odd issues.

The server is exporting both home directories (/data/home) and software (/data/opt)

On clients mounting the exported dirs as NFSv4 I have these lines in their /etc/fstab;

server:/data/home /home nfs4 defaults,intr 0 0
server:/data/opt/softwarea /opt/softwarea nfs4 noatime,async 0 0
server:/data/opt/softwareb /opt/softwareb nfs4 noatime,async 0 0

I am now receiving errors when trying to invoke particular tools in /opt/softwarea and /opt/softwareb


\o Error trying to exec /opt/softwarea/tools/jre1.50/bin/java (deleted).
\o Check if file exists and permissions are set correctly.
\o *Error* Failed to launch WaveScan. There is a problem with the DFII
\o installation hierarchy (Exit Code = 81).
\o For further assistance, contact Cadence Customer Support
\o with the diagnostic information available in the log file.
\o You can use AWD as your waveform viewer until the problem
\o is resolved.
\o *Info* Dumping diagnostic information ....
\a hiDBoxOK(geDBox)
\r t
\o Loading schematic.cxt
\o Loading lo.cxt
\o /opt/cds/softwarea/tools/dfII/bin/checkwavescan: line 348: uudecode: command not found

These errors do not appear if I go back to NFSv3



All times are GMT -5. The time now is 12:32 PM.