The showmount Command Mounting Remote Filesystems
18.2.2 Mounting Remote Filesystems
An exported filesystem cannot be used before it is mounted on the client side; mounting an exported system means to mount and later access a remote filesystem through the network. That is the whole idea of NFS. Technically, mounting a remote filesystem is quite different from mounting a local one; from an administrative standpoint the differences are minor, but from the user standpoint there is no difference at all.18.2.2.1 The showmount Command
Before we start mounting a remote filesystem, we must decide which NFS server to use, and which filesystems are to be exported and available from the server. Any necessary information about the filesystems to be exported can be obtained with the showmount command and a reference to the corresponding server. For example: showmount −e patsy patsy is the NFS server and it belongs to the same domain export list for patsy: patsy hcprophet,indigo1,indigo2,mvaxgr,rs01ch,rs02ch,rs03ch usrshareman everyone etc gatorchem home gatorchem The export list shows the NFS directories filesystems exported by the server patsy, as well as their properties. In this case the list matches the previously presented export configuration file etcexports. Regardless of what the list looks like, it is up to us to decide how to mount the available remote filesystem. As in the case of local filesystems, there is no a magic formula for this; the decision depends on many other factors. 432 Mounting a remote filesystem means attaching it to the clients UNIX overall hierarchical directory structure. The mounted remote filesystems are integrated into an overall directory tree. The same mount command that mounts local filesystems is used for this purpose. The differences are in the way the remote filesystems are identified, and some specific filesystem properties. We have already described the mount command in great detail. Here, only the issues related to remote filesystems will be discussed. The format of the mount command applicable to remote filesystems is: mount server−name:remote−directory local−directory [−o options] where server−name Identifies an NFS server remote−directory Identifies all or part of a directory exported by that server, and must be an absolute pathname starting with a leading local−directory Identifies the mount−point, the clients directory where the remote−directory will be attached to the clients filesystem. It must be an absolute pathname, local−directory must be created before mount is executed, and it is very common to use server−name for the last level name in the local−directory options One or more options applicable for NFS though some of them are only applicable to NFS such as: bgfg If the first attempt fails, retry in background or foreground retry=n The number of times to retry timeo=n Set the time−out to n tenths of second intr Allows keyboard interrupt softhard Return an error if the server does not respond or continue to retry until the server responds The umount command is used to dismount a mounted remote filesystem. There is no difference in using the umount command for locally or remotely mounted filesystems. Generally speaking, remote filesystems are treated just like any local filesystem. The differences are in the type of the filesystem in this case it is the nfs type, and in some options specific to the filesystem type. Consequently, NFS filesystems could, and should, be mounted automatically during the system startup. This means the necessary information for mounting remote filesystems should be appended in the clients filesystem configuration file usually the file etcfstab, or etcvfstab. An example follows: cat etcfstab | grep nfs ..... hcprophet:hcprophet hcprophet nfs rw,hard,bg,intr 0 0 patsy:patsy patsy nfs rw,hard,bg,intr 0 0 rs01ch:home2gigrs rs nfs rw,hard,bg,intr 0 0 mvaxgr:exportDUB1 mvaxgrdisku2 nfs rw,soft,bg,intr 0 0 mvaxgr:exportDUB2 mvaxgrdisku3 nfs rw,soft,bg,intr 0 0 Please note that only NFS−related entries are presented. The very same names in different columns do have different meanings; for example, the first column patsy:patsy identifies the NFS server patsy and the exported directory patsy, while the second column patsy identifies 433 A corresponding entry in the filesystem status file etcmtab or etcmnttab is automatically created for each successfully mounted remote filesystem, just as it would be for any mounted local filesystem.18.3 Automounter
The automounter, better known as the automount, is a tool that automatically mounts NFS filesystems when they are referenced, and dismounts them when they are no longer needed. Maintaining remote filesystems that are permanently mounted also keeps processor resources permanently busy, with an unavoidable impact on the systems overall performance. It is a good idea to mount a remote filesystem only when its data are needed; otherwise a remote filesystem remains dismounted and the required processor resources are released for other tasks. The price we must pay for this benefit is additional automount−related administration. Using data for the first time takes slightly longer because the corresponding remote filesystem must be automounted. Once mounted, the remote filesystem remains mounted as long as it is used; after a certain time of inactivity the usual time−out is a few minutes the remote filesystem is automatically dismounted. Another benefit of using the automounter is the fact that there is no longer any need to keep filesystem configuration data the file etcfstab or etcvfstab up to date by hand. The information required for a mounting, including the NFS server, filesystem pathnames on the server, local mount points and mount options, are now part of the automount configuration data, which are usually maintained as NIS maps. In that way, the NIS management can also be implemented on the NFS configuration data, so a single NIS map can be handled and spread through the network to all NFS clients. The automounter was, and is, an integral part of the majority of UNIX flavors. A public domain version called amd is also available; it is kernel independent and can be used on almost any UNIX system. There are many motivations for using the automounter: The filesystem configuration data etcfstab and etcvfstab files on every host becomes much less complex. • The automount maps may be maintained using NIS, thereby streamlining the administration of mount tables for all hosts in the network the same way NIS streamlines other information. • The exposure to the risk of hanging a process when an NFS server crashes is greatly reduced; the automounter dismounts all filesystems that are not in use, removing dependencies on file servers that are not currently referenced by the client. • The automounter can extend the basic NFS mount protocol to find the nearest server for replicated, read−only filesystems; in this case that server will handle the mount requests, reducing the load on the more heavily used network hardware. • An automounter is a daemon usually named automountd that automatically and transparently mounts NFS filesystems as needed. It monitors attempts to access directories that are associated with an automount map, as well as all subdirectories and files beneath these directories. For example, on Solaris 2.x platform: 434Parts
» Unix Administration. 7485KB Mar 29 2010 05:04:17 AM
» UNIX Operating System UNIX — Introductory Notes
» Berkeley Standard Distribution — BSD UNIX System V or ATT UNIX
» System Administrators Job UNIX System and Network Administration
» Computing Policies UNIX System and Network Administration
» Legal Acts Administration Guidelines
» Code of Ethics Administration Guidelines
» USENIX System Administrators Guild — SAGE
» In This Book UNIX System and Network Administration
» Introduction The Unix Model — Selected Topics
» Access Classes File ProtectionFile Access
» Default File Mode File ProtectionFile Access
» Plain Regular File Socket Named Pipe
» Special File Names Special File Creation
» Process Types Process Attributes
» Process Life Cycles Processes
» System V ATT Flavored ps Command
» Destroying Processes The UNIX kill command will eliminate a process entirely:
» Becoming a Superuser Communicating with Other Users
» The man Command UNIX Online Documentation
» The uptime Command The uptime command displays:
» Personal Documentation UNIX Administration Starters
» Shell Script Execution UNIX Shell Scripts
» Shell Variables UNIX Shell Scripts
» Double Command−Line Scanning
» Introductory Notes System Startup and Shutdown
» The Bootstrap Program System Startup
» The Kernel Execution System Startup
» System States System Startup
» The Outlook of a Startup Procedure
» Initialization Scripts System Startup
» The BSD rc Scripts BSD Initialization Sequence
» BSD−Like Initialization System V Initialization
» An Example Shutdown Procedures
» Introduction to the UNIX Filesystem
» System V Filesystem Directory Organization
» Mounting a Filesystem home, users
» Dismounting a Filesystem home, users
» Automatic Filesystem Mounting Removable Media Management
» BSD Filesystem Configuration File
» Filesystem Types A Few Other Filesystem Issues
» Swap Space — Paging and Swapping
» Loopback Virtual Filesystem A Few Other Filesystem Issues
» Display Filesystem Statistics: The df Command
» Checking Filesystems: The fsck Command
» Introduction UNIX Filesystem Layout
» Disk Partitions Physical Filesystem Layout
» Filesystem Structures Physical Filesystem Layout
» The mkfs Command Filesystem Creation
» File Identification and Allocation
» File Storage vs. File Transfer
» Reserved Free Space Filesystem Performance Issues
» Logical Volume Manager — AIX Flavor
» Logical Volume Manager — Solaris Flavor
» Redundant Array of Inexpensive Disks RAID
» The Volume Snapshot Snapshot
» The Filesystem Snapshot Snapshot
» Virtual UNIX Filesystem Logical Filesystem Layout
» Disk Space Upgrade UNIX Filesystem Layout
» User Database — File etcpasswd
» Initialization Template Files UNIX Login Initialization
» User Login Initialization Files
» Systemwide Login Initialization Files
» Restricted User Accounts Users and Secondary Groups
» Assigning User Passwords Standard UNIX Users and Groups
» Managing Disk Usage by Users
» System V Accounting Accounting
» AIX−Flavored Accounting Accounting
» Physical Security Passwords UNIX Lines of Defense
» File Permissions UNIX Lines of Defense
» Backups Password Encryption UNIX Lines of Defense
» Setting Password Restrictions UNIX Lines of Defense
» The Wheel Group Secure Terminals — Other Approaches
» History of the Root Account Tracking User Activities
» The syslogd Daemon The Concept of System Logging
» The Configuration File etcsyslog.conf
» Linux Logging Enhancements The logger Command
» Testing System Logging System Logging Configuration
» The last Command Limiting the Growth of Log Files
» BSD Printing Subsystem UNIX Printing Subsystem
» The lp, lpstat, and cancel Commands
» The etcprintcap File BSD Printer Configuration and the Printer Capability Database
» Filters BSD Printer Configuration and the Printer Capability Database
» The Printer Database Directory Hierarchy on System V
» Setting a Remote Printer on HP−UX
» BSD and AIX Cross−Printing Solaris and BSD Cross−Printing
» Third−Party Printer Spooling Systems
» The tput Command The tset, tput, and stty Commands
» The stty Command The tset, tput, and stty Commands
» The tar Command Tape−Related Commands
» The cpio Command Tape−Related Commands
» The dd Command Tape−Related Commands
» The mt Command Magnetic Tape Devices and Special Device Files
» The SVR3 and SVR4 backup Commands
» The fbackup Command Backup and Dump Commands
» The dumpufsdump Command Backup and Dump Commands
» Interactive Restore The restore Commands
» The frecover Command Restoring Files from a Backup
» Tape Control UNIX Backup and Restore
» The NTP Daemon Network Time Distribution
» The crontab Files Network Time Distribution
» The crontab Command Network Time Distribution
» Linux Approach Network Time Distribution
» Programs Scheduled for a Specific Time
» UNIX and Networking Network Fundamentals
» TCPIP and the Internet ISO OSI Reference Model
» TCPIP Protocol Architecture Computer Networks
» Internet Protocol IP Internet Layer and IP Protocol
» Network Access Layer Transport Layer and TCP and UDP Protocols
» Application Layer TCPIP Layers and Protocols
» IP Address Classes Data Delivery
» Dynamic Routing Internet Routing
» Protocols, Ports, and Sockets
» UNIX Database Files Multiplexing
» The arp Command Address Resolution ARP
» The portmapper Daemon The etcrpc File
» The ifconfig Command Configuring the Network Interface
» The netstat Command Configuring the Network Interface
» The inetd Daemon Super Internet Server
» Further Improvements and Development
» Host Names and Addresses Domain Name Service DNS
» The Local Host Table — etchosts
» Handling the NIC Host Table — A Journey into the Past
» Other Resolver Parameters BIND Configuration
» Name Servers UNIX Name Service — BIND
» The Configuration File etcnamed.boot
» The named.local File The named.cache file
» Subdomains and Parenting BIND Version 8.X.X
» The nslookup Interactive Mode
» A Few Examples of nslookup Usage
» Purpose and Concepts Network Information Service NIS
» To Create an NIS Client NIS Domain Name
» The etcnetgroup File DatabasesNIS Maps
» Security Issues NIS Management
» The showmount Command Mounting Remote Filesystems
» An Example The Automount Maps
» The rlogin Command The rcp Command
» The HOME.rhosts File Using UNIX r−Commands — An Example
» SSH Configuration Secure Shell SSH
» Root Access SSH Installation and User Access Setup
» SSH — Version 2 Secure Shell SSH
» Simple Mail Transport Protocol SMTP
» Rewriting an E−mail Address Pattern Matching
» Address Transformation The Parsing of E−mail Addresses
» Testing Rewrite Rules The sendmail −bt Command
» The Debugging Level Checking the Mail Queue
» Mail Subcommands The Mail Program and .mailrc File
» POP Transactions Post Office Protocol POP
» Internet Message Access Protocol IMAP
» Finger Common UNIX Network Applications
» The ping Command Host Connectivity
» The traceroute Command Host Connectivity
» The X Administration Philosophy
» Window Managers An Introduction to the X Window System
» xdm Configuration Files The X Display Managers
» Vendor−Specific X Flavors — a Configuration Example
» XDMCP Queries The Xaccess File
» Other Access Control Mechanisms
» Components of the xdm−Based User X Environment
» Other Startup Methods The User X Environment
» A Permanent X11 Installation
» Introduction to Kernel Reconfiguration
» Kernel Configuration Database Kernel Reconfiguration
» The config Command BSD−Like Kernel Configuration Approach
» HP−UX 10.x Kernel Configuration
» UNIX and Modems Introduction to Modems
» Terminal Lines and Modem Control
» C−Kermit Third−Party Communication Software
» UUCP Versions UUCP Chat−Transfer Session
» The UUCP Daemons UUCP Commands, Daemons, and Related Issues
» The UUCP Spool Directories and Files
» Additional Security in BNU UUCP
» Additional Security in Version 2 UUCP
» Intranet vs. Internet Introduction to Intranet
» Intranet Design Approach Introduction to Intranet
» Life Cycle of a Virus Virus Types
» The Viruswall Implementation Viruswalls
» Application Proxies SOCKS Proxies
» Web Services Intranet Front−End Services
» Other External Services Intranet Front−End Services
» Network Infrastructure and Desktops
» Dynamic Host Configuration Protocol DHCP
» UNIX and Not−UNIX Platform Integration
» HP−UX Installation UNIX Installation Procedures
» Linux Installation UNIX Installation Procedures
» Solaris Patch Installation HP−UX Patch Installation
» Solaris and Lost Root Password HP−UX and Lost Root Password
» Solaris Procedure to Create an Alternate Boot Partition
» Solaris Recovery of the Failed Mirrored Boot Disk
Show more