Skip to contentSkip to conversation

Understanding direct mounts & ghosting

DISCUSSION matt 2 participants 2 messages Mar 11, 2004 – Mar 12, 2004 Kernel automounter

lore
Share & tools
lore

matt

author
#0 lore raw

I am attempting to use direct mounts with autofs4 and either I'm doing something wrong or I'm expecting the wrong behaviour. Here's my situation. I installed SuSE 9.0 and then downloaded and built autofs-4.1.0 and autofs4-2.4 kernel module. I installed both and added the alias line in modules.conf, and when I do 'lsmod' I see 'autofs4' as the autofs module so I think I've got the kernel part right.

The reason I am trying to get direct mounts to work is so that I can automount /usr/local from my fileserver, however if I put the line:
/usr/local server:/usr/local
into my auto.direct file, then all of /usr goes away (except /usr/local). So for testing purposed I changed things to use /mnt. Now my auto.master includes the line:
/- auto.direct
and the auto.direct file contains:
/mnt/local voorg:/usr/local

Once I start the automounter I see the following as part of the output of the mount command:

automount(pid27283) on /mnt type autofs (rw,fd=5,pgrp=27279,minproto=2,maxproto=4)

and my test directory (/mnt/local.orig) is no longer visible. If I then cd to /mnt/local the mount command shows:

automount(pid27283) on /mnt type autofs (rw,fd=5,pgrp=27279,minproto=2,maxproto=4) voorg:/usr/local on /mnt/local type nfs (rw,addr=192.168.222.5)

So the automount does appear to be working; but not as I expect a direct mount to work based on my experience with Solaris (and HPUX). My expecataion is that I should see /mnt/local as the automount point (i.e. "automount(pid27238) on /mnt/local type autofs ...") instead of /mnt. Is this the expected behavior or am I missing something?

With regards to ghosting, I have another map (auto.nfs) that's mounted on /nfs and, as I understand ghosting, I should be able to do:
ls /nfs
and see a list of mountable directories (i.e. the contents of the auto.nfs map) as a result. I don't. All I see is . and .. (presuming of coure that I haven't cd'd to any of the mount-points).

Anything you can offer to help me understand what's happening would be greatly appreciated. And if I can provide additional info about my setup, please let me know.

Thanks much,
Matt

maintainer
#1 lore raw
Quoted 6 lines · matt

So the automount does appear to be working; but not as I expect a direct mount to work based on my experience with Solaris (and HPUX). My expecataion is that I should see /mnt/local as the automount point (i.e. "automount(pid27238) on /mnt/local type autofs ...") instead of /mnt. Is this the expected behavior or am I missing something?

Unfortuneatly, this is the way it is now.

It's been done like that largely because of the limitation on the number of anonymous mounts (ie. autofs, NFS etc.) in the kernel.

It is possible to enhance the kernel module to provide this functionality but is a large piece of work so don't expect it any time soon.

Further, there are people working on alternate designs but I have no idea how those efforts are going.

Quoted 7 lines

With regards to ghosting, I have another map (auto.nfs) that's mounted on /nfs and, as I understand ghosting, I should be able to do:
ls /nfs
and see a list of mountable directories (i.e. the contents of the auto.nfs map) as a result. I don't. All I see is . and .. (presuming of coure that I haven't cd'd to any of the mount-points).

At the moment the default is for directories not to be browsable so you need to request it as an option in either the start script or in the master map.

Ian