Mailing List Archive

Support open source code!


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: tlug: NFS question



>>>>> "Frank" == Frank Bennett <bennett@example.com> writes:

    Frank> The design strategy (someone step on my fingers if I'm
    Frank> crawling in the wrong direction...) is to load processing
    Frank> overhead onto the terminals, and to centralize data storage
    Frank> and machine configuration details on the server.  The
    Frank> terminal machines will run Applix and Netscape and what
    Frank> have you, from the disk in each terminal.  Data, mail, and
    Frank> bootpd parameters will be stored on the server.

Is it really necessary to have the applications on the individual
machines? I would just through them on the server and make upgrade
easier.
 
    Frank> This will require that the user's home directory be in an
    Frank> NFS or other remote-mounted filesystem, and I just realized
    Frank> that I don't know how best to set this up, nor indeed
    Frank> whether it will work at all.

    Frank> Am I going to run into massive overhead by exporting /home
    Frank> to every terminal (there will be about 20 at the start, but
    Frank> numbers will grow; and there will be 300+ subdirectories in
    Frank> /home)?  Will this require that the /etc/password on the
    Frank> server is cloned to the client to assure that permissions
    Frank> are synced between the two systems?  Are permissions on an
    Frank> NFS-mounted filesystem going to be as easy to walk around
    Frank> as, thinking idly about the problem here at my desk this
    Frank> evening, I think they will be --- by hacking the
    Frank> /etc/passwd ID number or password on the client machine?
    Frank> It all seems rather scary somehow.

Easiest way to tackle this is to make use of the automounter. What the
automounter does is, as its name implies, automatically mount
directories, under some give mount point. First, lets look at how this
would this would work manually: 

	Lets say I have two server machines, server1 and server2. My
home directory is on server1, /home/andy. Yours is on server2,
/home1/frank.

To make things simple, I want to always mount my home directory under
the same mount point, no mater which client machine I'm on. Lets make
the mount point "/h". My passwd entry would look like:

andy:12345:150:15:Andrew S. Howell:/h/andy:/usr/local/bin/tcsh

On client machine client1, I would need to run mount as root:

mount server1:/home/andy /h/andy

If you logged in, it would be:

mount server2:/home1/frank /h/frank

You could setup all client machines to mount all the home directories
from all the servers, but that would 1) mount lots of stuff that would
never be used, 2) be a pain to maintain.

This is where the automounter, or autofs [1] comes in. The automounter
needs some maps to tell it 1) what are the mount points it looks
after, and 2) what machines to mount directories from. The first,
normally /etc/auto.master:

# Sample auto.master file
# Format of this file:
# mountpoint map options
# For details of the format look at autofs(8).
/h     /etc/auto.h      --timeout 60

This shows a mount point, /h, in the first column. The second column
file to look for that maps directory name to server mount
point. /etc/auto.h would look like:

andy	server1:/home/andy
frank   server2:/home1/frank

If I'm on client1, and I cd to /h/frank, the autofs intervenes, looks
up frank in /etc/auto.h, finds it need to mount from
server2:/home1/frank. 

THe next step is to figure out how to distribute the maps. This can be
done by copying them to all the clients, maybe by rdist or rsync, or
using NIS.

The other thing that the automounter does is automatically unmounts
directories when they are no longer in use.

One big advantage of the automounter is that when you need to users to
another disk, or even another server, all you have to do is move their
files, change the map and have them logout. When they log back in,
there home directory will be mounted from its new location.
( Providing that the automount had enough time to unmount the old one)

I'll be glad to provide more details if you want. Note that this is
not limited to just home directories. You can use for apps as well. I
have stuff automounted under /apps/APPLICATION. Example
/apps/netscape. The full path ends up being
/apps/APPLICATION/VERSION/PLATFORM/bin, say
/apps/netscape/4.5.0.b1/sun4-55/bin

Hope this helps,

	Andy

[1] There are two "automounters" used under linux. The older one is
amd, and newer one, which is also used under various commercial Unix
system, is autofs. amd has gads of options, but more of a pain to use,
and probably not as well supported now, and in the future.

---------------------------------------------------------------
Next Nomikai: 20 November, 19:30 Tengu TokyoEkiMae 03-3275-3691
Next Meeting: 12 December, 12:30 Tokyo Station Yaesu central gate
---------------------------------------------------------------
Sponsor: PHT, makers of TurboLinux http://www.pht.co.jp


Home | Main Index | Thread Index

Home Page Mailing List Linux and Japan TLUG Members Links