📄 amdref.texinfo
字号:
The local mount point. The semantics of this option vary betweenfilesystems.For NFS and UFS filesystems the value of @code{$@{fs@}} is used as thelocal mount point. For other filesystem types it has other meaningswhich are described in the section describing the respective filesystemtype. It is important that this string uniquely identifies thefilesystem being mounted. To satisfy this requirement, it shouldcontain the name of the host on which the filesystem is resident and thepathname of the filesystem on the local or remote host.The reason for requiring the hostname is clear if replicated filesystemsare considered. If a fileserver goes down and a replacement filesystemis mounted then the @dfn{local} mount point @dfn{must} be different fromthat of the filesystem which is hung. Some encoding of the filesystemname is required if more than one filesystem is to be mounted from anygiven host.If the hostname is first in the path then all mounts from a particularhost will be gathered below a single directory. If that server goesdown then the hung mount points are less likely to be accidentallyreferenced, for example when @b{getwd}(3) traverses the namespace tofind the pathname of the current directory.The @samp{fs} option defaults to@code{$@{autodir@}/$@{rhost@}$@{rfs@}}. In addition,@samp{rhost} defaults to the local host name (@code{$@{host@}}) and@samp{rfs} defaults to the value of @code{$@{path@}}, which is the fullpath of the requested file; @samp{/home/foo} in the example above(@pxref{Selectors}). @code{$@{autodir@}} defaults to @samp{/a} but maybe changed with the ``-a'' command line option. Sun's automounterdefaults to @samp{/tmp_mnt}. Note that there is no @samp{/} betweenthe @code{$@{rhost@}} and @code{$@{rfs@}} since @code{$@{rfs@}} beginswith a @samp{/}.@refill@node opts Option, remopts Option, fs Option, Map Options@comment node-name, next, previous, up@subsubsection opts Option@cindex Setting system mount options@cindex Passing parameters to the mount system call@cindex mount system call@cindex mount system call flags@cindex The mount system call@cindex opts, mount option@cindex Mount option; optsThe options to pass to the mount system call. A leading @samp{-} issilently ignored. The mount options supported generally correspond tothose used by @b{mount}(8) and are listed below. Some additionalpseudo-options are interpreted by @i{Amd} and are also listed.Unless specifically overridden, each of the system default mount optionsapplies. Any options not recognised are ignored. If no options list issupplied the string @samp{rw,defaults} is used and all the systemdefault mount options apply. Options which are not applicable for aparticular operating system are silently ignored. For example, only 4.4BSD is known to implement the @code{compress} and @code{spongy} options.@table @code@item compressUse NFS compression protocol.@item grpidUse BSD directory group-id semantics.@item intrAllow keyboard interrupts on hard mounts.@item noconnDon't make a connection on datagram transports.@item noctoNo close-to-open consistency.@item nodevsDon't allow local special devices on this filesystem.@item nosuidDon't allow set-uid or set-gid executables on this filesystem.@item quotaEnable quota checking on this mount.@item retrans=@i{n}The number of NFS retransmits made before a user error is generated by a@samp{soft} mounted filesystem, and before a @samp{hard} mountedfilesystem reports @samp{NFS server @dfn{yoyo} not responding stilltrying}.@item roMount this filesystem readonly.@item rsize=@var{n}The NFS read packet size. You may need to set this if you are usingNFS/UDP through a gateway.@item softGive up after @dfn{retrans} retransmissions.@item spongyLike @samp{soft} for status requests, and @samp{hard} for data transfers.@item tcpUse TCP/IP instead of UDP/IP, ignored if the NFS implementation does notsupport TCP/IP mounts.@item timeo=@var{n}The NFS timeout, in tenth-seconds, before a request is retransmitted.@item wsize=@var{n}The NFS write packet size. You may need to set this if you are usingNFS/UDP through a gateway.@end tableThe following options are implemented by @i{Amd}, rather than beingpassed to the kernel.@table @code@item nounmountConfigures the mount so that its time-to-live willnever expire. This is also the default for some filesystem types.@c@c Implementation broken:@item ping=@var{n}The interval, in seconds, between keep-alive pings. When fourconsecutive pings have failed the mount point is marked as hung. Thisinterval defaults to 30 seconds. If the ping interval is less than zero,no pings are sent and the host is assumed to be alwaysup. By default, pings are not sent for an NFS/TCP mount.@item retry=@var{n}The number of times to retry the mount system call.@item utimeout=@var{n}The interval, in seconds, by which the mount'stime-to-live is extended after an unmount attempthas failed. In fact the interval is extended before the unmount isattempted to avoid thrashing. The default value is 120 seconds (twominutes) or as set by the ``-w'' command line option.@end table@node remopts Option, sublink Option, opts Option, Map Options@comment node-name, next, previous, up@subsubsection remopts Option@cindex Setting system mount options for non-local networks@cindex remopts, mount option@cindex Mount option; remoptsThis option has the same use as @code{$@{opts@}} but applies only whenthe remote host is on a non-local network. For example, when using NFSacross a gateway it is often necessary to use smaller values for thedata read and write sizes. This can simply be done by specifying thesmall values in @var{remopts}. When a non-local host is accessed, thesmaller sizes will automatically be used.@i{Amd} determines whether a host is local by examining the networkinterface configuration at startup. Any interface changes made after@i{Amd} has been started will not be noticed. The likely effect willbe that a host may incorrectly be declared non-local.Unless otherwise set, the value of @code{$@{rem@}} is the same as thevalue of @code{$@{opts@}}.@node sublink Option, type Option, remopts Option, Map Options@comment node-name, next, previous, up@subsubsection sublink Option@cindex Setting the sublink option@cindex sublink, mount option@cindex Mount option; sublinkThe subdirectory within the mounted filesystem to which the referenceshould point. This can be used to prevent duplicate mounts in caseswhere multiple directories in the same mounted filesystem are used.@node type Option, , sublink Option, Map Options@comment node-name, next, previous, up@subsubsection type Option@cindex Setting the filesystem type option@cindex type, mount option@cindex Mount option; typeThe filesystem type to be used. @xref{Filesystem Types}, for a fulldescription of each type.@refill@node Amd Command Line Options, Filesystem Types, Mount Maps, Top@comment node-name, next, previous, up@chapter @i{Amd} Command Line Options@cindex Command line options, Amd@cindex Amd command line options@cindex Overriding defaults on the command lineMany of @i{Amd}'s parameters can be set from the command line. Thecommand line is also used to specify automount points and maps.The general format of a command line is@exampleamd [@i{options}] @{ @i{directory} @i{map-name} [-@i{map-options}] @} ...@end exampleFor each directory and map-name given, @i{Amd} establishes anautomount point. The @dfn{map-options} may be any sequence of optionsor selectors---@pxref{Location Format}. The @dfn{map-options}apply only to @i{Amd}'s mount point.@samp{type:=toplvl;cache:=mapdefault;fs:=$@{map@}} is the default value for themap options. Default options for a map are read from a special entry inthe map whose key is the string @samp{/defaults}. When default optionsare given they are prepended to any options specified in the mount-maplocations as explained in. @xref{Map Defaults}, for more details.The @dfn{options} are any combination of those listed below.Once the command line has been parsed, the automount points are mounted.The mount points are created if they do not already exist, in which case theywill be removed when @i{Amd} exits.Finally, @i{Amd} disassociates itself from its controlling terminal andforks into the background.Note: Even if @i{Amd} has been built with @samp{-DDEBUG} it will stillbackground itself and disassociate itself from the controlling terminal.To use a debugger it is necessary to specify @samp{-D nodaemon} on thecommand line.@menu* -a Option:: Automount directory.* -c Option:: Cache timeout interval.* -d Option:: Domain name.* -k Option:: Kernel architecture.* -l Option:: Log file.* -n Option:: Hostname normalisation.* -p Option:: Output process id.* -r Option:: Restart existing mounts.* -t Option:: Kernel RPC timeout.* -v Option:: Version information.* -w Option:: Wait interval after failed unmount.* -x Option:: Log options.* -y Option:: NIS domain.* -C-Option:: Cluster name.* -D-Option:: Debug flags.@end menu@node -a Option, -c Option, Amd Command Line Options, Amd Command Line Options@comment node-name, next, previous, up@section @code{-a} @var{directory}@cindex Automount directory@cindex Setting the default mount directorySpecifies the default mount directory. This option changes the variable@code{$@{autodir@}} which otherwise defaults to @file{/a}. For example,some sites prefer @file{/amd}.@exampleamd -a /amd ...@end example@node -c Option, -d Option, -a Option, Amd Command Line Options@comment node-name, next, previous, up@section @code{-c} @var{cache-interval}@cindex Cache interval@cindex Interval before a filesystem times out@cindex Setting the interval before a filesystem times out@cindex Changing the interval before a filesystem times outSelects the period, in seconds, for which a name is cached by @i{Amd}.If no reference is made to the volume in this period, @i{Amd} discardsthe volume name to filesystem mapping.Once the last reference to a filesystem has been removed, @i{Amd}attempts to unmount the filesystem. If the unmount fails the intervalis extended by a further period as specified by the @samp{-w} commandline option or by the @samp{utimeout} mount option.The default @dfn{cache-interval} is 300 seconds (five minutes).@node -d Option, -k Option, -c Option, Amd Command Line Options@comment node-name, next, previous, up@section @code{-d} @var{domain}@cindex Domain name@cindex Setting the local domain name@cindex Overriding the local domain nameSpecifies the host's domain. This sets the internal variable@code{$@{domain@}} and affects the @code{$@{hostd@}} variable.If this option is not specified and the hostname already contains thelocal domain then that is used, otherwise the default value of@code{$@{domain@}} is @samp{unknown.domain}.For example, if the local domain was @samp{doc.ic.ac.uk}, @i{Amd} couldbe started as follows:@exampleamd -d doc.ic.ac.uk ...@end example@node -k Option, -l Option, -d Option, Amd Command Line Options@comment node-name, next, previous, up@section @code{-k} @var{kernel-architecture}@cindex Setting the Kernel architectureSpecifies the kernel architecture of the system. This is usually theoutput of @samp{arch -k} and its only effect is to set the variable@code{$@{karch@}}. If this option is not given, @code{$@{karch@}} hasthe same value as @code{$@{arch@}}.This would be used as follows:@exampleamd -k `arch -k` ...@end example@node -l Option, -n Option, -k Option, Amd Command Line Options@comment node-name, next, previous, up@section @code{-l} @var{log-option}@cindex Log filename@cindex Setting the log file@cindex Using syslog to log errors@cindex syslogSelects the form of logging to be made. Two special @dfn{log-options}are recognised.@enumerate@itemIf @dfn{log-option} is the string @samp{syslog}, @i{Amd} will use the@b{syslog}(3) mechanism.@refill@itemIf @dfn{log-option} is the string @samp{/dev/stderr}, @i{Amd} will usestandard error, which is also the default target for log messages. Toimplement this, @i{Amd} simulates the effect of the @samp{/dev/fd}driver.@end enumerateAny other string is taken as a filename to use for logging. Logmessages are appended to the file if it already exists, otherwise a newfile is created. The file is opened once and then held open, ratherthan being re-opened for each message.If the @samp{syslog} option is specified but the system does not supportsyslog or if the named file cannot be opened or created, @i{Amd} willuse standard error. Error messages generated before @i{Amd} hasfinished parsin
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -