D&C GLug - Home Page

[ Date Index ] [ Thread Index ] [ <= Previous by date / thread ] [ Next by date / thread => ]

Re: [LUG] NFS with DHCP

 

On Thursday 17 February 2005 5:50 pm, Julian Hall wrote:
I remember coming to grief with this previously.  Basically I want to
set up NFS shares between the desktop and laptop.

That's problematic over wired connections - we've been there before with the 
NFS not being unmounted cleanly before the machine is turned off or put in 
standby - now you want to do this over wireless?? Reconsider NFS, it probably 
isn't worth the hassle. You'll have boxes going down all over the place.

To use NFS, you must put systems in place that cleanly unmount the NFS drive 
before either machine is turned off or put into standby. Generally, I'd 
recommend using scripts that only mount the NFS drive immediately before the 
files are needed and then immediately unmount the drive.

When you've got a static IP for the NFS host AND both host and client are 
going to be running for a long while, NFS is perfect. I use it all the time 
for precisely this purpose. However, this is for the server and the desktop 
on a wired connection - BOTH have been running non-stop for a minumum of 2 
months.

The router however 
states in the documentation it requires DHCP for the wireless to work
correctly.

But that does not mean you cannot use static names for certain connections. To 
ping a box, you must be able to resolve the hostname to an IP address. Now 
you can get into all kinds of clever dynamic DNS to get around this, but the 
easiest and most efficient method is simply to set each machine that needs a 
hostname to have a static IP. That's ifconfig on GNU/Linux and somewhere in 
the depths of Network something on Windows.

You can have the NFS host (natalie?) on a static IP and then your only 
concerns are enforcing an absolute ban on shutting down the laptop without 
unmounting the NFS drive. Unfortunately, as you've got Windows on that 
laptop, a reboot cannot be ruled out and this can cause problems.
:-(

Why not use Samba? That doesn't rely on NFS.

Pinging rachel from the desktop gives 'unknown host' and this is where I
hit a brickwall last time if memory serves.  However last time with a
wired network and only two machines active on it I had the luxury of
setting up static IPs on both machines.

Static is not a luxury on an internal network, only on an internet connection. 
Static is the most common on an internal network and is all but essential if 
you want to connect between the boxes - SSH, FTP, HTTP, email etc.

Now my Dad has my old laptop 
running Win2K on wireless, so a) I can't use static IPs and b) now I
have no control over what order the PCs get switched on.

Your wireless router may need DHCP to be enabled for wireless, but are you 
sure that NO static IP can be over wireless? That's limiting.

Therefore I can't for example put an entry in /etc/fstab of:

rachel:/home/julian /mnt/rachel nfs

That will fail only because you can't resolve the hostname. Hostnames don't go 
over the network, that's the IP. You must always be able to resolve a 
hostname to an IP address.

In the first instance it can't resolve who/where rachel is and in the
second instance rachel may not always have the same IP address.
Needless to say I can't enter anything into the hosts file to tell the
system rachel (or my Dad's machine penyfan for that matter) are on
specific IPs when they may not be in a day's time.

Is using NFS dead in the water as I suspect?

Without dynamic DNS and careful scripting, I'd reconsider your options.

Why haven't you done this in Samba?

-- 

Neil Williams
=============
http://www.dcglug.org.uk/
http://www.nosoftwarepatents.com/
http://sourceforge.net/projects/isbnsearch/
http://www.neil.williamsleesmill.me.uk/
http://www.biglumber.com/x/web?qs=0x8801094A28BCB3E3

Attachment: pgp00044.pgp
Description: PGP signature