All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Brian J. Murrell" <brian@interlinx.bc.ca>
To: autofs@linux.kernel.org
Subject: multidir keys and wildcards
Date: Sat, 3 Jan 2009 17:07:40 +0000 (UTC)	[thread overview]
Message-ID: <gjo60s$bdm$1@ger.gmane.org> (raw)

OK.  I've been going at my desired implementation from several different 
directions and not found anything that works satisfactorily.

I have a number of filesystems that I statically NFS mount from various 
machines across the network here.  I'd like to convert those all to 
autofs mounted filesystems.  Here's what I currently statically mount:

linux:/mnt/data /data nfs4 rw,vers=4,rsize=8192,wsize=8192,namlen=255,hard,nointr,proto=tcp,timeo=600,retrans=2,sec=krb5,clientaddr=10.75.22.1,addr=10.75.22.3 0 0
linux:/mnt/data/photos /data/photos nfs rw,vers=4,rsize=32768,wsize=32768,namlen=255,hard,nointr,proto=tcp,port=0,timeo=600,retrans=2,sec=krb5,clientaddr=10.75.22.1,addr=10.75.22.3 0 0
linux:/mnt/mp3 /mnt/mp3 nfs4 rw,vers=4,rsize=8192,wsize=8192,namlen=255,hard,nointr,proto=tcp,timeo=600,retrans=2,sec=krb5,clientaddr=10.75.22.1,addr=10.75.22.3 0 0
linux:/mnt/data/photos /data/photos nfs4 rw,vers=4,rsize=8192,wsize=8192,namlen=255,hard,nointr,proto=tcp,timeo=600,retrans=2,sec=krb5,clientaddr=10.75.22.1,addr=10.75.22.3 0 0
pvr:/video /video nfs rw,relatime,vers=3,rsize=8192,wsize=8192,hard,nointr,proto=tcp,timeo=600,retrans=2,sec=sys,addr=10.75.22.2 0 0
jenny:/home/jennifer /autohome/jennifer nfs rw,vers=3,rsize=8192,wsize=8192,namlen=255,soft,nointr,proto=tcp,timeo=600,retrans=2,sec=sys,mountaddr=10.75.22.4,mountvers=3,mountproto=tcp,addr=10.75.22.4 0 0

Ideally, I'd like to just drop all of my mounts into aufofs, but as I 
understand it mounting something like that /video or /data filesystems 
requires direct maps and with the autofs 4.1.4 that I am using direct 
mounts don't work?  I could not get them to work in any case with such a 
construct:

--- auto.master ---
/-		/etc/auto.global

--- auto.global ---
/video		pvr:/video

reloading autofs (/etc/init.d/autofs reload) seemed to completely ignore 
the direct map.

So I decided that a /net map and a bunch of symlinks (even though having 
to go to all of the machines and create symlinks will be a pain) might be 
a better way to go.

On Ubuntu, they use a program map for /etc/auto.net which basically 
mounts everything exported by the "key" given to the program.  This is 
pretty ugly... mounting every exported filesystem when access to only one 
is needed.

So I then tried to use wildcards in an effort to just mount the single 
filesystem needed under /net.  That seemed to be a no go with the 
following configuration:

--- auto.master ---
/net		/etc/auto.net

--- auto.net ---
*	-fstype=autofs,-Dhost=&		file:/etc/auto.netsub

--- auto.netsub ---
*	${host}:/&

What seemed to have happened there was that when the key was being 
truncated to the first / on any access.  For example, when I tried to 
access /net/linux/mnt/data, autofs tried to mount linux:/mnt.

So, what is the best (or any) way to get working what I want to do, 
putting aside the ugly auto.net program map that mounts every exported 
filesystem on every access to just any filesystem on the server?

Thanx in advance for any ideas you might have.

b.

                 reply	other threads:[~2009-01-03 17:07 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='gjo60s$bdm$1@ger.gmane.org' \
    --to=brian@interlinx.bc.ca \
    --cc=autofs@linux.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.