NFS and mountable filesystems

Duane Attaway dattaway at dattaway.org
Tue Nov 25 14:53:49 CST 2003


On Tue, 25 Nov 2003, Greg Kedrovsky wrote:

> Is there a special deal with NFS and mountable filesystems (like a cdrom
> or internal zip drive)?

Its actually very simple.  You just need three things:

1) you must declare the mounted directory for exporting.  You can use the
exportfs command or hard wire it into your configuration file 
/etc/exports ...the directory to be exported, hosts which can see it, and 
what permissions they will have should be declared:

/ 192.168.1.3(rw,no_root_squash)

would give the client 192.168.1.3 full root access to the root directory.  
It would 0wn the server.

Oh, you can see what nfsd is currently exporting in the /var/lib/nfs 
directory.  Cat those files to the screen and it will tell you what 
directories are being exported to whom and how.

2) /etc/hosts.allow must have an entry for the client to have permission 
to even talk to the nfs server.

3) nfsd, portmapper, and all its friends must be running.  This is all 
done in your nfsd startup script.  You can also send nfsd, portmapper and 
friends hangup signals to reread changed /etc configuration files without 
running the scripts also.

And your client can mount everything from there with the mount command.  I 
believe the server will be trying to talk to the portmapper on the client 
(the mount command may hang for a few minutes without it.)

mount nfs.server.org:/ /mnt/nfs

That would mount the root directory of the server on the /mnt/nfs 
directory.

That's all I would do...




More information about the Kclug mailing list