[GLLUG] mounting directories on a remote system

Matt Graham danceswithcrows at usa.net
Fri Apr 15 16:16:22 EDT 2005


On Friday 15 April 2005 15:44, after a long battle with technology, Alec 
Joseph Warner wrote:
> Andy Lee wrote:
>> I need to mount directories on one Linux box from another Linux box.
>> What is the best (easiest?) way to do this? I've found NFS, but I'm 
>> hoping to do something without having to configure an  NFS server on 
>> each box that I want to mount.
> If you are mounting stuff from 1 server to multiple clients, you only
> need 1 NFS server.

Yes, but Andy said "each box".  That makes me think there N machines 
where he will need to configure and run nfsd.  How difficult this is 
depends on how large N is.  But if all the servers need to export the 
same local directory to the same set of machines with the same access 
permissions, you should be able to just write one /etc/exports file and 
push that to all the servers.

> Each computer will probably need some sort of NFS client software 
> although recent kernels have it built in IIRC.

Clients need to do "mount -t nfs machine:/path /mnt/somewhere -o 
wsize=8192,rsize=8192" .  The code for that is all in the kernel.

> NFS is the easiest to configure compared to something like Samba,
> although SWAT is pretty nice for configuring samba as well.  if it's
> all local stuff, and you don't care too much about security, NFS is
> usually the way to go, reliable, standard, simple.

There are reasons why NFS is referred to as the Nightmare File System.  
I've only had to use NFS a few times, but I did run into stupid 
problems with a client/server mismatch once.  Configure kernel on 
server with NFSv3 support, mount filesystem on client running on an 
older kernel, mount hangs.  Rebuild kernel without NFSv3 support, try 
mounting filesystem again, mount works.

People elsewhere have griped about quality-of-implementation problems 
with Linux's NFS server support.  They may have a point.  IIRC, the 
worst problems were with non-Linux NFS clients expecting behavior that 
the Linux NFS server didn't provide, which led to hangs, slow 
performance, data loss, and seriously irritated programmers.

NFS server support appears to require specific NFS kernel hooks now.  
The Samba server does all its stuff in userspace, which makes debugging 
a bit easier.  FWIW, I've only had one problem with Samba since early 
2000, and that problem was easy to solve (remove Redhat 7.0's broken 
Samba RPM, rebuild from vanilla Samba source, everything started 
working.)

Samba has more overhead than NFS.  But... if you have Windows machines 
now, or you may need Windows machines to talk to the Linux machines at 
some point, you may want to just use Samba.

> Samba gives you a bit more control over access permissions, although
> the configuration is way more advanced as far as knowledge goes.

"force group", "create mask", "force directory mode", and so forth?  
You're right in that "man smb.conf" is a lot of information to digest.  
There's SWAT, an O'Reilly book on Samba, and probably a bunch of other 
things available if you Google for "samba tutorial".  

-- 
   "Depress the button," it said.  Gloria looked at the button.  "You're
   a very ugly button," she began.  --Phil Janes, _The Galaxy Game_
There is no Darkness in Eternity/But only Light too dim for us to see


More information about the linux-user mailing list