1cc0207dcSpendry.\" 2398a5aebSmckusick.\" Copyright (c) 1989 Jan-Simon Pendry 3398a5aebSmckusick.\" Copyright (c) 1989 Imperial College of Science, Technology & Medicine 4ec35a16dSbostic.\" Copyright (c) 1989, 1991, 1993 5ec35a16dSbostic.\" The Regents of the University of California. All rights reserved. 6398a5aebSmckusick.\" 7398a5aebSmckusick.\" This code is derived from software contributed to Berkeley by 8398a5aebSmckusick.\" Jan-Simon Pendry at Imperial College, London. 9398a5aebSmckusick.\" 10cc0207dcSpendry.\" %sccs.include.redist.man% 11398a5aebSmckusick.\" 12*2a44b01aSah.\" @(#)amd.8 5.11 (Berkeley) 06/01/94 13c626267eSpendry.\" 14cc0207dcSpendry.\" $Id: amd.8,v 5.2.2.1 1992/02/09 15:11:39 jsp beta $ 15398a5aebSmckusick.\" 16ec35a16dSbostic.Dd "" 1713251ec2Scael.Dt AMD 8 1813251ec2Scael.Os 1913251ec2Scael.Sh NAME 2013251ec2Scael.Nm amd 2113251ec2Scael.Nd automatically mount file systems 2213251ec2Scael.Sh SYNOPSIS 2313251ec2Scael.Nm amd 2413251ec2Scael.Op Fl nprv 2513251ec2Scael.Op Fl a Ar mount_point 2613251ec2Scael.Op Fl c Ar duration 2713251ec2Scael.Op Fl d Ar domain 2813251ec2Scael.Bk -words 2913251ec2Scael.Op Fl k Ar kernel-arch 3013251ec2Scael.Ek 3113251ec2Scael.Op Fl l Ar logfile 3213251ec2Scael.Op Fl t Ar interval.interval 3313251ec2Scael.Bk -words 3413251ec2Scael.Op Fl w Ar interval 3513251ec2Scael.Ek 3613251ec2Scael.Op Fl x Ar log-option 3713251ec2Scael.Op Fl y Ar YP-domain 3813251ec2Scael.Bk -words 3913251ec2Scael.Op Fl C Ar cluster-name 4013251ec2Scael.Ek 4113251ec2Scael.Op Fl D Ar option 4213251ec2Scael.Oo 4313251ec2Scael.Ar directory mapname 4413251ec2Scael.Op Fl map-options 4513251ec2Scael.Oc 4613251ec2Scael.Ar ... 4713251ec2Scael.Sh DESCRIPTION 4813251ec2Scael.Nm Amd 49398a5aebSmckusickis a daemon that automatically mounts filesystems 50398a5aebSmckusickwhenever a file or directory 51398a5aebSmckusickwithin that filesystem is accessed. 52398a5aebSmckusickFilesystems are automatically unmounted when they 5313251ec2Scaelappear to be quiescent. 5413251ec2Scael.Pp 5513251ec2Scael.Nm Amd 56398a5aebSmckusickoperates by attaching itself as an 5713251ec2Scael.Tn NFS 58398a5aebSmckusickserver to each of the specified 5913251ec2Scael.Ar directories . 60398a5aebSmckusickLookups within the specified directories 61398a5aebSmckusickare handled by 6213251ec2Scael.Nm amd , 638a89c22cSpendrywhich uses the map defined by 6413251ec2Scael.Ar mapname 65398a5aebSmckusickto determine how to resolve the lookup. 66398a5aebSmckusickGenerally, this will be a host name, some filesystem information 67398a5aebSmckusickand some mount options for the given filesystem. 6813251ec2Scael.Sh OPTIONS 6913251ec2Scael.Bl -tag -width Ds 7013251ec2Scael.It Fl a Ar temporary-directory 7113251ec2ScaelSpecify an alternative location for the real mount points. 7213251ec2ScaelThe default is 7313251ec2Scael.Pa /a . 7413251ec2Scael.It Fl c Ar duration 7513251ec2ScaelSpecify a 7613251ec2Scael.Ar duration , 7713251ec2Scaelin seconds, that a looked up name remains 7813251ec2Scaelcached when not in use. The default is 5 minutes. 7913251ec2Scael.It Fl d Ar domain 8013251ec2ScaelSpecify the local domain name. If this option is not 8113251ec2Scaelgiven the domain name is determined from the hostname. 8213251ec2Scael.It Fl k Ar kernel-arch 8313251ec2ScaelSpecifies the kernel architecture. This is used solely 8413251ec2Scaelto set the ${karch} selector. 8513251ec2Scael.It Fl l Ar logfile 8613251ec2ScaelSpecify a logfile in which to record mount and unmount events. 8713251ec2ScaelIf 8813251ec2Scael.Ar logfile 8913251ec2Scaelis the string 9013251ec2Scael.Em syslog , 9113251ec2Scaelthe log messages will be sent to the system log daemon by 9213251ec2Scael.Xr syslog 3 . 9313251ec2Scael.It Fl n 94398a5aebSmckusickNormalize hostnames. 95612877e1SbosticThe name referred to by ${rhost} is normalized relative to the 96398a5aebSmckusickhost database before being used. The effect is to translate 97398a5aebSmckusickaliases into ``official'' names. 9813251ec2Scael.It Fl p 9913251ec2ScaelPrint 10013251ec2Scael.Em PID . 101398a5aebSmckusickOutputs the process-id of 10213251ec2Scael.Nm amd 103398a5aebSmckusickto standard output where it can be saved into a file. 10413251ec2Scael.It Fl r 105398a5aebSmckusickRestart existing mounts. 10613251ec2Scael.Nm Amd 107398a5aebSmckusickwill scan the mount file table to determine which filesystems 108398a5aebSmckusickare currently mounted. Whenever one of these would have 109398a5aebSmckusickbeen auto-mounted, 11013251ec2Scael.Nm amd 11113251ec2Scael.Em inherits 112398a5aebSmckusickit. 11313251ec2Scael.It Fl t Ar interval.interval 114398a5aebSmckusickSpecify the 11513251ec2Scael.Ar interval , 11613251ec2Scaelin tenths of a second, between 11713251ec2Scael.Tn NFS/RPC/UDP 11813251ec2Scaelretries. 119398a5aebSmckusickThe default is 0.8 seconds. 120385e5bb3SbosticThe second values alters the retransmit counter. 121398a5aebSmckusickUseful defaults are supplied if either or both 122398a5aebSmckusickvalues are missing. 12313251ec2Scael.It Fl v 12413251ec2ScaelVersion. Displays version and configuration information on standard error. 125*2a44b01aSah.ne 1i 12613251ec2Scael.It Fl w Ar interval 127398a5aebSmckusickSpecify an 12813251ec2Scael.Ar interval , 129398a5aebSmckusickin seconds, between attempts to dismount 130398a5aebSmckusickfilesystems that have exceeded their cached times. 131398a5aebSmckusickThe default is 2 minutes. 13213251ec2Scael.It Fl y Ar domain 13313251ec2ScaelSpecify an alternative 1348a89c22cSpendry.Tn NIS 13513251ec2Scaeldomain from which to fetch the 1368a89c22cSpendry.Tn NIS 13713251ec2Scaelmaps. 138398a5aebSmckusickThe default is the system domain name. 1398a89c22cSpendryThis option is ignored if 1408a89c22cSpendry.Tn NIS 1418a89c22cSpendrysupport is not available. 14213251ec2Scael.It Fl x Ar options 143398a5aebSmckusickSpecify run-time logging options. The options are a comma separated 1448a89c22cSpendrylist chosen from: fatal, error, user, warn, info, map, stats, all. 14513251ec2Scael.It Fl D Ar option 146398a5aebSmckusickSelect from a variety of debug options. Prefixing an 147edc2ab72Smckusickoption with the string 14813251ec2Scael.Em no 149398a5aebSmckusickreverses the effect of that option. Options are cumulative. 150398a5aebSmckusickThe most useful option is 15113251ec2Scael.Ar all . 15213251ec2Scael.El 15313251ec2Scael.Pp 154398a5aebSmckusickSince 15513251ec2Scael.Fl D 156398a5aebSmckusickis only used for debugging other options are not documented here: 15713251ec2Scaelthe current supported set of options is listed by the 15813251ec2Scael.Fl v 15913251ec2Scaeloption 160398a5aebSmckusickand a fuller description is available in the program source. 16113251ec2Scael.Sh FILES 16213251ec2Scael.Bl -tag -width /axx 16313251ec2Scael.It Pa /a 164398a5aebSmckusickdirectory under which filesystems are dynamically mounted 16513251ec2Scael.El 16613251ec2Scael.Sh CAVEATS 167398a5aebSmckusickSome care may be required when creating a mount map. 16813251ec2Scael.Pp 16913251ec2ScaelSymbolic links on an 17013251ec2Scael.Tn NFS 1718a89c22cSpendryfilesystem can be incredibly inefficient. 1720c0d5180ScaelIn most implementations of 1730c0d5180Scael.Tn NFS , 1740c0d5180Scaeltheir interpolations are not cached by 1758a89c22cSpendrythe kernel and each time a symbolic link is 176398a5aebSmckusickencountered during a 17713251ec2Scael.Em lookuppn 17813251ec2Scaeltranslation it costs an 17913251ec2Scael.Tn RPC 18013251ec2Scaelcall to the 18113251ec2Scael.Tn NFS 18213251ec2Scaelserver. 1838a89c22cSpendryA large improvement in real-time 184398a5aebSmckusickperformance could be gained by adding a cache somewhere. 18513251ec2ScaelReplacing 18613251ec2Scael.Xr symlinks 2 18713251ec2Scaelwith a suitable incarnation of the auto-mounter 188398a5aebSmckusickresults in a large real-time speedup, but also causes a large 189398a5aebSmckusicknumber of process context switches. 19013251ec2Scael.Pp 191398a5aebSmckusickA weird imagination is most useful to gain full advantage of all 192398a5aebSmckusickthe features. 19313251ec2Scael.Sh SEE ALSO 19413251ec2Scael.Xr amq 8 , 19513251ec2Scael.Xr hostname 1 , 19613251ec2Scael.Xr mount 8 , 19713251ec2Scael.Xr umount 8 , 19813251ec2Scael.Rs 1998a89c22cSpendry.%T Amd \- The 4.4 BSD Automounter 20013251ec2Scael.Re 20113251ec2Scael.Sh AUTHOR 20213251ec2Scael.An Jan-Simon Pendry 20313251ec2Scael<jsp@doc.ic.ac.uk>, Department of Computing, Imperial College, London, UK. 20413251ec2Scael.Sh HISTORY 2050c0d5180ScaelThe 206ec35a16dSbostic.Nm amd 207ec35a16dSbosticutility first appeared in 4.4BSD. 208