Skip to contentSkip to conversation

autofs not mounting from nis maps

DISCUSSION David 4 participants 6 messages Mar 16, 2005 – Mar 17, 2005 Kernel automounter

lore
Share & tools
lore

David

author
#0 lore raw

Hi

I have a NIS server that broadcasts an auto.XXX files as such:

[root@appel2 proc]# ypcat -k auto.master
/home auto.home
/usr/local auto.local
/pub auto.pub

[root@appel2 proc]# ypcat -k auto.home | head -8
magnusa hirst:/homes/hirst/dsk1/&
hattne hirst:/homes/hirst/dsk2/&
maria hirst:/homes/hirst/dsk2/&
diane hirst:/homes/hirst/dsk2/&
alina dqs1:/user13/&
guestji hirst:/homes/hirst/dsk2/&
hanna hirst:/homes/hirst/dsk2/&
gunilla bacon:/Users/&

...

On the client side roughly half of the directories are actually mounted when I cd into them, the other half give:
[root@appel2 proc]# cd /home/magnusa
-bash: cd: /home/magnusa: No such file or directory

Without NIS everything works fine. However I have a few tens of workstations so it's quite tedious to update all machines with new files and restart autofs whenever something changes.

Am I doing something terribly wrong? Any other tips?

We are running debian on the servers and different Fedora's on the clients.

Signature · 8 lines
David.
________________________________________________________________________
David van der Spoel, PhD, Assoc. Prof., Molecular Biophysics group,
Dept. of Cell and Molecular Biology, Uppsala University.
Husargatan 3, Box 596,          75124 Uppsala, Sweden
phone:  46 18 471 4205          fax: 46 18 511 755
[email protected]    [email protected]   http://xray.bmc.uu.se/~spoel
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
#1 lore raw

What version of autofs are you using on the Fedora clients? rpm -q autofs

Also, what appears in /var/log/messages when the mounts fail?

Thanks,
Chris

Quoted 35 lines · David

Hi

I have a NIS server that broadcasts an auto.XXX files as such:

[root@appel2 proc]# ypcat -k auto.master
/home auto.home
/usr/local auto.local
/pub auto.pub

[root@appel2 proc]# ypcat -k auto.home | head -8
magnusa hirst:/homes/hirst/dsk1/&
hattne hirst:/homes/hirst/dsk2/&
maria hirst:/homes/hirst/dsk2/&
diane hirst:/homes/hirst/dsk2/&
alina dqs1:/user13/&
guestji hirst:/homes/hirst/dsk2/&
hanna hirst:/homes/hirst/dsk2/&
gunilla bacon:/Users/&

...

On the client side roughly half of the directories are actually mounted when I cd into them, the other half give:
[root@appel2 proc]# cd /home/magnusa
-bash: cd: /home/magnusa: No such file or directory

Without NIS everything works fine. However I have a few tens of workstations so it's quite tedious to update all machines with new files and restart autofs whenever something changes.

Am I doing something terribly wrong? Any other tips?

We are running debian on the servers and different Fedora's on the clients.

#2 lore raw
In reply to David
Quoted 2 lines · David

[root@appel2 proc]# ypcat -k auto.master
/home auto.home

--- snip ---

Quoted 2 lines

[root@appel2 proc]# ypcat -k auto.home | head -8
magnusa hirst:/homes/hirst/dsk1/&

We do almost exactly the same thing, except our auto.home map includes the full path name, i.e.
prob-mp sonia:/h1/guest/prob-mp
rather than using the &. But I'm sure this is not your problem. I explicitly specify the map type in /etc/auto.master, i.e.
/home yp:auto.home
but again, I doubt that has anything to do with your problem.

We're using autofs-4.1.3; what version are you using?

Since automounting works perfectly if it's a file map, I'm inclined to blame YP and not look at either NFS mounting or autofs. (Do log files suggest that I'm wrong here?)

Is it always the same users whose homedirs fail to mount? Or will Mangusa mount one day and not the next? Do all the workstations behave equally? I assume both servers have some failing users. Does the failure rate vary with the time of day or with obvious system activities like backups? I know that our YP wierds out at 2 AM when the backups kick off, because the network is overloaded.

YP relies on UDP. If there were network problems that ate YP packets intermittently, it would explain the problem. If a workstation pings the YP server host (at a time of day when automount failures are seen), what's the packet loss rate? Is there any other reason to suspect flakiness in the YP server and/or client? Suppose you do "ypmatch $user auto.home", iterating over and over through all your users, do you see any failures? (We don't, except during backups.)

Good luck; I hope this helps.

James F. Carter Voice 310 825 2897 FAX 310 206 6673
UCLA-Mathnet; 6115 MSA; 405 Hilgard Ave.; Los Angeles, CA, USA 90095-1555
Email: [email protected] http://www.math.ucla.edu/~jimc (q.v. for PGP key)

author
#3 lore raw
Quoted 7 lines · Jim Carter
Quoted 2 lines · David

[root@appel2 proc]# ypcat -k auto.master
/home auto.home

--- snip ---

Quoted 2 lines

[root@appel2 proc]# ypcat -k auto.home | head -8
magnusa hirst:/homes/hirst/dsk1/&

Quoted 7 lines

We do almost exactly the same thing, except our auto.home map includes the full path name, i.e.
prob-mp sonia:/h1/guest/prob-mp
rather than using the &. But I'm sure this is not your problem. I explicitly specify the map type in /etc/auto.master, i.e.
/home yp:auto.home
but again, I doubt that has anything to do with your problem.

Neither of these helped, and indeed nothing I found on the net seemed to have any impact.

Quoted 2 lines

We're using autofs-4.1.3; what version are you using?

4.1.2 and 4.1.3 depending on Fedora installation.

Quoted 4 lines

Since automounting works perfectly if it's a file map, I'm inclined to blame YP and not look at either NFS mounting or autofs. (Do log files suggest that I'm wrong here?)

Log files say hardly anything, even when automaount is started with -v and or -d.

My guess is that autofs misinterprets the YP maps in some way. Could it be something with spaces versus tabs in the map files?

Quoted 7 lines

Is it always the same users whose homedirs fail to mount? Or will Mangusa mount one day and not the next? Do all the workstations behave equally? I assume both servers have some failing users. Does the failure rate vary with the time of day or with obvious system activities like backups? I know that our YP wierds out at 2 AM when the backups kick off, because the network is overloaded.

No it's consistently the same failure and also for different autofs versions. The auto.home map contains little over 100 entries with 10

Quoted 8 lines

YP relies on UDP. If there were network problems that ate YP packets intermittently, it would explain the problem. If a workstation pings the YP server host (at a time of day when automount failures are seen), what's the packet loss rate? Is there any other reason to suspect flakiness in the YP server and/or client? Suppose you do "ypmatch $user auto.home", iterating over and over through all your users, do you see any failures? (We don't, except during backups.)

The following simple script showed me that 57 out of 105 entries in the auto.home file actually are not matched, indicating that this is indeed a YP problem. Are there some cached YP files somewhere? Restarting yp did not help.

#!/bin/csh -f

foreach user ( ypcat -k auto.home | awk '{ print $1 }' )
ypmatch -k $user auto.home
end

Signature · 8 lines
David.
________________________________________________________________________
David van der Spoel, PhD, Assoc. Prof., Molecular Biophysics group,
Dept. of Cell and Molecular Biology, Uppsala University.
Husargatan 3, Box 596,          75124 Uppsala, Sweden
phone:  46 18 471 4205          fax: 46 18 511 755
[email protected]    [email protected]   http://xray.bmc.uu.se/~spoel
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
author
#4 lore raw
In reply to Jim Carter
Quoted 7 lines · Jim Carter
Quoted 2 lines · David

[root@appel2 proc]# ypcat -k auto.master
/home auto.home

--- snip ---

Quoted 2 lines

[root@appel2 proc]# ypcat -k auto.home | head -8
magnusa hirst:/homes/hirst/dsk1/&

Quoted 7 lines

We do almost exactly the same thing, except our auto.home map includes the full path name, i.e.
prob-mp sonia:/h1/guest/prob-mp
rather than using the &. But I'm sure this is not your problem. I explicitly specify the map type in /etc/auto.master, i.e.
/home yp:auto.home
but again, I doubt that has anything to do with your problem.

OK, found it.
There were spaces instead of tabs between key and value. Apparently NIS chokes on that.

Now it works.

Signature · 8 lines
David.
________________________________________________________________________
David van der Spoel, PhD, Assoc. Prof., Molecular Biophysics group,
Dept. of Cell and Molecular Biology, Uppsala University.
Husargatan 3, Box 596,          75124 Uppsala, Sweden
phone:  46 18 471 4205          fax: 46 18 511 755
[email protected]    [email protected]   http://xray.bmc.uu.se/~spoel
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
#5 lore raw
Quoted 26 lines · David
Quoted 14 lines · Jim Carter
Quoted 4 lines · David

[root@appel2 proc]# ypcat -k auto.master
/home auto.home

--- snip ---

Quoted 4 lines

[root@appel2 proc]# ypcat -k auto.home | head -8
magnusa hirst:/homes/hirst/dsk1/&

Quoted 8 lines

We do almost exactly the same thing, except our auto.home map includes the
full path name, i.e.
prob-mp sonia:/h1/guest/prob-mp
rather than using the &. But I'm sure this is not your problem. I explicitly specify the map type in /etc/auto.master, i.e.
/home yp:auto.home
but again, I doubt that has anything to do with your problem.

Quoted 8 lines

OK, found it. There were spaces instead of tabs between key and value. Apparently NIS chokes on that.

Now it works.

I didn't read this whole thread soI missed what version you were running.

Many tabs/spaces bugs have been fixed in the 4.1.x tree.

Michael