80s toys - Atari. I still have
HomeBlogAbout Me

Automounter 1 3



  1. Automounter 1 3/8
  2. Automounter 1 3 0
  3. Automounter 1 3/4
Automounter 1 3
[ < ][ > ][ << ][ Up ][ >> ][Top][Contents][Index][ ? ]

In this article we will mount the NFS share using autofs. NFS share ‘/dbbackup‘ is exported from Fedora NFS Server (192.168.1.21). We are going to mount this nfs share on CentOS 7 & Ubuntu Linux using autofs. Steps to mount nfs share using Autofs in CentOS 7 Step:1 Install autofs package. The autofs manual page (man 5 autofs) offers a lot of valuable information on the format of the automounter maps. Although commented out (#) by default, this is an example of a simple automounter mapping syntax. The primary configuration file for the automounter is /etc/auto.master, also referred to as the master map which may be changed as described in the Section 8.3.1.

Amd maintains a cache of mounted filesystems. Filesystems aredemand-mounted when they are first referenced, and unmounted aftera period of inactivity. Amd may be used as a replacement for Sun'sautomount(8) program. It contains no proprietary source code andhas been ported to numerous flavors of Unix. See section Supported Platforms.

Amd was designed as the basis for experimenting with filesystemlayout and management. Although Amd has many direct applications itis loaded with additional features which have little practical use. Atsome point the infrequently used components may be removed to streamlinethe production system.

Amd supports the notion of replicated filesystems by evaluatingeach member of a list of possible filesystem locations one by one.Amd checks that each cached mapping remains valid. Should a mapping belost - such as happens when a fileserver goes down - Amd automaticallyselects a replacement should one be available.

1.1 Fundamentals
1.2 Filesystems and Volumes
1.3 Volume Naming
1.4 Volume Binding
1.5 Operational Principles
1.6 Mounting a Volume
1.7 Automatic Unmounting
1.8 Keep-alives
1.9 Non-blocking Operation
[ < ][ > ][ << ][ Up ][ >> ][Top][Contents][Index][ ? ]

1.1 Fundamentals

The fundamental concept behind Amd is the ability to separate thename used to refer to a file from the name used to refer to its physicalstorage location. This allows the same files to be accessed with thesame name regardless of where in the network the name is used. This isvery different from placing `/n/hostname' in front of the pathnamesince that includes location dependent information which may change iffiles are moved to another machine.

By placing the required mappings in a centrally administered database,filesystems can be re-organized without requiring changes toconfiguration files, shell scripts and so on.

[ < ][ > ][ << ][ Up ][ >> ][Top][Contents][Index][ ? ]

1.2 Filesystems and Volumes

Automounter 1 3/8

Amd views the world as a set of fileservers, each containing one ormore filesystems where each filesystem contains one or morevolumes. Here the term volume is used to refer to acoherent set of files such as a user's home directory or a TeXdistribution.

In order to access the contents of a volume, Amd must be told inwhich filesystem the volume resides and which host owns the filesystem.By default the host is assumed to be local and the volume is assumed tobe the entire filesystem. If a filesystem contains more than onevolume, then a sublink is used to refer to the sub-directorywithin the filesystem where the volume can be found.

[ < ][ > ][ << ][ Up ][ >> ][Top][Contents][Index][ ? ]

1.3 Volume Naming

Volume names are defined to be unique across the entire network. Avolume name is the pathname to the volume's root as known by the usersof that volume. Since this name uniquely identifies the volumecontents, all volumes can be named and accessed from each host, subjectto administrative controls.

Volumes may be replicated or duplicated. Replicated volumes containidentical copies of the same data and reside at two or more locations inthe network. Each of the replicated volumes can be usedinterchangeably. Duplicated volumes each have the same name but containdifferent, though functionally identical, data. For example,`/vol/tex' might be the name of a TeX distribution which variedfor each machine architecture.

Amd provides facilities to take advantage of both replicated andduplicated volumes. Configuration options allow a single set ofconfiguration data to be shared across an entire network by takingadvantage of replicated and duplicated volumes.

Amd can take advantage of replacement volumes by mounting them asrequired should an active fileserver become unavailable.

[ < ][ > ][ << ][ Up ][ >> ][Top][Contents][Index][ ? ]

1.4 Volume Binding

Unix implements a namespace of hierarchically mounted filesystems. Twoforms of binding between names and files are provided. A hardlink completes the binding when the name is added to the filesystem. Asoft link delays the binding until the name is accessed. Anautomounter adds a further form in which the binding of name tofilesystem is delayed until the name is accessed.

The target volume, in its general form, is a tuple (host, filesystem,sublink) which can be used to name the physical location of any volumein the network.

When a target is referenced, Amd ignores the sublink element anddetermines whether the required filesystem is already mounted. This isdone by computing the local mount point for the filesystem and checkingfor an existing filesystem mounted at the same place. If such afilesystem already exists then it is assumed to be functionallyidentical to the target filesystem. By default there is a one-to-onemapping between the pair (host, filesystem) and the local mount point sothis assumption is valid.

[ < ][ > ][ << ][ Up ][ >> ][Top][Contents][Index][ ? ]

1.5 Operational Principles

Amd operates by introducing new mount points into the namespace.These are called automount points. The kernel sees theseautomount points as NFS filesystems being served by Amd. Havingattached itself to the namespace, Amd is now able to control theview the rest of the system has of those mount points. RPC calls arereceived from the kernel one at a time.

When a lookup call is received Amd checks whether the name isalready known. If it is not, the required volume is mounted. Asymbolic link pointing to the volume root is then returned. Once thesymbolic link is returned, the kernel will send all other requestsdirect to the mounted filesystem.

If a volume is not yet mounted, Sound studio 4 8 14 download free. Amd consults a configurationmount-map corresponding to the automount point. Amd thenmakes a runtime decision on what and where to mount a filesystem basedon the information obtained from the map.

Amd does not implement all the NFS requests; only those relevantto name binding such as lookup, readlink and readdir.Some other calls are also implemented but most simply return an errorcode; for example mkdir always returns 'read-only filesystem'.

[ < ][ > ][ << ][ Up ][ >> ][Top][Contents][Index][ ? ]

1.6 Mounting a Volume

Each automount point has a corresponding mount map. The mount mapcontains a list of key-value pairs. The key is the name of the volumeto be mounted. The value is a list of locations describing where thefilesystem is stored in the network. In the source for the map thevalue would look like

Amd examines each location in turn. Each location may containselectors which control whether Amd can use that location.For example, the location may be restricted to use by certain hosts.Those locations which cannot be used are ignored.

Amd attempts to mount the filesystem described by each remaininglocation until a mount succeeds or Amd can no longer proceed. Thelatter can occur in three ways:

Automounter 1 3 0

  • If none of the locations could be used, or if all of the locationscaused an error, then the last error is returned.
  • If a location could be used but was being mounted in the background thenAmd marks that mount as being 'in progress' and continues withthe next request; no reply is sent to the kernel.
  • Lastly, one or more of the mounts may have been deferred. A mountis deferred if extra information is required before the mount canproceed. When the information becomes available the mount will takeplace, but in the mean time no reply is sent to the kernel. If themount is deferred, Amd continues to try any remaining locations.
Automounter 1 3

Once a volume has been mounted, Amd establishes a volumemapping which is used to satisfy subsequent requests.

[ < ][ > ][ << ][ Up ][ >> ][Top][Contents][Index][ ? ]

1.7 Automatic Unmounting

To avoid an ever increasing number of filesystem mounts, Amd removesvolume mappings which have not been used recently. A time-to-liveinterval is associated with each mapping and when that expires themapping is removed. When the last reference to a filesystem is removed,that filesystem is unmounted. If the unmount fails, for example thefilesystem is still busy, the mapping is re-instated and itstime-to-live interval is extended. The global default for this graceperiod is controlled by the -w command-line option (see section -w) or the amd.conf parameter `dismount_interval'(see section dismount_interval Parameter). It is also possible to set thisvalue on a per-mount basis (see section opts).

Filesystems can be forcefully timed out using the Amq command.See section Run-time Administration. Note that on new enough systems thatsupport forced unmounts, such as Linux, Amd can try to use theumount2(2) system call to force the unmount, if the regularumount(2) system call failed in a way that indicates that themount point is hung or stale. See section forced_unmounts Parameter.

[ < ][ > ][ << ][ Up ][ >> ][Top][Contents][Index][ ? ]

1.8 Keep-alives

Use of some filesystem types requires the presence of a server onanother machine. If a machine crashes then it is of no concern toprocesses on that machine that the filesystem is unavailable. However,to processes on a remote host using that machine as a fileserver thisevent is important. Macbook pro photoshop illustrator. This situation is most widely recognized when anNFS server crashes and the behavior observed on client machines is thatmore and more processes hang. In order to provide the possibility ofrecovery, Amd implements a keep-alive interval timer for somefilesystem types. Currently only NFS makes use of this service.

The basis of the NFS keep-alive implementation is the observation thatmost sites maintain replicated copies of common system data such asmanual pages, most or all programs, system source code and so on. Ifone of those servers goes down it would be reasonable to mount one ofthe others as a replacement.

Capo 3 3 5 5. The first part of the process is to keep track of which fileservers areup and which are down. Amd does this by sending RPC requests to theservers' NFS NullProc and checking whether a reply is returned.While the server state is uncertain the requests are re-transmitted atthree second intervals and if no reply is received after four attemptsthe server is marked down. If a reply is received the fileserver ismarked up and stays in that state for 30 seconds at which time anotherNFS ping is sent. This interval is configurable and can even beturned off using the ping Cookie 5 2 4 download free. option. See section opts Option.

Automounter 1 3/4

Once a fileserver is marked down, requests continue to be sent every 30seconds in order to determine when the fileserver comes back up. Duringthis time any reference through Amd to the filesystems on thatserver fail with the error 'Operation would block'. If a replacementvolume is available then it will be mounted, otherwise the error isreturned to the user.

Although this action does not protect user files, which are unique onthe network, or processes which do not access files via Amd oralready have open files on the hung filesystem, it can prevent most newprocesses from hanging.

[ < ][ > ][ << ][ Up ][ >> ][Top][Contents][Index][ ? ]

1.9 Non-blocking Operation

Since there is only one instance of Amd for each automount point,and usually only one instance on each machine, it is important that itis always available to service kernel calls. Amd goes to greatlengths to ensure that it does not block in a system call. As a lastresort Amd will fork before it attempts a system call that may blockindefinitely, such as mounting an NFS filesystem. Other tasks such asobtaining filehandle information for an NFS filesystem, are done using apurpose built non-blocking RPC library which is integrated withAmd's task scheduler. This library is also used to implement NFSkeep-alives (see section Keep-alives).

Whenever a mount is deferred or backgrounded, Amd must wait for itto complete before replying to the kernel. However, this would causeAmd to block waiting for a reply to be constructed. Rather than dothis, Amd simply drops the call under the assumption that thekernel RPC mechanism will automatically retry the request.

[ << ][ >> ][Top][Contents][Index][ ? ]

This document was generated by Erez Zadok on November, 27 2006 using texi2html 1.76.


Description

SharePoints AutoMounter is an application that makes it easy to add and delete auto mounts in the /Network directory. Mac OS X provides the ability to have network volumes automatically mounted at startup. SharePoints AutoMounter brings this functionality to everyone.

Donation-ware

If you like SharePoints AutoMounter, please consider making a donation by clicking on the PayPal Donate button or the Amazon Donate button below. Any donations that are received will be used to purchase a new PowerMac which will replace my aging Beige G3 and aid in further software development.

Download and Operational Instructions

To add an auto mount using Share Points AutoMounter, follow these 3 steps.
  1. Download SharePoints AutoMounter (Current version 1.0.0).
  2. Launch SharePoints AutoMounter and use it to add or delete auto mounts. (Currently, only mount points that have guest access can be mounted automatically.)
  3. Restart your computer. (The ability to have the automount appear without a restart is a planned feature for the future.)

Installation

To Install SharePoints AutoMounter, just copy it to any convenient location on your harddrive. I would suggest placing it in your Utilities folder.

Enjoy and you use this at your own risk.

Mailing List

You can join the SharePoints AutoMounter Announce mailing list if you would like to be notified by email when a new version of SharePoints AutoMounter is available.

Version History

1.0.0
  • First Public Release

If you would like to contact me, email hornware@hornware.com.

Copyright © 2003 Michael Horn All rights reserved.




Automounter 1 3
Back to posts
This post has no comments - be the first one!

UNDER MAINTENANCE