* AutoFS Problems with Laptops
@ 2006-05-19 8:17 Daniel Qarras
2006-05-19 13:36 ` Ian Kent
2006-05-20 23:34 ` Jim Carter
0 siblings, 2 replies; 9+ messages in thread
From: Daniel Qarras @ 2006-05-19 8:17 UTC (permalink / raw)
To: autofs
Hi!
This is probably very easy but I can neither figure it out or use
Google.. Anyway, this is what I want to achieve:
Our local network (10.0.0.0) server exports /home and /work directories
and desktop workstations with static IPs can mount them all ok over
NFS. I have a laptop that is using DHCP and autofs. In our local
network autofs mounts work all ok with the config below.
However, when I go out to a different network where those directories
are not available, I would like autofs to figure that out and not to
try mount them and cause jams. What should the script output if those
mounts are available?
I am asking this because I've tried almost everything and I am just
getting bizarre results like directory /var/autofs/(null)/home,
/var/autofs/hithere/work, etc. I want to mount available mounts under
/var/autofs so that they would be /var/autofs/home and /var/autofs/work
but that seems not to work.
The autofs configuration that works perfectly in our local network is
the following.
/etc/auto.master:
/var/autofs /etc/auto.local --timeout=30,--ghost
And /etc/auto.local:
home -fstype=nfs,rw,soft,intr 10.0.0.1:/home
work -fstype=nfs,rw,soft,intr 10.0.0.1:/work
But, as said, if I turn auto.local as an executable script that outputs
lines like those I just get those silly results with mounts.
Thanks,
Dan.
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: AutoFS Problems with Laptops
2006-05-19 8:17 AutoFS Problems with Laptops Daniel Qarras
@ 2006-05-19 13:36 ` Ian Kent
2006-05-22 7:53 ` Daniel Qarras
2006-05-20 23:34 ` Jim Carter
1 sibling, 1 reply; 9+ messages in thread
From: Ian Kent @ 2006-05-19 13:36 UTC (permalink / raw)
To: Daniel Qarras; +Cc: autofs
On Fri, 19 May 2006, Daniel Qarras wrote:
> Hi!
>
> This is probably very easy but I can neither figure it out or use
> Google.. Anyway, this is what I want to achieve:
>
> Our local network (10.0.0.0) server exports /home and /work directories
> and desktop workstations with static IPs can mount them all ok over
> NFS. I have a laptop that is using DHCP and autofs. In our local
> network autofs mounts work all ok with the config below.
>
> However, when I go out to a different network where those directories
> are not available, I would like autofs to figure that out and not to
> try mount them and cause jams. What should the script output if those
> mounts are available?
>
> I am asking this because I've tried almost everything and I am just
> getting bizarre results like directory /var/autofs/(null)/home,
-------------------------------------------------------^
You'd be running FC5 then.
Can't track this down, we shouldn't be getting mount requests from the
kernel with no name.
> /var/autofs/hithere/work, etc. I want to mount available mounts under
> /var/autofs so that they would be /var/autofs/home and /var/autofs/work
> but that seems not to work.
>
> The autofs configuration that works perfectly in our local network is
> the following.
>
> /etc/auto.master:
>
> /var/autofs /etc/auto.local --timeout=30,--ghost
>
> And /etc/auto.local:
>
> home -fstype=nfs,rw,soft,intr 10.0.0.1:/home
> work -fstype=nfs,rw,soft,intr 10.0.0.1:/work
A script should just output the map entry without the key. Like
-fstype=nfs,rw,soft,intr 10.0.0.1:/work
Ian
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: AutoFS Problems with Laptops
2006-05-19 13:36 ` Ian Kent
@ 2006-05-22 7:53 ` Daniel Qarras
2006-05-22 8:07 ` Ian Kent
0 siblings, 1 reply; 9+ messages in thread
From: Daniel Qarras @ 2006-05-22 7:53 UTC (permalink / raw)
To: Ian Kent; +Cc: autofs
Hi Ian,
and thanks for your prompt reply.
> > I am asking this because I've tried almost everything and I am just
> > getting bizarre results like directory /var/autofs/(null)/home,
> -------------------------------------------------------^
> You'd be running FC5 then.
> Can't track this down, we shouldn't be getting mount requests from
> the kernel with no name.
Yes, the client is FC5, the server is CentOS-4.4. At the server only
/etc/exports is configured like this:
/home 10.0.0.0/255.0.0.0(rw,no_root_squash,sync)
/work 10.0.0.0/255.0.0.0(rw,no_root_squash,sync)
> A script should just output the map entry without the key. Like
> -fstype=nfs,rw,soft,intr 10.0.0.1:/work
Unfortunately, this still creates (null) directory and I can even go to
/var/autofs/whatever to see contents of /work. And if the script
outputs both /work and /home I see only either of them, depending the
order the entries are printed and if they are on the same line or in
two lines.
Do you think I should file a bug to RH Bugzilla about this? It is
currently down so I cannot check whether there is already a report or
two about this issue. I posted this question also to Fedora list but
got no reply.
Thanks.
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: AutoFS Problems with Laptops
2006-05-22 7:53 ` Daniel Qarras
@ 2006-05-22 8:07 ` Ian Kent
2006-05-22 9:11 ` Daniel Qarras
0 siblings, 1 reply; 9+ messages in thread
From: Ian Kent @ 2006-05-22 8:07 UTC (permalink / raw)
To: Daniel Qarras; +Cc: autofs
Daniel Qarras wrote:
> Hi Ian,
>
> and thanks for your prompt reply.
>
>>> I am asking this because I've tried almost everything and I am just
>>> getting bizarre results like directory /var/autofs/(null)/home,
>> -------------------------------------------------------^
>> You'd be running FC5 then.
>> Can't track this down, we shouldn't be getting mount requests from
>> the kernel with no name.
>
> Yes, the client is FC5, the server is CentOS-4.4. At the server only
> /etc/exports is configured like this:
>
> /home 10.0.0.0/255.0.0.0(rw,no_root_squash,sync)
> /work 10.0.0.0/255.0.0.0(rw,no_root_squash,sync)
>
>> A script should just output the map entry without the key. Like
>> -fstype=nfs,rw,soft,intr 10.0.0.1:/work
>
> Unfortunately, this still creates (null) directory and I can even go to
> /var/autofs/whatever to see contents of /work. And if the script
> outputs both /work and /home I see only either of them, depending the
> order the entries are printed and if they are on the same line or in
> two lines.
That's interesting.
You mean you get a directory "(null)" with no mount?
That shouldn't happen because the the "(null)" key shouldn't be found
and so shouldn't have a mount entry associated with it. If the script
needs to return a fail on the lookup it should return 1, 0 on success.
If the script emits a valid mount then it will, of course, mount that.
Ian
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: AutoFS Problems with Laptops
2006-05-22 8:07 ` Ian Kent
@ 2006-05-22 9:11 ` Daniel Qarras
2006-05-22 10:45 ` Ian Kent
0 siblings, 1 reply; 9+ messages in thread
From: Daniel Qarras @ 2006-05-22 9:11 UTC (permalink / raw)
To: Ian Kent; +Cc: autofs
> >> A script should just output the map entry without the key. Like
> >> -fstype=nfs,rw,soft,intr 10.0.0.1:/work
> >
> > Unfortunately, this still creates (null) directory and I can even
> go to
> > /var/autofs/whatever to see contents of /work. And if the script
> > outputs both /work and /home I see only either of them, depending
> the
> > order the entries are printed and if they are on the same line or
> in
> > two lines.
>
> That's interesting.
>
> You mean you get a directory "(null)" with no mount?
> That shouldn't happen because the the "(null)" key shouldn't be found
> and so shouldn't have a mount entry associated with it. If the script
> needs to return a fail on the lookup it should return 1, 0 on
> success.
The "(null)" directory has contents of /home. I now modified the script
so that it is just like this:
#!/bin/sh
echo -fstype=nfs,rw,soft,intr 10.0.0.1:/home
echo -fstype=nfs,rw,soft,intr 10.0.0.1:/work
The (null) directory is visible when I say:
cd /var/autofs
ls
It also gave me access to /home via any directory but not to /work.
meaning that I see contents of /home via these directories:
/var/autofs/home
/var/autofs/test
/var/autofs/work
Cheers,
Dan.
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: AutoFS Problems with Laptops
2006-05-22 9:11 ` Daniel Qarras
@ 2006-05-22 10:45 ` Ian Kent
2006-05-22 11:51 ` Daniel Qarras
0 siblings, 1 reply; 9+ messages in thread
From: Ian Kent @ 2006-05-22 10:45 UTC (permalink / raw)
To: Daniel Qarras; +Cc: autofs
On Mon, 22 May 2006, Daniel Qarras wrote:
> > >> A script should just output the map entry without the key. Like
> > >> -fstype=nfs,rw,soft,intr 10.0.0.1:/work
> > >
> > > Unfortunately, this still creates (null) directory and I can even
> > go to
> > > /var/autofs/whatever to see contents of /work. And if the script
> > > outputs both /work and /home I see only either of them, depending
> > the
> > > order the entries are printed and if they are on the same line or
> > in
> > > two lines.
> >
> > That's interesting.
> >
> > You mean you get a directory "(null)" with no mount?
> > That shouldn't happen because the the "(null)" key shouldn't be found
> > and so shouldn't have a mount entry associated with it. If the script
> > needs to return a fail on the lookup it should return 1, 0 on
> > success.
>
> The "(null)" directory has contents of /home. I now modified the script
> so that it is just like this:
>
> #!/bin/sh
> echo -fstype=nfs,rw,soft,intr 10.0.0.1:/home
> echo -fstype=nfs,rw,soft,intr 10.0.0.1:/work
This is not right.
The script is passed the key and you must emit the mount corresponding to
that key.
Look at auto.net for an example.
Ian
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: AutoFS Problems with Laptops
2006-05-22 10:45 ` Ian Kent
@ 2006-05-22 11:51 ` Daniel Qarras
0 siblings, 0 replies; 9+ messages in thread
From: Daniel Qarras @ 2006-05-22 11:51 UTC (permalink / raw)
To: Ian Kent; +Cc: autofs
> > #!/bin/sh
> > echo -fstype=nfs,rw,soft,intr 10.0.0.1:/home
> > echo -fstype=nfs,rw,soft,intr 10.0.0.1:/work
>
> This is not right.
>
> The script is passed the key and you must emit the mount
> corresponding to that key.
>
> Look at auto.net for an example.
If I run auto.net from command line with parameter 10.0.0.1 it outputs:
root@laptop# /etc/auto.net 10.0.0.1
-fstype=nfs,hard,intr,nodev,nosuid \
/home 10.0.0.1:/home \
/work 10.0.0.1:/work
With any other parameter I just get errors. But when I use auto.net or
my own script to print $1 to /tmp/foo I see that $1 is (null) when
doing ls /var/autofs or home when doind cd /var/autofs/home. Naturally,
nothing gets mounted then.
Too bad that RH Bugzilla is still down and I can't check whether
there's already a bug report about this already.
Thanks.
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: AutoFS Problems with Laptops
2006-05-19 8:17 AutoFS Problems with Laptops Daniel Qarras
2006-05-19 13:36 ` Ian Kent
@ 2006-05-20 23:34 ` Jim Carter
1 sibling, 0 replies; 9+ messages in thread
From: Jim Carter @ 2006-05-20 23:34 UTC (permalink / raw)
To: Daniel Qarras; +Cc: autofs
On Fri, 19 May 2006, Daniel Qarras wrote:
> However, when I go out to a different network where those directories
> are not available, I would like autofs to figure that out and not to
> try mount them and cause jams. What should the script output if those
> mounts are available?
If I remember correctly, if the programmatic map prints nothing and exits
with a nonzero exit code, autofs will realize it has failed and give up. So
now, how does the script realize that the 10.0.0.x IP address assigned to
eth0 is not *your* 10.0.0.x, but a customer's net or an Internet cafe
somewhere? Perhaps a less obvious choice of subnet could be helpful; this
is what I do on my own net.
But I'm wondering, what's in server:/home or server:/work? The ideal is to
set up the laptop so the NFS mounted directories are not touched without
voluntary user action, upon which autofs swings into action, and if the
user forgets that he's not at headquarters, he deserves the 30 second
timeout (unless the programmatic map script heads off NFS mounting). It
isn't going to fly, if the user's home directory is in server:/home/$USER.
On my own laptop the homedir is local, with backups to the server (and from
there to removeable media), initiated manually.
If ever you might expand to have two or more NFS servers, it's important to
use separate subtrees for each, e.g.
/var/autofs/server1/home
/var/autofs/server1/work
/var/autofs/server2/home
/var/autofs/server2/work
The reason is like this: Suppose the mount points were all jumbled
together, e.g.
/var/autofs/home1
/var/autofs/home2
/var/autofs/work1
/var/autofs/work2
(UCLA-Mathnet actually made this mistake in the distant past.) Suppose one
server is down and the other isn't, and a user hosted on the working server
tries to log in. Let's say his homedir is /var/autofs/home2/luser.
Several "pwd" operations can't be avoided, and it needs to stat all
memebers of /var/autofs to find out which name goes with the inode
which is the parent of the homedir. Frequently it will stat a mount point
from the dead server before getting the right one, and suffer a 30
second timeout, several times. Hiss, boo.
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: jimc@math.ucla.edu http://www.math.ucla.edu/~jimc (q.v. for PGP key)
^ permalink raw reply [flat|nested] 9+ messages in thread
[parent not found: <4471DDEF.8050203@themaw.net>]
end of thread, other threads:[~2006-05-23 7:43 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-05-19 8:17 AutoFS Problems with Laptops Daniel Qarras
2006-05-19 13:36 ` Ian Kent
2006-05-22 7:53 ` Daniel Qarras
2006-05-22 8:07 ` Ian Kent
2006-05-22 9:11 ` Daniel Qarras
2006-05-22 10:45 ` Ian Kent
2006-05-22 11:51 ` Daniel Qarras
2006-05-20 23:34 ` Jim Carter
[not found] <4471DDEF.8050203@themaw.net>
2006-05-23 7:43 ` Daniel Qarras
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.