All of lore.kernel.org
 help / color / mirror / Atom feed
From: chris barry <Christopher.Barry@qlogic.com>
To: autofs@linux.kernel.org
Subject: Re: fairly complex nested filesystems question
Date: Fri, 21 Dec 2007 09:51:43 -0500	[thread overview]
Message-ID: <1198248703.10225.18.camel@localhost> (raw)
In-Reply-To: <1198247849.3488.44.camel@raven.themaw.net>

On Fri, 2007-12-21 at 23:37 +0900, Ian Kent wrote:
> On Fri, 2007-12-21 at 09:13 -0500, chris barry wrote:
> > On Fri, 2007-12-21 at 20:44 +0900, Ian Kent wrote:
> > > On Thu, 2007-12-20 at 18:29 -0500, chris barry wrote:
> > > > Greetings,
> > > > 
> > > > I'm trying to create a nested filesystem structure that combines an
> > > > automounted nfs home directory, with bind mounts from the local machine.
> > > > 
> > > > The structure will look like this:
> > > > /
> > > > |-home
> > > >    `-user1        <-(nfs somehost:/home/user1)
> > > >        |-myftp    <-(bind /var/ftp/users/user1)
> > > >        `-pub_ftp  <-(bind /var/ftp/pub)
> > > > 
> > > > The entire structure needs to get automounted as a group on login, and
> > > > then is chrooted as users ftp into this box.
> > > > 
> > > > My auto.master looks like this:
> > > > /home   /etc/auto.home --timeout=30
> > > > 
> > > > My auto.home looks like this:
> > > > *              -fstype=nfs,rw,intr   10.20.30.40:/home/& \
> > > > /home/&/myftp  -fstype=file          :/var/ftp/users/& \
> > > > /home/&/ftp    -fstype=file          :/var/ftp/pub
> > > 
> > > This is not valid for a couple of reasons.
> > > First the * will match every key and so nothing else will be seen.
> > > The second and third entries aren't valid map entries for an indirect
> > > map either. Even if they were then the & can't be used on the left hand
> > > side of a map entry. This is because the & is replaced by the key that
> > > has been matched and so can't be used within the key itself. The -fstype
> > > should refer to a valid filesystem but I don't think file is a valid
> > > filesystem. If you're intending this to indicate a bind mount then just
> > > leave out the -fstype=file and leave the :<path>. 
> > > 
> > > Ian
> > > 
> > 
> > Ian,
> > 
> > Thanks so much for your response. I got that one wrong totally wrong. 
> > 
> > Given the drawing and intent though, is the idea itself even possible,
> > or is it simply not workable in any way? If it /is/ possible, any idea
> > on how it should be done? From your explanation, I'm (taking a blind
> > stab here) thinking something like:
> > 
> > *    -fstype=nfs,rw,intr   10.20.30.40:/home/& \
> >      ./myftp                 :/var/ftp/users/& \
> >      ./ftp                   :/var/ftp/pub
> 
> Hehe, that's not quite right either.
> Sorry for the curt e-mail, I'm a bit loaded up at the moment.
> 
> We didn't get the autofs version you're using for this either.
> 
> That's interesting use of the wildcard key, I'm not sure whether that
> would work but, in theory, it just might.
> 
> So a map would need to be something like:
> 
> *	/	-fstype=nfs,rw,intr   10.20.30.40:/home/& \
> 	/myftp  	               :/var/ftp/users/& \
> 	/ftp    	               :/var/ftp/pub
> 
> The initial "/" (the root of the multi-mount) is allowed to be omitted
> as an accepted shortcut. The "." isn't legal the way it is specified
> above.
> 
> Strictly speaking the mount-point directories (such
> as /home/<someuser>/myftp and /home/<someuser>/ftp) must already exist
> as autofs doesn't, and often can't (and should'nt be able to) create
> directories on a remote server as it's operating as root.
> 
> Ian
> 
> 
(putting back on the list)

Thanks Ian! I'll give that a go.

Cheers,
-C

      parent reply	other threads:[~2007-12-21 14:51 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-12-20 23:29 fairly complex nested filesystems question chris barry
2007-12-21 11:44 ` Ian Kent
     [not found]   ` <1198246430.10225.15.camel@localhost>
     [not found]     ` <1198247849.3488.44.camel@raven.themaw.net>
2007-12-21 14:51       ` chris barry [this message]

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=1198248703.10225.18.camel@localhost \
    --to=christopher.barry@qlogic.com \
    --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.