- Red Hat Enterprise Linux 6
- Red Hat Enterprise Linux 7
To Start the autofs with the –debug mode.
The file /etc/auto.master is the main configuration file for ‘autofs’ service, this file contains the master map lists of the mount points on the system controlled by ‘autofs’, and their corresponding configuration files or network sources which are known as ‘ automount maps ‘. This is how the file should looks like. root@localhost # cat /etc/sysconfig/autofs # # Init syatem options # # If the kernel supports using the autofs miscellanous device # and you wish to use it you must set this configuration option # to “yes” otherwise it will not be used. # USEMISCDEVICE=”yes” # # Use OPTIONS to add automount(8) command line options that.
Just add the below line in the /etc/sysconfig/autofs :
Red Hat Enterprise Linux 6
[root@localhost ~]# cat /etc/sysconfig/autofs # # Init syatem options # # If the kernel supports using the autofs miscellanous device # and you wish to use it you must set this configuration option # to “yes” otherwise it will not be used. # USE_MISC_DEVICE=”yes” # # Use OPTIONS to add automount(8) command line options that # will be used when the daemon is started. # OPTIONS=”–debug” |
And restart autofs with:
# /etc/init.d/autofs restart |
Red Hat Enterprise Linux 7
OPTIONS=”–debug” |
And restart the autofs service:
# systemctl restart autofs.service |
The additional logging will now be reflected in /var/log/messages:
autofs.conf: autofs configuration
Command to display
autofs.conf
manual in Linux: $ man 5 autofs.conf
NAME
autofs.conf - autofs configurationDESCRIPTION
Configuration settings used byautomount(8)may be changed in the configuration file /etc/autofs.conf.
This file contains two primary sections, autofs and amd.
Configuration entries may be present at the beginning of theconfiguration file without a section header and are implicitlyincluded as part of the autofs section.
Each section name is enclosed in square brackets withspaces between the brackets and the section name. The amdsection may be followed by further sections, named by thetop level mount point path, that contain per mountconfiguration settings.
SECTION autofs CONFIGURATION OPTIONS
Configuration settings available are:
Sets the default mount timeout in seconds. The internal programdefault is 10 minutes, but the default installed configurationoverrides this and sets the timeout to 5 minutes to be consistentwith earlier autofs releases.
Set the default timeout for caching failed key lookups (program default60). If the equivalent command line option is given it will override thissetting.
Set the default time to wait for a response from a spawned mount(8)before sending it a SIGTERM. Note that we still need to wait for theRPC layer to timeout before the sub-process exits so this isn't idealbut it is the best we can do. The default is to wait until mount(8)returns without intervention.
Set the default time to wait for a response from a spawned umount(8)before sending it a SIGTERM. Note that we still need to wait for theRPC layer to timeout before the sub-process exits so this isn't idealbut it is the best we can do.
Maps are browsable by default (program default 'yes').
Specify the default protocol used bymount.nfs(8)(program default 3). Since we can't identify this default automaticallywe need to set it in the autofs configuration.
Determine whether global options, given on the command line or per mountin the master map, are appended to map entry options or if the map entryoptions replace the global options (program default 'yes', append options).
set default log level 'none', 'verbose' or 'debug' (program default 'none').
override the use of a prefix with standard environment variables when aprogram map is executed. Since program maps are run as the privilededuser setting these standard environment variables opens automount(8) topotential user privilege escalation when the program map is written in alanguage that can load components from, for example, a user home directory(program default 'no').
This configuration option may be used to change the number of hashtable slots (default 1024).
This configuration option affects the overhead of searching the mapentry cache for map entries when there are a large number of entries.It affects the number of entries that must be looked at to locate amap entry in the map entry cache. For example, the default of 1024and a direct map with 8000 entries would result in each slotcontaining an average of 8 entries, which should be acceptable.
However, if excessive CPU usage is observed during automount lookupsincreasing this option can reduce the CPU overhead considerably becuaseit reduces the length of the search chains.
Note that the number of entries in a map doesn't necessarily relateto the number of entries used in the map entry cache.
There are three distinct cases, direct maps and indirect maps thatuse the 'browse' option must be read in their entirity at programstart so, in these two cases the map size does retate directly tothe map entry cache size.
For indirect maps that do not use the 'browse' option entries areadded to the map entry cache at lookup so the number of active cacheentries, in this case, is usually much less than the number of entriesin the map. In this last case it would be unusual for the map entrycache to grow large enough to warrant increasing the default beforean event that cleans stale entries, a map re-read for example.
NFS mounts where the host name resolves to more than one IP addressare probed for availability and to establish the order in which mountsto them should be tried. To ensure that mount attempts are made onlyto hosts that are responding and are tried in the order of hosts withthe quickest response the IP address of the host needs to be used forthe mount.
If it is necessary to use the hostname given in the map entry for themount regardless, then set this option to 'yes'.
Be aware that if this is done there is no defense against the hostname resolving to one that isn't responding and while the numberof attempts at a successful mount will correspond to the number ofaddresses the host name resolves to the order will also not correspondto fastest responding hosts.
The original request to add this log message needed it to be unconditional.That produces, IMHO, unnecessary noise in the log so a configuration optionhas been added to provide the ability to turn it off. The default is 'no'to maintain the current behaviour.
Set the time to wait and retry if sssd returns 'no such entry' when startingup. When sssd is starting up it can sometimes return 'no such entry' for ashort time until it has read in the LDAP map information. Default is 0 seconds,don't wait.
Set whether to use a mount request log id so that log entries for specificmount requests can be easily identified in logs that have multiple conncurrentrequests. Default is don't use mount request log ids.
LDAP Configuration
Configuration settings available are: Alfred 4 0 3 sezonas.
Set the network response timeout (default 8).Set timeout value for the synchronous API calls. The default is the LDAPlibrary default of an infinite timeout.
Set the network response timeout (default 8).
A space seperated list of server uris of the form <proto>://<server>[/]where <proto> can be ldap or ldaps. The option can be given multiple times.Map entries that include a server name override this option and it is thennot used. Default is an empty list in which case either the server givenin a map entry or the LDAP configured default is used. This uri list is read atstartup and whenever the daemon receives a HUP signal.
This configuration option can also be used to request autofs lookup SRV RRsfor a domain of the form <proto>:///[<domain dn>]. Note that a trailing'/' is not allowed when using this form. If the domain dn is not specifiedthe dns domain name (if any) is used to construct the domain dn for theSRV RR lookup. The server list returned from an SRV RR lookup is refreshedaccording to the minimum ttl found in the SRV RR records or after one hour,whichever is less.
The base dn to use when searching for amap base dn. This entry may begiven multiple times and each will be checked for a map base dn inthe order they occur in the configuration. The search base list is readat startup and whenever the daemon recieves a HUP signal.
The map object class. In the nisMap schema this corresponds to the classnisMap and in the automountMap schema it corresponds to the classautomountMap.
The map entry object class. In the nisMap schema this correspondsto the class nisObject and in the automountMap schema itcorresponds to the class automount.
The attribute used to identify the name of the map to which thisentry belongs. In the nisMap schema this corresponds to the attributenisMapName and in the automountMap schema it corresponds to theattribute ou or automountMapName.
The attribute used to identify a map key. In the nisMap schema thiscorresponds to the attribute cn and in the automountMap schemait corresponds to the attribute automountKey.
The attribute used to identify the value of the map entry. In the nisMapschema this corresponds to the attribute nisMapEntry and in the automountMapschema it corresponds to the attributeautomountInformation.
SECTION amd CONFIGURATION OPTIONS
A number of the amd configuration options are not used by autofs,some because they are not relevant within autofs, some becausethey are done differently in autofs and others that are not yetimplemented.
Since mount_type is always autofs (because there's no user spaceNFS server) the configuration entries relating to that aren't used.Also, server availability is done differently within autofs so theoptions that relate to the amd server monitoring sub-system arealso not used.
These options are mount_type, auto_attrcache, portmap_program,nfs_vers_ping, nfs_allow_any_interface, nfs_allow_insecure_port,nfs_proto, nfs_retransmit_counter, nfs_retransmit_counter_udp,nfs_retransmit_counter_tcp, nfs_retransmit_counter_toplvl,nfs_retry_interval, nfs_retry_interval_udp, nfs_retry_interval_tcp,nfs_retry_interval_toplvl and nfs_vers.
Other options that are not used within the autofs implementation:
There's no corresponding option for this within autofs.
There's no user space NFS server to control access to so thisoption isn't relevant. The show_statfs_entries can't beimplemented for the same reason.
There's no user space NFS server and autofs avoids using filebased mtab whenever possible.
Sun map format is handled by autofs itself.
Are not supported by autofs.
External ldap caching is not used by autofs.
autofs always attempts to use the highest available ldapprotocol version.
The mapentry cache is continually updated and stale entries
cleaned on re-load, which is done when map changes are detectedso these configuration entries are not used by autofs. Anexception to this is the case where the map is large. In thiscase it may be necessary to read the whole map at startup even ifbrowsing is is not enabled. Adding the cache:=all option tomap_options can be used to for this.
Options that are handled differently within autofs:
autofs has somewhat more limited logging and debug logging options.When the log_options options is encountered it is converted to thenearest matching autofs logging option. Since the configurationoption debug_options would be handled the same way it is ignored.
This option has no sensible meaning within autofs because autofsalways tries to re-connect to existing mounts. While this has itsown set of problems not re-connecting to existing mounts alwaysresults in a non-functional automount tree if mounts were busy atthe last shutdown (as is also the case with amd when usingmount_type autofs).
Detaching mounts often causes serious problems for users ofexisting mounts. It is used by autofs in some cases, either atthe explicit request of the user (with a command line or initoption) and in some special cases during program operation butis avoided whenever possible.
A number of configuration options are not yet implemented:
Since autofs always tries to re-connect to mounts left mountedfrom a previous shutdown this is a sensible option to implementand that will be done.
Allow map keys to be shown in directory listings. This optioncan have values of 'yes' or 'no'. The default is 'no'. A variationof this option, 'browsable', can be used as a pseudo mount optionin type 'auto' map entries to provide provide browsing funtionalityin sub-mounts. The amd 'browsable_dirs = full' option cannot beimplemented within the current autofs framework and is not supported.
A timeout is not currently used for for program maps, might beimplemented.
The tag option is not implemented within autofs.
Supported options:
These options default to what is returned from uname(2) and canbe overridden if required.
If not set defaults to the host domain name. This option correspondsto the HP_UX cluster name (according to the amd source) and isprobably not used in Linux but is set anyway.
Is the base name of the mount tree used for external mounts thatare sometimes needed by amd maps. Its default value is '/a'.
Specifies the autofs map source, such as file, nis, ldap etc. andhas no default value set.
This option is used to override /defaults entries within mapsand can be used to provide different defaults on specific machineswithout having to modify centrally managed maps. It is empty bydefault.
Colon seperated paths to search for maps that are not specifiedas a full path.
Is equivalent to the autofs timeout option. It is only possibleto use this with type 'auto' mounts due to the way the autofskernel module performs expiry. It takes its default value fromthe autofs internal defaulti of 600 seconds.
If set to 'yes' autofs will attempt to use bind mounts for type'auto' when possible.
Allows setting of a domain name other than the system default.
Is used to override (or set) the host domain name.
If set to 'yes' then the contents of ${rhost} is translated inits official host name.
![Autofs Ubuntu Autofs Ubuntu](https://i.ytimg.com/vi/PxwHWjxeVPY/maxresdefault.jpg)
If set to 'yes' the domain name part of the host is stripppedwhen normalizing hostnames. This can be useful when using ofthe same maps in a multiple domain environment.
This option is set to 'yes' by default and will collapsemultiple unescaped occurrences of '/' to a single '/'.
This option has a default value of 'no'. If set to 'yes' thenany defaults entry will be checked for selectors to determinethe values to be used. selectors_in_defaults is the preferredoption to use.
iThis option has no default value. It must be set to the base dnthat is used for queries if ldap is to be used as a map source.
This option has no default value set. It must be set to the URIof the LDAP server to be used for lookups wheni ldap is used amap source. It may contain a comma or space seperated list ofLDAP URIs.
Sets the base name used for hesiod map sources.
This is an aditional configuration option for the autofs amd formatparser implementation.
There's no simple way to determine what the system default filesystemis and am-utils needs to be continually updated to do this and caneasily get it wrong ayway. So allow it to be set in the configuration.
EXAMPLE
Linux Automount Nfs
AUTHOR
This manual page was written by Ian Kent <raven [at] themaw.net>.SEE ALSO
automount(8),Autofs Ubuntu Tutorial
auto.master(5),autofs_ldap_auth.conf(5)Pages related to autofs.conf
How To Install Gcc Ubuntu
- autofs (5) - Format of the automounter maps
- autofs_ldap_auth.conf (5) - autofs LDAP authentication configuration
- auto.master (5) - Master Map for automounter
- auto (5) - Master Map for automounter
- authorized_keys (5) - OpenSSH daemon
- audisp-prelude (5) - the audisp-prelude configuration file
Centos 7 Autofs
Linux man pages generated by: SysTutorials. Linux Man Pages Copyright Respective Owners. Site Copyright © SysTutorials. All Rights Reserved.