| 1 |
|
| 2 |
amd map parser |
| 3 |
============== |
| 4 |
|
| 5 |
The ability to parse amd format maps has been added to autofs. |
| 6 |
|
| 7 |
How to use amd maps in autofs |
| 8 |
----------------------------- |
| 9 |
|
| 10 |
To add amd map parsing to autofs a new "format" module has been added. |
| 11 |
|
| 12 |
There are two ways to use this new map format module. First, the existing |
| 13 |
master map syntax can be used as described below, and second, sections that |
| 14 |
use the top level mount path may be added to the autofs configuration below |
| 15 |
the "amd" section in much the same way as is done with amd. |
| 16 |
|
| 17 |
The master map entry syntax is: |
| 18 |
|
| 19 |
mount-point [map-type[,format]:]map [options] |
| 20 |
|
| 21 |
For amd format maps this becomes: |
| 22 |
|
| 23 |
/amd/mp file,amd:amd.mp |
| 24 |
|
| 25 |
which will use file as the map source and the amd format parser for |
| 26 |
the map. |
| 27 |
|
| 28 |
In order to use nsswitch to specify the map source an amd per-mount |
| 29 |
section needs to be added to the autofs configuration so autofs |
| 30 |
knows the master map entry is an amd format mount. |
| 31 |
|
| 32 |
If an amd-per-mount section is added to the autofs configuration a |
| 33 |
corresponding master map entry is optional. If both are present the |
| 34 |
map name given in the master map entry will override a "map_name" |
| 35 |
option in the amd per-mount section. |
| 36 |
|
| 37 |
If an amd per-mount section is used alone then not giving the "map_type" |
| 38 |
option will alow the use of nsswicth for map selection. |
| 39 |
|
| 40 |
See below for an example of an amd per-mount configuration entry. |
| 41 |
|
| 42 |
|
| 43 |
Configuration sub-system changes |
| 44 |
-------------------------------- |
| 45 |
|
| 46 |
The configuration sub-system has changed to accommodate the amd parser. |
| 47 |
See autofs.conf(5) for more information on format changes. |
| 48 |
|
| 49 |
The configuration is now split into system initialization only |
| 50 |
configuration and the daemon configuration. Previously everything was |
| 51 |
located in the system initialization configuration file, but now the |
| 52 |
configuration is located in autofs.conf in the directory the distribution |
| 53 |
uses for the autofs configuration. |
| 54 |
|
| 55 |
There is information about what amd configuration entries can be used |
| 56 |
in comments of the installed configuration so that's worth a look. |
| 57 |
|
| 58 |
All that's needed to add an existing amd configuration to autofs is to |
| 59 |
add it below the autofs configuration. Apart from changing the amd |
| 60 |
"[ global ]" section name to "[ amd ]" nothing else should need to be |
| 61 |
changed. However, quite a few amd configuration options don't have |
| 62 |
meaning within autofs. When these options are seen they are logged. |
| 63 |
|
| 64 |
Be aware that, if an old configuration exists and the configuration |
| 65 |
hasn't been updated after the installation, changes to the old |
| 66 |
configuration will override changes to the new configuration because |
| 67 |
backward compatibility takes priority over the new implementation. |
| 68 |
|
| 69 |
The amd per-mount sections have two functions, to allow per-mount |
| 70 |
configuration, as it does in amd, and to allow master map entries to |
| 71 |
avoid the need to specify the "type,format" part of the master map |
| 72 |
entry. This allows them to use the nsswitch map source functionality |
| 73 |
in the same way autofs master map entries do. |
| 74 |
|
| 75 |
If amd per-mount sections are present in the autofs configuration |
| 76 |
their corresponding master map entries are optional. This allows |
| 77 |
amd maps to be used without adding incompatible entries to the autofs |
| 78 |
master map in shared infrastructure environments. |
| 79 |
|
| 80 |
If a section for an amd mount is added below the global amd section |
| 81 |
using the mount point path (as is done in amd.conf) then autofs will |
| 82 |
know the map format is amd (it doesn't matter if there are no other |
| 83 |
configuration options in the mount point section). |
| 84 |
|
| 85 |
If there is a corresponding master map entry the map given in the |
| 86 |
master map entry will be used over the map_name option if it is |
| 87 |
present in an amd per-mount section. |
| 88 |
|
| 89 |
If a mount point is present in the master map and the source of the |
| 90 |
map is nis then it is sufficient to use (for example): |
| 91 |
|
| 92 |
/amd/mp amd.mp |
| 93 |
|
| 94 |
in the master map and |
| 95 |
|
| 96 |
automount: nis |
| 97 |
|
| 98 |
in /etc/nsswitch.conf or |
| 99 |
|
| 100 |
[ amd ] |
| 101 |
map_type = nis |
| 102 |
|
| 103 |
in the configuration along with |
| 104 |
|
| 105 |
[ /amd/mp ] |
| 106 |
|
| 107 |
or |
| 108 |
|
| 109 |
[ /amd/mp ] |
| 110 |
map_type = nis |
| 111 |
|
| 112 |
An example of an amd per-mount configuration entry is: |
| 113 |
|
| 114 |
[ amd ] |
| 115 |
... |
| 116 |
|
| 117 |
[ /test ] |
| 118 |
map_name = /etc/amd.test |
| 119 |
#map_type = file |
| 120 |
#search_path = /etc |
| 121 |
#browsable_dirs = yes | no |
| 122 |
browsable_dirs = yes |
| 123 |
|
| 124 |
|
| 125 |
amd map options that can be used |
| 126 |
-------------------------------- |
| 127 |
|
| 128 |
In an attempt to describe the usable amd map options, many of the amd |
| 129 |
map options have been added to autofs(5). |
| 130 |
|
| 131 |
Not all the amd functionality has been implemented. The autofs(5) man |
| 132 |
page usually mentions if something hasn't been implemented so that's |
| 133 |
worth checking. |
| 134 |
|
| 135 |
What hasn't been implemented |
| 136 |
---------------------------- |
| 137 |
|
| 138 |
The configuration options fully_qualified_hosts, unmount_on_exit and |
| 139 |
browsable_dirs = full (and a couple of others) aren't implemented. |
| 140 |
|
| 141 |
Map types (sources) ndbm, passwd are not implemented. |
| 142 |
The map source "sss" can't be used for amd format maps. |
| 143 |
|
| 144 |
Map caching options aren't used, the existing autofs map caching is |
| 145 |
always used for available map sources. |
| 146 |
|
| 147 |
The regex map key matching feature is not implemented. |
| 148 |
|
| 149 |
Mount types lustre, nfsx, jfs and direct haven't been implemented |
| 150 |
and other mount types that aren't implemented in amd are also not |
| 151 |
available. |
| 152 |
|
| 153 |
How to find out more |
| 154 |
-------------------- |
| 155 |
|
| 156 |
Have a look at the man pages autofs.conf(5), autofs(5) and to a |
| 157 |
lesser extent auto.master(5). These may help. |
| 158 |
|
| 159 |
But the best way to get more information is to ask on the |
| 160 |
autofs mailing list as described in the README file. |
| 161 |
|
| 162 |
Ian |