NFS failure (more) (was Re: [plug] SIGHUP woody nfs)

Harry McNally harrymc at decisions-and-designs.com.au
Sun Dec 30 18:18:09 WST 2001


Thanks for your thoughts, Beau

At 10:23  30/12/01 +0800, you wrote:
>Hmm,
>
>My notes about nfs.
>
>I have always found the user space nfs server to be more reliable than the
>kernel space nfs server (but I haven't tried it on a late 2.2 or late 2.4
>kernel), and not much slower. In particular, when more than one client is
>accessing the nfs server, the 2.4.5 kernel server tends to hang clients,
>while the user space version keeps trucking.

Yes. I read that the kernel server was buggy and I think it still is. I 
moved to user server and got better results.

Although, I've found that nfs-kernel-server is happy with the following 
/etc/exports:

/cdrom 192.168.1.0/24(ro)

whereas nfs-user-server needs:

/cdrom 192.168.1.0/255.255.255.0(ro)

so the "number of bits in netmask" format might now be superceded. No notes 
about it, so I'll submit a report bug and see.

>The user space nfs server may be difficult to compile on modern distributions
>(like slackware 8), due to header changes. This can ussually be fixed by
>fudging things around though.

apt-get install nfs-user-server (thank goodness :)

'Twas neat to see the nfs-kernel-server stopped, removed, nfs-user-server 
installed and started .. hands free :)

>Another important this is that you must run rpc.portmap on BOTH the client
>and server (don't ask me why)

Hmmm. I had the client box booted from floppy with potato compact boot 
images so it wasn't up to this point. It might explain why the thing 
struggled.

>On that tone, make sure your hosts.allow and hosts.deny are correct. It may
>also make sense to use the firewall to block access to the portmapper from
>anywhere it isn't needed. For clients, only localhost should be able to
>access their portmapper, and only the clients should be able to access the
>server portmapper.

Still new to this. Because there are no hosts.allow or hosts.deny entries 
for nfs, mountd, and portmap it lets all through which I know is bad but 
just kicking off at the moment. I'll keep tweaking.

>One more thing, make sure you run the mountd installed by the user space nfs
>domain when using the user space nfs domain, rather than the kernel space
>mountd. I found it useful to install the user space nfs libraries in a
>different directory (like /usr/lib/unfsd) and have an init.d script run it
>directly from there so things don't become confused.

It looks like apt-get has taken care of this. the packages install specific 
binaries rpc.nfsd and rpc.mountd and the script in /etc/init.d starts and 
stops the right ones. I'm impressed with Debian as a new tinkerer.

>Your exports file looks fine though.

See above.

All the best
Harry

epilogue .. I've found a way with less tinkering .. niggle me if needs be but:

Apache is running on the server looking at /var/www so:

# mount /cdrom
# cd /var/www
# ln -s /cdrom cdrom

At the box to install potato select HTTP to load the base system with URL:

http://192.168.1.X/cdrom

where X is servers IP and it worked a treat :) Server is a 166MHz Pentium 
that still managed to deliver 590KB/s. After a day and a half stuffing 
about with NFS is was all over in a couple of minutes .. <shrug> .. what 
should I use next time <thinks ..> cu




More information about the plug mailing list