1 Sun-style Automounter Syntax Support in Amd
2 Last updated: October 10, 2005
7 The goal of this effort is to provide a drop in replacement for the Sun
8 automounter. This is implemented in two ways. (1) A new parser built into
9 Amd. (2) a standalone sun2amd Unix filter tool that can convert Sun-style
12 Support for Sun-style maps in Amd (including this document) is a
13 work-in-progress. This feature as a whole has not been throughly tested and
14 is "alpha" quality as of the date posted at the top of this document.
18 Currently sun2amd supports most of the basic syntax features of Sun maps.
19 However, support for Sun auto.master maps does not yet exists at any level.
20 Below is a list of supported and not-yet supported features.
22 1. Supported Sun map features:
24 - Simple map entry format: <key> [mount_options] location ...
25 locations take the form of host:pathname
27 - Map Key Substitution: <key> <hostname>:/tmp/&
28 the & expands to <key>
30 - Wildcard Key: * <hostname>:/tmp
31 This is is a catch-all entry.
33 - Variable Substitution:
34 $ARCH, $CPU, $HOST, $OSNAME, $OSREL, $OSVERS, $NATISA
36 - Multiple Mount format:
37 <key> [mount_options] [mountpoint] [mount-options locations...]...
40 pluto -ro /tmp1 host1:/tmp1 /tmp2 host2:/tmp2
42 - HSFS file-system (cdrom): <key> -fstype=hsfs,ro :/dev/cdrom
45 2. Not-yet supported Sun map features:
47 - Replicated File Systems: <hostname>,<hostname>...:<pathname>
48 This is a feature of Solaris that allows a user to specify a
49 set of hosts to appear as one in a map entry. When a host
50 does not respond the kernel will switch to an alternate
51 server. Amd will supports the syntax for replicated file
52 systems by creating multiple hosts, however, Amd will not
53 perform any kind of fail over.
55 - CacheFS (although Amd supports type:=cachefs, sun2amd doesn't yet parse
58 - AutoFS (although Amd supports Autofs mounts and type:=auto, sun2amd
59 may not parse it fully).
61 - Included maps: +<map_name>
62 This will include the contents of a map into another map.
64 - Sun master maps: auto.master
65 Amd still relies and amd.conf. Any feature in auto.master
66 must be duplicated using Amd equivalent features in amd.conf.
69 The automounter is suppose to dynamically create map entries
70 under this mount point corresponding to NFS server(s) exported
71 file systems. While this isn't parser by sun2amd, Amd does support
72 host maps (type:=host).
74 - Federated Naming Service (FNS) (-xfn):
75 A naming server that wraps a number of other naming service
78 - "-null" map option: A way to cancel maps in the auto.master file.
81 This file provides a way to specify what lookup service to use
82 for a number of systems including Sun's automounter. In amd
83 lookup services for map files are define in the amd.conf file.
88 To enable Sun-style maps in Amd, set "sun_map_syntax = yes" in your amd.conf
89 file. When this flag is set in [global], all maps read by Amd are assumed
90 to be Sun style maps. You can set this on a per map basis, thus mixing
91 Sun-style and Amd-style maps. For more information about amd.conf please
92 see the Amd documentation.
102 map_name = /etc/amd.sun_map
106 * sun2amd command line utility
108 In addition to build-in Amd support there also exists the sun2amd command
109 line utility that converts Sun maps to Amd maps. This can be useful in
110 migrating one or more Sun maps to the Amd syntax in one step.
114 $ sun2amd -i sun_map -o amd_map
116 This line tells sun2amd to read the file sun_map and redirect its output to
117 a file called amd_map. By default sun2amd reads from stdin and writes to
118 stdout (i.e., traditional Unix filter).
123 Q1: I know "/net" is not supported, but how can I achieve the same
124 functionality with Amd?
126 A1: In short, you must create the '/net' entry as a Amd entry of type host
127 by hand. Below is an example of how to do this. See the Amd
128 documentation on type autofs for more information.
135 map_name = /etc/amd.net
139 /defaults fs:=${autodir}/${rhost}/root/${rfs}
140 * rhost:=${key};type:=host;rfs:=/
142 (more FAQ entries to come...)