Softpanorama
(slightly skeptical) Open Source Software Educational Society

May the source be with you, but remember the KISS principle ;-)

Google   


Mounting NFS Resources

See also Mount unmount dfshares

NFS resources that have been shared by an NFS server can be mounted by an NFS client using the mount(1M) command and unmounted using the umount(1M) command. In addition, any NFS resources identified in the /etc/vfstab file are automatically mounted at system boot or when the mountall(1M) command is used. Likewise, the NFS resources listed in the /etc/mnttab file are unmounted by using the umountall(1M) command.

The dfshares command can be used to list shared resources on either the local or a remote system. If the hostname (or IP address) of a remote system is specified as a command-line argument, the resources shared on that system are listed.

The mount Command

The mount command is used to mount NFS resources like any other standard Solaris file system so that NFS clients can mount and access them.

For NFS, the hostname (or IP address) and pathname of the currently shared directory are specified as a command-line argument followed by a mount point.

The hostnames and pathnames are separated by a colon (:). For additional information, see the mount_nfs(1M). 

-F fstype Specifies the file system type

-m Mounts the file system without creating an /etc/mnttab entry

-o Specifies NFS-specific options

-O Overlays an existing mount point

-r Mounts the file system read-only

The following listing shows using the mount command to mount the /export/home file from the Solaris system on the /sun_home mount point. The resource is soft mounted (1,000 attempts) with read-only access:

# mount -F nfs -o soft,retry=1000,ro solaris:/export/home /sun_home

If the mount command is used without any command-line arguments, all currently mounted file systems (standard Solaris file systems and NFS resources) are displayed.

The umount Command

The umount command is used to unmount local file systems and remote NFS resources so that local users can no longer access them. For NFS, one or more system:pathname pairs (or file system mount points) that are currently mounted are specified as command-line arguments.

Two other command-line arguments are supported. The first is the -V command-line argument, which is used to display the command line used to actually perform the unmount (used to verify the command line). The second is the -a command-line argument, which is used to perform parallel unmount operations if possible.

The following listing shows the umount command unmounting the /export/home file system being shared from the Solaris host:

# umount solaris:/export/home

The dfshares Command

The dfshares(1M) command is used to list shared resources on either the local or a remote system. If the hostname (or IP address) of a remote system is specified as a command-line argument, the resources shared on that system are listed.

In addition, two other command-line arguments are supported. The -F nfs command-line argument is used to specify the type of file system. If not specified, the default file system type listed in the /etc/dfs/fstypes file (NFS) is assumed. If the -h command-line argument is specified, the header describing the columns of the resource listing is not displayed.

In addition, information on locally shared resources can be obtained from the /etc/dfs/sharetab file. This file is updated by the share, shareall, unshare, and unshareall commands to reflect the currently shared resources.

 

Copyright © 1996-2008 by Dr. Nikolai Bezroukov. www.softpanorama.org was created as a service to the UN Sustainable Development Networking Programme (SDNP) in the author free time. Submit comments This document is an industrial compilation designed and created exclusively for educational use and is placed under the copyright of the Open Content License(OPL). Original materials copyright belong to respective owners. Quotes are made for educational purposes only in compliance with the fair use doctrine.

Standard disclaimer: The statements, views and opinions presented on this web page are those of the author and are not endorsed by, nor do they necessarily reflect, the opinions of the author present and former employers, SDNP or any other organization the author may be associated with. We do not warrant the correctness of the information provided or its fitness for any purpose.

Last modified: February 28, 2008