Networking Forums

Networking Forums > Computer Networking > Linux Networking > NIS, Automounter and NFS

Reply
Thread Tools Display Modes

NIS, Automounter and NFS

 
 
scorpioboii
Guest
Posts: n/a

 
      07-28-2005, 11:12 PM
Hi:

I have had significant difficulties getting my RedHat linux clients(EL
3.0) to automount home directories that are specified in NIS maps in a
NIS domain to which the client belongs.
Let me describe the situation more clearly:
My client, node1 is a NFS client of NFS server, nfs1, and a NIS client
of machine, nis1.

One node1:
In /etc/hosts there are ip records of both nis1 and nfs1.

In /etc/auto.master:
/home yp:auto.home

In /etc/auto.home:
+auto.home

In /etc/nsswitch.conf:
automount: file nis

Also on node1:
ypcat -k auto.home yeilds the entire content of the NIS auto.home
map.All the NIS maps are visible on the client node1.e.g.

ypcat -k auto.home
testuser nfs1:/export/home/testuser

and mounting:
mount -t nfs nfs1:/export/home/testuser /mnt
works well, so it apperas NFS works well.

However, if I "cd /home/testuser" on the client i get an error stating
the directory does not exist.

Can anyone tell me how to get NIS, autofs and NFS working well together
so that I can specify the NFS mounts via the NIS maps to my client
machines so that autofs works like if I had specified the NFS mounts
via the local /etc/auto.home file? All machines are running RedHat
ENterprise Linux 3.

thanks in advance.
Larry

 
Reply With Quote
 
 
 
 
Lawrence D¹Oliveiro
Guest
Posts: n/a

 
      07-29-2005, 09:01 AM
In article <(E-Mail Removed) .com>,
"scorpioboii" <(E-Mail Removed)> wrote:

>I have had significant difficulties getting my RedHat linux clients(EL
>3.0) to automount home directories that are specified in NIS maps in a
>NIS domain to which the client belongs.


Do you really need to do this?

With my one NIS-using client, everybody's home directories reside in
/home on the main server anyway, so I have that entire directory
exported and permanently mounted via NFS on all the other machines.
 
Reply With Quote
 
scorpioboii
Guest
Posts: n/a

 
      07-29-2005, 11:33 AM
Why permanently mount home directories when you have an automounter? In
a large enterprise this is so much needless NFS traffic.

Anyways, I dont want to get into different preferences. I want to learn
why this solution does not work.
Its an elagant, effecient solution and I have seen it work well in a
solaris environment a few years back.

Thanks

 
Reply With Quote
 
scorpioboii
Guest
Posts: n/a

 
      07-29-2005, 07:36 PM
I got this to work nicely, finally:
Here is how:

Suppose you want both nfs and local mounts for some home directories on
the client:

On the NIS client:

/etc/auto.master:
/home /etc/auto.home
+auto.master

/etc/auto.home
test nfs1:/export/home/test

/etc/nsswitch.conf (the relevant entries)
passwd: files nis
group: files nis
automount: files nis

On the NIS server, ns1:

auto.master map:
/home yp:auto.home

auto.home map:
testuser cosmlx05:/export/home/testuser

The assumption here is that you have correctly configured your
/etc/exports file your hosts.allow file and the name resolution works
well and your client can read the NIS map well.

Now I can login with NIS id on the client and obtain my home directory
via the automounter and NFS.

Regards!

 
Reply With Quote
 
Lawrence D¹Oliveiro
Guest
Posts: n/a

 
      07-30-2005, 04:38 AM
In article <(E-Mail Removed). com>,
"scorpioboii" <(E-Mail Removed)> wrote:

>Why permanently mount home directories when you have an automounter? In
>a large enterprise this is so much needless NFS traffic.


10 users logged on with automounts => 10 NFS mounts => 10 times the NFS
traffic

1 /home mount for all users => 1 NFS mount.
 
Reply With Quote
 
scorpioboii
Guest
Posts: n/a

 
      08-01-2005, 12:40 PM
Well not true:

First when no one is logged or running any process writing or reading
to an autmounted filesystem there is not demand for the NFS partitions
so no NFS traffic.
This is as opposed to mounting via fstab where as long as the machine
is on there is this NFS traffic to keep the mount permanent.

10 users are going to mount the same filesystem on the same machine or
different machines? Either way what you say is not true and definitely
the traffic is less that a 27/7 NFS mount that may be used for only 12
hours of the day.

SO every 24 hour cycle NFS might be used for 12 hours only. Why not
unmount it for the idle 12 hours and use the network for backups or
something?

 
Reply With Quote
 
 
 
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
automounter -Dvariable=Value option? erniehannell@yahoo.ca Linux Networking 0 09-25-2005 11:55 PM



1 2 3 4 5 6 7 8 9 10 11