Penguin

Useful NFS goodness

Helpful commands

showmount -e IP show the exports that exist on machine 'IP'

NFS Hangs when the server goes away

By default NFS will hang until the server responds, ignoring signals. If the server comes back everything should resume and pick up where it left off. If you want to change this behaviour we recommend using 'hard,intr' in fstab(5), eg:

 server:/mount          /mountpoint     nfs     intr,hard       0       0

the 'hard' means 'never give up' (you can use 'soft' here, but it's not a good idea, the server tends to time it out too quickly. you might want to look at timeo= to set this timeout up, but hard is probably wiser)

the 'intr' means 'allow signals to interrupt this process'. ie: if the process has 'hung' waiting on the nfs server, you can still kill it (if for instance you wanted to umount(8) the now broken nfs mount)

NFS Hangs when the servers still there

I was having issues with NFS locking up or producing IO errors when transfering large(ish) ammounts of data (10Meg or more) via NFS using pretty much defult options, changing the options to mount as follows cleared these problems up.

 -o rw,hard,intr,rsize=2048,wsize=2048,nfsvers=3,bg

I exported stuff and NFS isn't allowing it to mount!

You probably forgot to run exportfs(8)? after updating exports(5). Silly you.

I can't mount stuff!

Did you remove rpc.statd(8), portmap(8) or other critical SUN RPC stuff? :)

"When setting up iptables(8) firewalling for Linux systems running the NFS service (network file system), you hit the problem that some of the TCP/IP and UDP ports used by components of the service are randomly generated as part of the SunRPC mechanism. This HOWTO document is part of the !LinWiz? tool kit, and describes how to set up NFS on your server in such a way that meaningful IPTABLES firewall rules can be applied to the system."

Where did portmap go?

If you are setting up nfs on FreeBSD 5.0 or later and wonder where the portmap utility went, it has been renamed rpcbind.

I'm mounting an export, and files are created as "nobody"

Try adding the no_all_squash option to the export in question in /etc/exports. Note, your uid/gids should be the same on the two boxes.

Performance sucks!

Try adding the 'async' option to the export in /etc/exports. Also check your rsize/wsize, larger tends to be better (but does lead to fragmentation) If you have a gig clean path between two hosts, make sure they have 9k byte MTU's and that the r/w size is 8k.

"nfssvc: Function not implemented" error message

This error message when trying to start nfsd indicates that your kernel lacks NFS Server Support (CONFIG_NFSD)

"Root-NFS: Unable to get nfsd port number from server, using default" error message

This error message which may appear while using an NfsRoot? setup indicates that nfsd is not running, which may in turn be caused by the previous error message.

Solaris

Under solaris the mount options were slightly different.

mount -o rw,rsize=8192,wsize=8192,bg,hard,intr,vers=3 10.1.1.1:/nfsexport /mnt/nfs

note: nfsvers becomes vers under solaris (tested on solaris 8)

Useful sites


CategoryNotes