All of lore.kernel.org
 help / color / mirror / Atom feed
* Fwd: Converting to New Syntax
       [not found] <CA+onWPdMOVqgvW7rhyDCQ8u4xJ+RTQptPtEjTRj4yja4tF9CnA@mail.gmail.com>
@ 2017-05-01 20:02 ` Jamie Jackson
  2017-05-02  0:58   ` Ian Kent
  0 siblings, 1 reply; 5+ messages in thread
From: Jamie Jackson @ 2017-05-01 20:02 UTC (permalink / raw)
  To: autofs

I'm new to Autofs, but I've had one auto-mount going for a few weeks
now. It came time for me to add a second one, but I ran into "ignoring
duplicate indirect mount /mnt/non-icf/my"

I see from https://www.spinics.net/lists/autofs/msg00000.html that I'm
supposed to use a different syntax to get both of these mount points
to coexist:

/mnt/non-icf/my/secureftp
/mnt/non-icf/my/testsftp

I'm reading https://www.centos.org/docs/5/html/Deployment_Guide-en-US/s1-nfs-client-config-autofs.html
, but I'm having trouble absorbing the content.

Could someone help me convert what I've got to what I need?

https://gist.github.com/jamiejackson/460ba0a6526d6251554a157821f526da

Also, since I'm new to all of this, if you see anything else that I
could be doing in a better way, please let me know.

Thanks
Jamie
--
To unsubscribe from this list: send the line "unsubscribe autofs" in

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Fwd: Converting to New Syntax
  2017-05-01 20:02 ` Fwd: Converting to New Syntax Jamie Jackson
@ 2017-05-02  0:58   ` Ian Kent
  2017-05-02 16:17     ` Jamie Jackson
  0 siblings, 1 reply; 5+ messages in thread
From: Ian Kent @ 2017-05-02  0:58 UTC (permalink / raw)
  To: Jamie Jackson; +Cc: autofs

On Mon, 2017-05-01 at 16:02 -0400, Jamie Jackson wrote:
> I'm new to Autofs, but I've had one auto-mount going for a few weeks
> now. It came time for me to add a second one, but I ran into "ignoring
> duplicate indirect mount /mnt/non-icf/my"

All you need to understand is the concept that there is one master map that
contains top level automount managed mount points and entries in it have a
specific format.

The master map associates mount maps with these top level automount mount
points.

The maps specified in master map entries typically have more than one entry
(although if one entry is all you need that's fine too).

> 
> I see from https://www.spinics.net/lists/autofs/msg00000.html that I'm
> supposed to use a different syntax to get both of these mount points
> to coexist:
> 
> /mnt/non-icf/my/secureftp
> /mnt/non-icf/my/testsftp
> 
> I'm reading https://www.centos.org/docs/5/html/Deployment_Guide-en-US/s1-nfs-c
> lient-config-autofs.html
> , but I'm having trouble absorbing the content.
> 
> Could someone help me convert what I've got to what I need?
> 
> https://gist.github.com/jamiejackson/460ba0a6526d6251554a157821f526da

First lets look at the master map.

If you're not using entries that are present in the default comment them out.
That would be /misc, /net and +auto.master.

Commenting out the last one is actually important because, if you're not using
the automount entry of nsswitch, the sources present in the default install
(this configuration file isn't owned by autofs) can cause some error message
noise in the log and introduce an unnecessary delay at startup.

Now these two entries:
/mnt/non-icf/my /etc/auto.my_sftp_test \
        uid=492,gid=488,--timeout=60,--ghost,--debug  
/mnt/non-icf/my /etc/auto.my_sftp_prod \
        uid=492,gid=488,--timeout=60,--ghost,--debug

The uid and gid options are not used by autofs.

Personally I always use the autofs configuration to enable debug logging.

Either way you need to ensure that syslog is capturing log level debug or
greater for the log entries to be sent to syslog.

If you're using systemd journalctl to instect the logs then setting log level
doesn't matter but if there is a lot of logging systemd will start dropping
entries.

Also I prefer to use the browse option rather than --ghost.

Then there's the duplicate entries.

So the master map would become, say:
/mnt/non-icf/my      /etc/auto.my_sftp --timeout=60,browse

And /etc/auto.my_sftp would contain:
secureftp 
-fstype=fuse,ro,nodev,noatime,allow_other,IdentityFile=/root/.ssh/my_sftp_key
 :sshfs\#XXXXX@secureftp.my.com\:/export/home/ICFfiles
testsftp 
-fstype=fuse,ro,nodev,noatime,allow_other,IdentityFile=/root/.ssh/hud_sftp_key
 :sshfs\#XXXXX@testsftp.my.com\:/export/home/ICFfiles

If you want to have separate top level mount points for stable and test then you
need to use a different top level mount point path in the master map so you can
use two distinct maps.

Beware that if you try to set debugging for the fuse mounts themselves (ie. not
handled by autofs) I think the sshfs mount process won't go into the background
causing the mount to never complete and that will result in unexpected
behaviour.

Ian
--
To unsubscribe from this list: send the line "unsubscribe autofs" in

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Fwd: Converting to New Syntax
  2017-05-02  0:58   ` Ian Kent
@ 2017-05-02 16:17     ` Jamie Jackson
  2017-05-03  0:52       ` Ian Kent
  0 siblings, 1 reply; 5+ messages in thread
From: Jamie Jackson @ 2017-05-02 16:17 UTC (permalink / raw)
  To: Ian Kent; +Cc: autofs

On Mon, May 1, 2017 at 8:58 PM, Ian Kent <raven@themaw.net> wrote:
> On Mon, 2017-05-01 at 16:02 -0400, Jamie Jackson wrote:
>> I'm new to Autofs, but I've had one auto-mount going for a few weeks
>> now. It came time for me to add a second one, but I ran into "ignoring
>> duplicate indirect mount /mnt/non-icf/my"
>
> All you need to understand is the concept that there is one master map that
> contains top level automount managed mount points and entries in it have a
> specific format.
>
> The master map associates mount maps with these top level automount mount
> points.
>
> The maps specified in master map entries typically have more than one entry
> (although if one entry is all you need that's fine too).
>
>>
>> I see from https://www.spinics.net/lists/autofs/msg00000.html that I'm
>> supposed to use a different syntax to get both of these mount points
>> to coexist:
>>
>> /mnt/non-icf/my/secureftp
>> /mnt/non-icf/my/testsftp
>>
>> I'm reading https://www.centos.org/docs/5/html/Deployment_Guide-en-US/s1-nfs-c
>> lient-config-autofs.html
>> , but I'm having trouble absorbing the content.
>>
>> Could someone help me convert what I've got to what I need?
>>
>> https://gist.github.com/jamiejackson/460ba0a6526d6251554a157821f526da
>
> First lets look at the master map.
>
> If you're not using entries that are present in the default comment them out.
> That would be /misc, /net and +auto.master.
>
> Commenting out the last one is actually important because, if you're not using
> the automount entry of nsswitch, the sources present in the default install
> (this configuration file isn't owned by autofs) can cause some error message
> noise in the log and introduce an unnecessary delay at startup.

Great, I see the difference after having removed it.

> Now these two entries:
> /mnt/non-icf/my /etc/auto.my_sftp_test \
>         uid=492,gid=488,--timeout=60,--ghost,--debug
> /mnt/non-icf/my /etc/auto.my_sftp_prod \
>         uid=492,gid=488,--timeout=60,--ghost,--debug
>
> The uid and gid options are not used by autofs.

When I had them defined, the files showed as having the local
user/group that I wanted. After having removed them, they show as the
uid/gid of the remote user. I'm not sure how to reconcile my findings
with what you said, above. Could you elaborate on that?

> Personally I always use the autofs configuration to enable debug logging.

I take that to mean that i should remove the `--debug` option from the
master map, and add `LOGGING=debug` to auto.master. (Done.)

> Either way you need to ensure that syslog is capturing log level debug or
> greater for the log entries to be sent to syslog.
>
> If you're using systemd journalctl to instect the logs then setting log level
> doesn't matter but if there is a lot of logging systemd will start dropping
> entries.
>
> Also I prefer to use the browse option rather than --ghost.

It looks like `BROWSE_MODE=yes` is the default, so I just removed the
`--ghost` flag.

> Then there's the duplicate entries.
>
> So the master map would become, say:
> /mnt/non-icf/my      /etc/auto.my_sftp --timeout=60,browse
>
> And /etc/auto.my_sftp would contain:
> secureftp
> -fstype=fuse,ro,nodev,noatime,allow_other,IdentityFile=/root/.ssh/my_sftp_key
>  :sshfs\#XXXXX@secureftp.my.com\:/export/home/ICFfiles
> testsftp
> -fstype=fuse,ro,nodev,noatime,allow_other,IdentityFile=/root/.ssh/hud_sftp_key
>  :sshfs\#XXXXX@testsftp.my.com\:/export/home/ICFfiles
>
> If you want to have separate top level mount points for stable and test then you
> need to use a different top level mount point path in the master map so you can
> use two distinct maps.

Got it. Seeing your conversion of my configs helps me understand.
Everything seems to be working with both mounts (except that the
ownership looks weird). Thanks for the help.

> Beware that if you try to set debugging for the fuse mounts themselves (ie. not
> handled by autofs) I think the sshfs mount process won't go into the background
> causing the mount to never complete and that will result in unexpected
> behaviour.

Yup, I learned that the hard way in
https://bugzilla.redhat.com/show_bug.cgi?id=1434600. Thanks for that.

Jamie
--
To unsubscribe from this list: send the line "unsubscribe autofs" in

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Fwd: Converting to New Syntax
  2017-05-02 16:17     ` Jamie Jackson
@ 2017-05-03  0:52       ` Ian Kent
  2017-05-03  1:09         ` Ian Kent
  0 siblings, 1 reply; 5+ messages in thread
From: Ian Kent @ 2017-05-03  0:52 UTC (permalink / raw)
  To: Jamie Jackson; +Cc: autofs

On Tue, 2017-05-02 at 12:17 -0400, Jamie Jackson wrote:
> On Mon, May 1, 2017 at 8:58 PM, Ian Kent <raven@themaw.net> wrote:
> > On Mon, 2017-05-01 at 16:02 -0400, Jamie Jackson wrote:
> > > I'm new to Autofs, but I've had one auto-mount going for a few weeks
> > > now. It came time for me to add a second one, but I ran into "ignoring
> > > duplicate indirect mount /mnt/non-icf/my"
> > 
> > All you need to understand is the concept that there is one master map that
> > contains top level automount managed mount points and entries in it have a
> > specific format.
> > 
> > The master map associates mount maps with these top level automount mount
> > points.
> > 
> > The maps specified in master map entries typically have more than one entry
> > (although if one entry is all you need that's fine too).
> > 
> > > 
> > > I see from https://www.spinics.net/lists/autofs/msg00000.html that I'm
> > > supposed to use a different syntax to get both of these mount points
> > > to coexist:
> > > 
> > > /mnt/non-icf/my/secureftp
> > > /mnt/non-icf/my/testsftp
> > > 
> > > I'm reading https://www.centos.org/docs/5/html/Deployment_Guide-en-US/s1-n
> > > fs-c
> > > lient-config-autofs.html
> > > , but I'm having trouble absorbing the content.
> > > 
> > > Could someone help me convert what I've got to what I need?
> > > 
> > > https://gist.github.com/jamiejackson/460ba0a6526d6251554a157821f526da
> > 
> > First lets look at the master map.
> > 
> > If you're not using entries that are present in the default comment them
> > out.
> > That would be /misc, /net and +auto.master.
> > 
> > Commenting out the last one is actually important because, if you're not
> > using
> > the automount entry of nsswitch, the sources present in the default install
> > (this configuration file isn't owned by autofs) can cause some error message
> > noise in the log and introduce an unnecessary delay at startup.
> 
> Great, I see the difference after having removed it.
> 
> > Now these two entries:
> > /mnt/non-icf/my /etc/auto.my_sftp_test \
> >         uid=492,gid=488,--timeout=60,--ghost,--debug
> > /mnt/non-icf/my /etc/auto.my_sftp_prod \
> >         uid=492,gid=488,--timeout=60,--ghost,--debug
> > 
> > The uid and gid options are not used by autofs.
> 
> When I had them defined, the files showed as having the local
> user/group that I wanted. After having removed them, they show as the
> uid/gid of the remote user. I'm not sure how to reconcile my findings
> with what you said, above. Could you elaborate on that?

Umm .. now I think about it what I said is plain wrong (almost).

It's been a while since I've had to think about this but I think master map
entry options that aren't autofs specific will be used as global options
(appended to map entry options by default) for mounts so it probably comes down
to what fuse will do with the options.

Without a mounts having been triggered for these map entries the options should
have no effect.

> 
> > Personally I always use the autofs configuration to enable debug logging.
> 
> I take that to mean that i should remove the `--debug` option from the
> master map, and add `LOGGING=debug` to auto.master. (Done.)

Mmm .. oldish syntax .. what version, OS?
It shouldn't matter though.

> 
> > Either way you need to ensure that syslog is capturing log level debug or
> > greater for the log entries to be sent to syslog.
> > 
> > If you're using systemd journalctl to instect the logs then setting log
> > level
> > doesn't matter but if there is a lot of logging systemd will start dropping
> > entries.
> > 
> > Also I prefer to use the browse option rather than --ghost.
> 
> It looks like `BROWSE_MODE=yes` is the default, so I just removed the
> `--ghost` flag.

It depends on distribution.

The internal program default is browse (because other widely used autofs
implementations had this default) but in RHEL, for example, the default
installed configuration sets browse_mode to no because that was the expected
behaviour of autofs before browsing was implemented.

And there can be some unexpected semantic behaviours when using it. But that
also depends on kernel version, it gets hard to describe at this point so I'll
not say more about it. 

snip ...

> 
> > Beware that if you try to set debugging for the fuse mounts themselves (ie.
> > not
> > handled by autofs) I think the sshfs mount process won't go into the
> > background
> > causing the mount to never complete and that will result in unexpected
> > behaviour.
> 
> Yup, I learned that the hard way in
> https://bugzilla.redhat.com/show_bug.cgi?id=1434600. Thanks for that.

Right, I thought the name looked familiar, ;)

Ian
--
To unsubscribe from this list: send the line "unsubscribe autofs" in

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Fwd: Converting to New Syntax
  2017-05-03  0:52       ` Ian Kent
@ 2017-05-03  1:09         ` Ian Kent
  0 siblings, 0 replies; 5+ messages in thread
From: Ian Kent @ 2017-05-03  1:09 UTC (permalink / raw)
  To: Jamie Jackson; +Cc: autofs

On Wed, 2017-05-03 at 08:52 +0800, Ian Kent wrote:
> 
> > > Personally I always use the autofs configuration to enable debug logging.
> > 
> > I take that to mean that i should remove the `--debug` option from the
> > master map, and add `LOGGING=debug` to auto.master. (Done.)
> 
> Mmm .. oldish syntax .. what version, OS?
> It shouldn't matter though.

Oh, ok, that's probably RHEL-6 based on the bug you mentioned.

--
To unsubscribe from this list: send the line "unsubscribe autofs" in

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2017-05-03  1:09 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <CA+onWPdMOVqgvW7rhyDCQ8u4xJ+RTQptPtEjTRj4yja4tF9CnA@mail.gmail.com>
2017-05-01 20:02 ` Fwd: Converting to New Syntax Jamie Jackson
2017-05-02  0:58   ` Ian Kent
2017-05-02 16:17     ` Jamie Jackson
2017-05-03  0:52       ` Ian Kent
2017-05-03  1:09         ` Ian Kent

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.