LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > CentOS
User Name
Password
CentOS This forum is for the discussion of CentOS Linux. Note: This forum does not have any official participation.

Notices


Reply
  Search this Thread
Old 01-15-2020, 05:03 AM   #1
Shaggy1
Member
 
Registered: Oct 2010
Posts: 111

Rep: Reputation: 3
autofs: how to determine what is triggering an automount on centos 6.9


Hi

-------------------------------------------
System info:
# cat /etc/centos-release
CentOS release 6.9 (Final)

# uname -a
Linux lb-cam-bca-ks 2.6.32-754.2.1.el6.x86_64 #1 SMP Fri Jul 13 12:50:12 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux
---------------------------------------------

Does anyone know how to determine what is triggering autofs to mount a remote directory ?
I have a situation where
a) when I login (actually just entering the username - before /sbin/login is called) as a local user (so there should be no access to the network required) a remote directory is auto-mounted
b) if I unmount the directory while logged in and wait around for a while doing nothing it gets remounted again.
and I'm trying to work out what it is that is causing the mount to be triggered.

Note:
autofs is being used to mount some system-wide directories. I do not know exactly how autofs works and am not responsible for implementing/administrating the system-wide nfs server, but my /etc/auto.master simply contains:
+auto.master
Which I think is what is telling it to use the (remote) system wide auto.master (using nis ?) when a mount is required.

I have enabled debug logging on autofs and see the following output when the mount occurs:

Jan 13 12:15:00 lb-cam-bca-ks automount[31207]: st_ready: st_ready(): state = 2 path /project
Jan 13 12:15:01 lb-cam-bca-ks automount[31207]: handle_packet: type = 3
Jan 13 12:15:01 lb-cam-bca-ks automount[31207]: handle_packet_missing_indirect: token 3673, name oss, request pid 3012
Jan 13 12:15:01 lb-cam-bca-ks automount[31207]: attempting to mount entry /tools/oss
Jan 13 12:15:01 lb-cam-bca-ks automount[31207]: lookup_mount: lookup(yp): looking up oss
Jan 13 12:15:01 lb-cam-bca-ks automount[31207]: lookup_mount: lookup(yp): oss -> -ro,hard,intr,suid,proto=tcp,vers=3 ukcinas03:/ifs/ukcinas03/edatools/rsw004/tools_oss
Jan 13 12:15:01 lb-cam-bca-ks automount[31207]: parse_mount: parse(sun): expanded entry: -ro,hard,intr,suid,proto=tcp,vers=3 ukcinas03:/ifs/ukcinas03/edatools/rsw004/tools_oss
Jan 13 12:15:01 lb-cam-bca-ks automount[31207]: parse_mount: parse(sun): gathered options: timeo=600,tcp,nfsvers=3,rw,fg,hard,intr,suid,proto=tcp,vers=3,ro,hard,intr,suid,proto=tcp,vers=3
Jan 13 12:15:01 lb-cam-bca-ks automount[31207]: parse_mount: parse(sun): dequote("ukcinas03:/ifs/ukcinas03/edatools/rsw004/tools_oss") -> ukcinas03:/ifs/ukcinas03/edatools/rsw004/tools_oss
Jan 13 12:15:01 lb-cam-bca-ks automount[31207]: parse_mount: parse(sun): core of entry: options=timeo=600,tcp,nfsvers=3,rw,fg,hard,intr,suid,proto=tcp,vers=3,ro,hard,intr,suid,proto=tcp,ve rs=3, loc=ukcinas03:/ifs/ukcinas03/edatools/rsw004/tools_oss
Jan 13 12:15:01 lb-cam-bca-ks automount[31207]: sun_mount: parse(sun): mounting root /tools, mountpoint oss, what ukcinas03:/ifs/ukcinas03/edatools/rsw004/tools_oss, fstype nfs, options timeo=600,tcp,nfsvers=3,rw,fg,hard,intr,suid,proto=tcp,vers=3,ro,hard,intr,suid,proto=tcp,vers=3
Jan 13 12:15:01 lb-cam-bca-ks automount[31207]: mount_mount: mount(nfs): root=/tools name=oss what=ukcinas03:/ifs/ukcinas03/edatools/rsw004/tools_oss, fstype=nfs, options=timeo=600,tcp,nfsvers=3,rw,fg,hard,intr,suid,proto=tcp,vers=3,ro,hard,intr,suid,proto=tcp,ve rs=3
Jan 13 12:15:01 lb-cam-bca-ks automount[31207]: mount_mount: mount(nfs): nfs options="timeo=600,tcp,nfsvers=3,rw,fg,hard,intr,suid,proto=tcp,vers=3,ro,hard,intr,suid,proto=tcp,v ers=3", nobind=0, nosymlink=0, ro=1
Jan 13 12:15:01 lb-cam-bca-ks automount[31207]: get_nfs_info: called with host ukcinas03(10.177.53.44) proto 6 version 0x20
Jan 13 12:15:01 lb-cam-bca-ks automount[31207]: get_nfs_info: nfs v3 rpc ping time: 0.008075
Jan 13 12:15:01 lb-cam-bca-ks automount[31207]: get_nfs_info: host ukcinas03 cost 8074 weight 0
Jan 13 12:15:01 lb-cam-bca-ks automount[31207]: prune_host_list: selected subset of hosts that support NFS3 over TCP
Jan 13 12:15:01 lb-cam-bca-ks automount[31207]: mount_mount: mount(nfs): calling mkdir_path /tools/oss
Jan 13 12:15:01 lb-cam-bca-ks automount[31207]: mount_mount: mount(nfs): calling mount -t nfs -s -o timeo=600,tcp,nfsvers=3,rw,fg,hard,intr,suid,proto=tcp,vers=3,ro,hard,intr,suid,proto=tcp,vers=3 ukcinas03:/ifs/ukcinas03/edatools/rsw004/tools_oss /tools/oss
Jan 13 12:15:02 lb-cam-bca-ks automount[31207]: mount(nfs): mounted ukcinas03:/ifs/ukcinas03/edatools/rsw004/tools_oss on /tools/oss
Jan 13 12:15:02 lb-cam-bca-ks automount[31207]: ioctl_send_ready: token = 3673
Jan 13 12:15:02 lb-cam-bca-ks automount[31207]: mounted /tools/oss


but I am not sure this is telling me anything about the triggering process.
`request pid 3012` looks hopeful, but I see no process with the logged pid on my machine.
 
Old 01-15-2020, 04:47 PM   #2
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,714

Rep: Reputation: 5899Reputation: 5899Reputation: 5899Reputation: 5899Reputation: 5899Reputation: 5899Reputation: 5899Reputation: 5899Reputation: 5899Reputation: 5899Reputation: 5899
autofs does have the capability of auto discovery for nfs shares but I would of expected something like the following in your auto.master file
/net -hosts --timeout=60

And maybe a
etc/autofs/auto.net

Your auto.master file contains no comments but is just a single line?
 
Old 01-20-2020, 09:20 AM   #3
Shaggy1
Member
 
Registered: Oct 2010
Posts: 111

Original Poster
Rep: Reputation: 3
Thank you for your reply.

> autofs does have the capability of auto discovery for nfs shares but I would of expected something like the following in your auto.master file
There is nothing like that in the local auto.master, but I have no idea what is configured on the server side.
Is it possible for the trigger for a mount to come from a remote machine ? I had assumed that there was some process on my machine which was accessing the auto-mounted directory, triggering the mount.

> Your auto.master file contains no comments but is just a single line?
auto.master has the standard comments, but nothing specific. The full file looks like:
#
# Sample auto.master file
# This is a 'master' automounter map and it has the following format:
# mount-point [map-type[,format]:]map [options]
# For details of the format look at auto.master(5).
#
#
# NOTE: mounts done from a hosts map will be mounted with the
# "nosuid" and "nodev" options unless the "suid" and "dev"
# options are explicitly given.
#
#
# Include central master map if it can be found using
# nsswitch sources.
#
# Note that if there are entries for /net or /misc (as
# above) in the included master map any keys that are the
# same will not be seen as the first read key seen takes
# precedence.
#
+auto.master
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] autofs passing username to autofs mounts Timothy Miller Linux - General 3 08-27-2018 06:24 PM
[SOLVED] any autofs experts here? how to get autofs and WebDAV to play nice? zippydan Linux - General 2 09-05-2016 07:13 PM
CentOS 5.2 Automount isos in fstab \other methods that work?automount iso Frankly3D Linux - General 6 07-13-2008 12:34 PM
samba & autofs (automount) acb67 Linux - Networking 4 06-10-2004 10:57 AM
Setting up automount with autofs smattbac Slackware 0 10-12-2003 08:51 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > CentOS

All times are GMT -5. The time now is 04:45 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration