<chapter id="rfsadmin-8"><title>Network File System Administration (Tasks)</title><highlights><para>This chapter provides information about how to perform such NFS administration
tasks as setting up NFS services, adding new file systems to share, and mounting
file systems. The chapter also covers the use of the Secure NFS system and
the use of WebNFS functionality. The last part of the chapter includes troubleshooting
procedures and a list of some of the NFS error messages and their meanings.</para><itemizedlist><listitem><para><olink targetptr="rfsadmin-56" remap="internal">Automatic File-System Sharing</olink></para>
</listitem><listitem><para><olink targetptr="rfsadmin-61" remap="internal">Mounting File Systems</olink></para>
</listitem><listitem><para><olink targetptr="rfsadmin-68" remap="internal">Setting Up NFS Services</olink></para>
</listitem><listitem><para><olink targetptr="rfsadmin-96" remap="internal">Administering the Secure NFS
System</olink></para>
</listitem><listitem><para><olink targetptr="rfsadmin-110" remap="internal">WebNFS Administration Tasks</olink></para>
</listitem><listitem><para><olink targetptr="rfsadmin-127" remap="internal">Task Overview for Autofs Administration</olink></para>
</listitem><listitem><para><olink targetptr="rfsadmin-214" remap="internal">Strategies for NFS Troubleshooting</olink></para>
</listitem><listitem><para><olink targetptr="rfsadmin-215" remap="internal">NFS Troubleshooting Procedures</olink></para>
</listitem><listitem><para><olink targetptr="rfsadmin-255" remap="internal">NFS Error Messages</olink></para>
</listitem>
</itemizedlist><itemizedlist><para>Your responsibilities as an NFS administrator depend on your site's
requirements and the role of your computer on the network. You might be responsible
for all the computers on your local network, in which instance you might be
responsible for determining these configuration items:</para><listitem><para>Which computers should be dedicated servers</para>
</listitem><listitem><para>Which computers should act as both servers and clients</para>
</listitem><listitem><para>Which computers should be clients only</para>
</listitem>
</itemizedlist><itemizedlist><para>Maintaining a server after it has been set up involves the following
tasks:</para><listitem><para>Sharing and unsharing file systems as necessary</para>
</listitem><listitem><para>Modifying administrative files to update the lists of file
systems your computer shares or mounts automatically</para>
</listitem><listitem><para>Checking the status of the network</para>
</listitem><listitem><para>Diagnosing and fixing NFS-related problems as they arise</para>
</listitem><listitem><para>Setting up maps for autofs</para>
</listitem>
</itemizedlist><para>Remember, a computer can be both a server and a client. So, a computer
can be used to share local file systems with remote computers and to mount
remote file systems.</para><note><para>If your system has zones enabled and you want to use this feature
in a non-global zone, see <olink targetdoc="sysadrm" remap="external"><citetitle remap="book">System Administration Guide: Solaris Containers-Resource Management and Solaris Zones</citetitle></olink> for
more information.</para>
</note>
</highlights><sect1 id="rfsadmin-56"><title>Automatic File-System Sharing</title><itemizedlist><para>Servers provide access to their file systems by sharing the file
systems over the NFS environment. Note the following:</para><listitem><para>Previously, you would specify which file systems are to be
shared with the <command>share</command> command or with the <filename>/etc/dfs/dfstab</filename> file.</para><para>Entries in the <filename>/etc/dfs/dfstab</filename> file
are shared automatically whenever you start NFS server operation. You should
set up automatic sharing if you need to share the same set of file systems
on a regular basis. For example, if your computer is a server that supports
home directories, you need to make the home directories available at all times.
Most file-system sharing should be done automatically. The only time that
manual sharing should occur is during testing or troubleshooting.</para><para>The <filename>dfstab</filename> file lists all the file systems that your server shares
with its clients. This file also controls which clients can mount a file system.
You can modify <filename>dfstab</filename> to add or delete a file system
or change the way sharing occurs. Just edit the file with any text editor
that is supported (such as <command>vi</command>). The next time that the
computer enters run level 3, the system reads the updated <filename>dfstab</filename> to
determine which file systems should be shared automatically.</para><para>Each line in the <filename>dfstab</filename> file consists of
a <command>share</command> command, the same command that you type at the
command-line prompt to share the file system. The <command>share</command> command
is located in <filename>/usr/sbin</filename>.</para>
</listitem><listitem><para>Starting in the Solaris Express, Developer Edition 2/07 release,
you can use the <command>sharemgr</command> and <command>sharectl</command> utilities
to manage file systems and file-sharing protocols. For more information, see
the following:</para><itemizedlist><listitem><para><citerefentry><refentrytitle>sharemgr</refentrytitle><manvolnum>1M</manvolnum></citerefentry> man page and <olink targetptr="gcrvu" remap="internal">sharemgr
Command</olink></para>
</listitem><listitem><para><citerefentry><refentrytitle>sharectl</refentrytitle><manvolnum>1M</manvolnum></citerefentry> man page and <olink targetptr="gecpc" remap="internal">sharectl
Command</olink></para>
</listitem>
</itemizedlist><note><para>When you use <command>sharemgr</command>, you do not need to use
the <command>share</command>, <command>shareall</command>,  and <command>unshare</command> commands.
Also, you do not need to edit the <filename>/etc/dfs/dfstab</filename> file.</para>
</note>
</listitem>
</itemizedlist><table frame="all" pgwide="1" id="rfsadmin-tbl-166"><title>File-System Sharing
Task Map</title><tgroup cols="3" colsep="1" rowsep="1"><colspec colname="colspec0" colwidth="110*"/><colspec colname="col2" colwidth="167*"/><colspec colname="colspec1" colwidth="119*"/><thead><row><entry><para>Task</para>
</entry><entry><para>Description</para>
</entry><entry><para>For Instructions</para>
</entry>
</row>
</thead><tbody><row><entry><para>Establish automatic file-system sharing</para>
</entry><entry><para>Steps to configure a server so that file systems are automatically shared
when the server is rebooted</para><note><para>The procedure shows you how to use the <command>sharemgr</command> command. The example that follows the procedure uses the <command>share</command> and <command>shareall</command> commands to complete the same task.</para>
</note>
</entry><entry><para><olink targetptr="rfsadmin-57" remap="internal">How to Set Up Automatic File-System Sharing</olink></para>
</entry>
</row><row><entry><para>Enable WebNFS</para>
</entry><entry><para>Steps to configure a server so that users can access files by using
WebNFS</para><note><para>The
procedure shows you how to use the <command>sharemgr</command> command. The
example that follows the procedure uses the <command>share</command> and <command>shareall</command> commands to complete the same task.</para>
</note>
</entry><entry><para><olink targetptr="rfsadmin-112" remap="internal">How to Enable WebNFS Access</olink></para>
</entry>
</row><row><entry><para>Enable NFS server logging</para>
</entry><entry><para>Steps to configure a server so that NFS logging is run on selected file
systems</para><note><para>The
procedure shows you how to use the <command>sharemgr</command> command. The
example that follows the procedure uses the <command>share</command> and <command>shareall</command> commands to complete the same task.</para>
</note>
</entry><entry><para><olink targetptr="rfsadmin-101" remap="internal">How to Enable NFS Server Logging</olink></para>
</entry>
</row>
</tbody>
</tgroup>
</table><task id="rfsadmin-57"><title>How to Set Up Automatic File-System Sharing</title><tasksummary><itemizedlist><para>Starting with the Solaris Express, Developer Edition 2/07 release, you
can do the following:</para><listitem><para>Use the <command>sharemgr</command> utility to share file
systems, set property values for the shared file systems, and perform related
tasks. For information about <command>sharemgr</command>, including descriptions
of subcommands and properties, see the <citerefentry><refentrytitle>sharemgr</refentrytitle><manvolnum>1M</manvolnum></citerefentry> man page and <olink targetptr="gcrvu" remap="internal">sharemgr
Command</olink>.</para>
</listitem><listitem><para>Use the <command>sharectl</command> utility to configure file-sharing
protocols, such as NFS. See the <citerefentry><refentrytitle>sharectl</refentrytitle><manvolnum>1M</manvolnum></citerefentry> man page and <olink targetptr="gecpc" remap="internal">sharectl
Command</olink>.</para>
</listitem>
</itemizedlist><note><para>When you use <command>sharemgr</command>, you do not need to use
the <command>share</command>, <command>shareall</command>,  and <command>unshare</command> commands.
Also, you do not need to edit the <filename>/etc/dfs/dfstab</filename> file.</para>
</note><para>The following procedure uses the <command>sharemgr</command> utility.
If you prefer to use the <command>share</command> and <command>shareall</command> utilities,
see the example that follows this procedure. Note that whether you use <command>sharemgr</command> or <command>share</command> and <command>shareall</command>, you
must set up your autofs maps so that clients can access the file systems that
you have shared on the server.</para>
</tasksummary><procedure>&rolestepA;<step id="rfsadmin-step-59"><para>Use the <command>sharemgr</command> utility
to assign property values to the file system to be shared.</para><substeps><step><para>Use the following syntax to create a share group with the desired
property value.</para><screen># sharemgr create [-P protocol] [-p property=value] share-group</screen>
</step><step><para>Use the following syntax to add shares to the share group.</para><screen remap="wide"># sharemgr add-share -s share-path [-t] [-d description] [-r resource-name] share-group</screen>
</step><step performance="optional"><para>If necessary, use the following syntax
to set more property values to an existing share group.</para><screen># sharemgr set [-P protocol] [-S security-mode] [-p property=value] share-group</screen><note><para>You do not need to repeat this command-line syntax for each additional
property value. You can use the <option>p</option> option multiple times to
define multiple properties on the same command line.</para>
</note>
</step>
</substeps>
</step><step id="rfsadmin-step-1209"><para>Use the <command>sharemgr</command> utility
to verify what you have created by using the     following syntax.</para><screen># sharemgr show [-v] [-p] [-x] [share-group...]</screen>
</step>
</procedure><example id="gecqk"><title>How to Use the <command>share</command> and <command>shareall</command> Commands
to Set Up Automatic File-System Sharing</title><orderedlist><listitem><para>Become superuser or assume an equivalent role.</para><para>Roles
contain authorizations and privileged commands. For more information about
roles, see <olink targetdoc="sysadv6" targetptr="rbactask-15" remap="external"><citetitle remap="section">Configuring RBAC (Task Map)</citetitle> in <citetitle remap="book">System Administration Guide: Security Services</citetitle></olink>.
To configure a role with the Primary Administrator    profile, see <olink targetdoc="sysadv1" targetptr="smcover-1" remap="external">Chapter 2, <citetitle remap="chapter">Working With the Solaris Management Console (Tasks),</citetitle> in <citetitle remap="book">System Administration Guide: Basic Administration</citetitle></olink>.</para>
</listitem><listitem><para>Add entries for each file system to be shared.</para><para>Edit <filename>/etc/dfs/dfstab</filename>. Add one entry to the
file for every file system that you want to be automatically shared. Each
entry must be on a line by itself in the file and use this syntax:</para><screen>share [-F nfs] [-o specific-options] [-d description] pathname</screen><para>See the <olink targetdoc="refman4" targetptr="dfstab-4" remap="external"><citerefentry><refentrytitle>dfstab</refentrytitle><manvolnum>4</manvolnum></citerefentry></olink> man
page for a description of <filename>/etc/dfs/dfstab</filename> and the <olink targetdoc="refman1m" targetptr="share-nfs-1m" remap="external"><citerefentry><refentrytitle>share_nfs</refentrytitle><manvolnum>1M</manvolnum></citerefentry></olink> man page
for a complete list of options.</para>
</listitem><listitem><para>Share the file system.</para><para>After the entry is in <filename>/etc/dfs/dfstab</filename>, you
can share the file system by either rebooting the system or by using the <command>shareall</command> command.</para><screen># <userinput>shareall</userinput></screen>
</listitem><listitem><para>Verify that the information is correct.</para><para>Run the <command>share</command> command to check that the correct options are listed:</para><screen># <userinput>share</userinput>
-        /export/share/man   ro   ""
-        /usr/src     rw=eng   ""
-        /export/ftp    ro,public  ""</screen>
</listitem>
</orderedlist>
</example><taskrelated role="see-also"><para>Whether you use <command>sharemgr</command> or <command>share</command> and <command>shareall</command>, the next step is to set up your autofs maps so that clients
can access the file systems that you have shared on the server. See <olink targetptr="rfsadmin-127" remap="internal">Task Overview for Autofs Administration</olink>.</para>
</taskrelated>
</task><task id="rfsadmin-112"><title>How to Enable WebNFS Access</title><tasksummary><itemizedlist><para>Note the following:</para><listitem><para>Starting with the Solaris 2.6 release, by default all file
systems that are available for NFS mounting are automatically available for
WebNFS access. The only condition that requires the use of this procedure
is one of the following:</para><itemizedlist><listitem><para>To allow NFS mounting on a server that does not currently
allow NFS mounting</para>
</listitem><listitem><para>To reset the public file handle to shorten NFS URLs by using
the <option role="nodash">public</option> option with the <command>share</command> command</para>
</listitem><listitem><para>To force a specific HTML file to be loaded by using the <option role="nodash">index</option> option with the <command>share</command> command</para>
</listitem>
</itemizedlist>
</listitem><listitem><para>Starting with the Solaris Express, Developer Edition 2/07
release, you can do the following:</para><itemizedlist><listitem><para>Use the <command>sharemgr</command> utility to share file
systems, set property values for the shared file systems, and perform related
tasks. For information about <command>sharemgr</command>, including descriptions
of subcommands and properties, see the <citerefentry><refentrytitle>sharemgr</refentrytitle><manvolnum>1M</manvolnum></citerefentry> man page and <olink targetptr="gcrvu" remap="internal">sharemgr
Command</olink>.</para>
</listitem><listitem><para>Use the <command>sharectl</command> utility to configure file-sharing
protocols, such as NFS. See the <citerefentry><refentrytitle>sharectl</refentrytitle><manvolnum>1M</manvolnum></citerefentry> man page and <olink targetptr="gecpc" remap="internal">sharectl
Command</olink>.</para>
</listitem>
</itemizedlist><note><para>When you use <command>sharemgr</command>, you do not need to use
the <command>share</command>, <command>shareall</command>,  and <command>unshare</command> commands.
Also, you do not need to edit the <filename>/etc/dfs/dfstab</filename> file.</para>
</note>
</listitem>
</itemizedlist><para>See <olink targetptr="rfsadmin-111" remap="internal">Planning for WebNFS Access</olink> for
a list of issues to consider before starting the WebNFS service.</para><para>The following procedure uses the <command>sharemgr</command> utility.
If you prefer to use the <command>share</command> and <command>shareall</command> utilities,
see the example that follows this procedure.</para>
</tasksummary><procedure>&rolestepA;<step id="rfsadmin-step-114"><para>Use the <command>sharemgr</command> utility
to assign property values to the file system to be shared by the WebNFS service.</para><substeps><step><para>Use the following syntax to create a share group with the desired
property value.</para><screen># sharemgr create [-P protocol] [-p property=value] share-group</screen><itemizedlist><para>For example:</para><listitem><para>To create a share group that forces a specific HTML file to
be loaded, you can use the index property:</para><screen># sharemgr create [-P protocol] -p index=[file-path.html] share-group</screen>
</listitem><listitem><para>To create a share group that moves the location of the public
file handle from <filename>root</filename> (<filename>/</filename>) to an
exported directory for WebNFS-enabled browsers and clients, you can use the
following:</para><screen># sharemgr set -P nfs -p public=true -s share-path share-group</screen><para>Note that the <literal>public</literal> property moves the location
of a public file handle from <filename>root</filename> (<filename>/</filename>)
to an exported directory for WebNFS-enabled browsers and clients. However,
only one file system (or share) on each server can use this property. Because
a share-group can consist of more than one file system, this property is not
accepted by a share group. For more information, see the <olink targetdoc="group-refman" targetptr="share-nfs-1m" remap="external"><citerefentry><refentrytitle>share_nfs</refentrytitle><manvolnum>1M</manvolnum></citerefentry></olink> man page.</para>
</listitem>
</itemizedlist>
</step><step><para>Use the following syntax to add shares to the share group.</para><screen remap="wide"># sharemgr add-share -s share-path [-t] [-d description] [-r resource-name] share-group</screen>
</step><step performance="optional"><para>If necessary, use the following syntax
to set more property values to an existing share group.</para><screen># sharemgr set [-P protocol] [-S security-mode] [-p property=value] share-group</screen><note><para>You do not need to repeat this command-line syntax for each additional
property value. You can use the <option>p</option> option multiple times to
define multiple properties on the same command line.</para>
</note>
</step>
</substeps>
</step><step id="rfsadmin-step-116"><para>Use the <command>sharemgr</command> utility
to verify what you have created.</para><screen># sharemgr show [-v] [-p] [-x] [share-group...]</screen>
</step>
</procedure><example id="gedgg"><title>How to Use the <command>share</command> and <command>shareall</command> Commands
to Enable WebNFS Access</title><orderedlist><listitem><para>Become superuser or assume an equivalent role.</para><para>Roles
contain authorizations and privileged commands. For more information about
roles, see <olink targetdoc="sysadv6" targetptr="rbactask-15" remap="external"><citetitle remap="section">Configuring RBAC (Task Map)</citetitle> in <citetitle remap="book">System Administration Guide: Security Services</citetitle></olink>.
To configure a role with the Primary Administrator    profile, see <olink targetdoc="sysadv1" targetptr="smcover-1" remap="external">Chapter 2, <citetitle remap="chapter">Working With the Solaris Management Console (Tasks),</citetitle> in <citetitle remap="book">System Administration Guide: Basic Administration</citetitle></olink>.</para>
</listitem><listitem><para>Add entries for each file system to be shared by using the
WebNFS service.</para><para>Edit <filename>/etc/dfs/dfstab</filename>. Add one entry to the
file for every file system. The <option role="nodash">public</option> and <option role="nodash">index</option> tags that are shown in the following example
are optional. </para><screen>share -F nfs -o ro,public,index=index.html /export/ftp</screen><para>See the <olink targetdoc="refman4" targetptr="dfstab-4" remap="external"><citerefentry><refentrytitle>dfstab</refentrytitle><manvolnum>4</manvolnum></citerefentry></olink> man
page for a description of <filename>/etc/dfs/dfstab</filename> and the <olink targetdoc="refman1m" targetptr="share-nfs-1m" remap="external"><citerefentry><refentrytitle>share_nfs</refentrytitle><manvolnum>1M</manvolnum></citerefentry></olink> man page
for a complete list of options.</para>
</listitem><listitem><para>Share the file system.</para><para>After the entry is in <filename>/etc/dfs/dfstab</filename>, you
can share the file system by either rebooting the system or by using the <command>shareall</command> command.</para><screen># <userinput>shareall</userinput></screen>
</listitem><listitem><para>Verify that the information is correct.</para><para>Run the <command>share</command> command to check that the correct options are listed:</para><screen># <userinput>share</userinput>
-        /export/share/man   ro   ""
-        /usr/src     rw=eng   ""
-        /export/ftp    ro,public,index=index.html  ""</screen>
</listitem>
</orderedlist>
</example>
</task><task id="rfsadmin-101"><title>How to Enable NFS Server Logging</title><tasksummary><itemizedlist><para>Starting with the Solaris Express, Developer Edition 2/07 release, you
can do the following:</para><listitem><para>Use the <command>sharemgr</command> utility to share file
systems, set property values for the shared file systems, and perform related
tasks. For information about <command>sharemgr</command>, including descriptions
of subcommands and properties, see the <citerefentry><refentrytitle>sharemgr</refentrytitle><manvolnum>1M</manvolnum></citerefentry> man page and <olink targetptr="gcrvu" remap="internal">sharemgr
Command</olink>.</para>
</listitem><listitem><para>Use the <command>sharectl</command> utility to configure file-sharing
protocols, such as NFS. See the <citerefentry><refentrytitle>sharectl</refentrytitle><manvolnum>1M</manvolnum></citerefentry> man page and <olink targetptr="gecpc" remap="internal">sharectl
Command</olink>.</para>
</listitem>
</itemizedlist><note><para>When you use <command>sharemgr</command>, you do not need to use
the <command>share</command>, <command>shareall</command>,  and <command>unshare</command> commands.
Also, you do not need to edit the <filename>/etc/dfs/dfstab</filename> file.</para>
</note><para>The following procedure uses the <command>sharemgr</command> utility.
If you prefer to use the <command>share</command> and <command>shareall</command> utilities,
see the example that follows this procedure.</para>
</tasksummary><procedure>&rolestepA;<step performance="optional" id="rfsadmin-step-264"><para>Change file-system
configuration settings.</para><para>In <filename>/etc/nfs/nfslog.conf</filename>,
you can change the settings in one of two ways. You can edit the default settings
for all file systems by changing the data that is associated with the <literal>global</literal> tag. Alternately, you can add a new tag for this file system. If
these changes are not needed, you do not need to change this file. The format
of <filename>/etc/nfs/nfslog.conf</filename> is described in the <olink targetdoc="refman4" targetptr="nfslog.conf-4" remap="external"><citerefentry><refentrytitle>nfslog.conf</refentrytitle><manvolnum>4</manvolnum></citerefentry></olink> man page. </para>
</step><step id="rfsadmin-step-65"><para>Use the <command>sharemgr</command> utility
to assign property values to the file system to be     shared by using NFS
server logging.</para><substeps><step><para>Use the following syntax to create a share group with the desired
property value.</para><screen># sharemgr create [-P protocol] [-p property=value] share-group</screen><para>For example:</para><screen># <userinput>sharemgr create -p log=global my-group</userinput></screen><para>This example uses the default settings associated with the global tag.
Note that the tag assigned to the log property must also exist in the <filename>/etc/nfs/nfslog.conf</filename> file.</para>
</step><step><para>Use the following syntax to add shares to the share group.</para><screen remap="wide"># sharemgr add-share -s share-path [-t] [-d description] [-r resource-name] share-group</screen>
</step><step performance="optional"><para>If necessary, use the following syntax
to set more property values to an existing share group.</para><screen># sharemgr set [-P protocol] [-S security-mode] [-p property=value] share-group</screen><para>For example:</para><screen># <userinput>sharemgr set -p ro=true my-group</userinput></screen><para>In this example the permissions for <literal>my-group</literal> are
set to read-only.</para><note><para>You do not need to repeat this command-line syntax for each additional
property value. You can use the <option>p</option> option multiple times to
define multiple properties on the same command line.</para>
</note>
</step>
</substeps>
</step><step id="rfsadmin-step-67"><para>Use the following syntax to verify what
you have created.</para><screen># sharemgr show [-v] [-p] [-x] [share-group...]</screen>
</step><step id="rfsadmin-step-68"><para>Check if <command>nfslogd</command>, the
NFS log daemon, is running.</para><screen># <userinput>ps -ef | grep nfslogd</userinput></screen>
</step><step performance="optional"><para>Start <command>nfslogd</command>, if it
is not running.</para><screen># <userinput>svcadm restart network/nfs/server:default</userinput></screen>
</step>
</procedure><example id="gecrn"><title>How to Use the <command>share</command> and <command>shareall</command> Commands
to Enable NFS Server Logging</title><orderedlist><listitem><para>Become superuser or assume an equivalent role.</para><para>Roles
contain authorizations and privileged commands. For more information about
roles, see <olink targetdoc="sysadv6" targetptr="rbactask-15" remap="external"><citetitle remap="section">Configuring RBAC (Task Map)</citetitle> in <citetitle remap="book">System Administration Guide: Security Services</citetitle></olink>.
To configure a role with the Primary Administrator    profile, see <olink targetdoc="sysadv1" targetptr="smcover-1" remap="external">Chapter 2, <citetitle remap="chapter">Working With the Solaris Management Console (Tasks),</citetitle> in <citetitle remap="book">System Administration Guide: Basic Administration</citetitle></olink>.</para>
</listitem><listitem><para>(Optional) Change file-system configuration settings.</para><para>In <filename>/etc/nfs/nfslog.conf</filename>, you can change the
settings in one of two ways. You can edit the default settings for all file
systems by changing the data that is associated with the <literal>global</literal> tag.
Alternately, you can add a new tag for this file system. If these changes
are not needed, you do not need to change this file. The format of <filename>/etc/nfs/nfslog.conf</filename> is described in <olink targetdoc="refman4" targetptr="nfslog.conf-4" remap="external"><citerefentry><refentrytitle>nfslog.conf</refentrytitle><manvolnum>4</manvolnum></citerefentry></olink>. </para>
</listitem><listitem><para>Add entries for each file system to be shared by using NFS
server logging.</para><para>Edit <filename>/etc/dfs/dfstab</filename>. Add one entry to the
file for the file system on which you are enabling NFS server logging. The
tag that is used with the <literal>log=</literal><replaceable>tag</replaceable> option
must be entered in <filename>/etc/nfs/nfslog.conf</filename>. This example
uses the default settings in the <literal>global</literal> tag.</para><screen>share -F nfs -o ro,log=global /export/ftp</screen><para>See the <olink targetdoc="refman4" targetptr="dfstab-4" remap="external"><citerefentry><refentrytitle>dfstab</refentrytitle><manvolnum>4</manvolnum></citerefentry></olink> man
page for a description of <filename>/etc/dfs/dfstab</filename> and the <olink targetdoc="refman1m" targetptr="share-nfs-1m" remap="external"><citerefentry><refentrytitle>share_nfs</refentrytitle><manvolnum>1M</manvolnum></citerefentry></olink> man page
for a complete list of options.</para>
</listitem><listitem><para>Share the file system.</para><para>After the entry is in <filename>/etc/dfs/dfstab</filename>, you can share the file system by either rebooting
the system or by using the <command>shareall</command> command.</para><screen># <userinput>shareall</userinput></screen>
</listitem><listitem><para>Verify that the information is correct.</para><para>Run the <command>share</command> command to check that the correct options are listed:</para><screen># <userinput>share</userinput>
-        /export/share/man   ro   ""
-        /usr/src     rw=eng   ""
-        /export/ftp    ro,log=global  ""</screen>
</listitem><listitem><para>Check if <command>nfslogd</command>, the NFS log daemon, is
running.</para><screen># <userinput>ps -ef | grep nfslogd</userinput></screen>
</listitem><listitem><para>(Optional) Start <command>nfslogd</command>, if it is not running
already.</para><itemizedlist><listitem><para>(Optional) If <filename>/etc/nfs/nfslogtab</filename> is present,
start the NFS log daemon by typing the following:</para><screen># <userinput>svcadm restart network/nfs/server:default</userinput></screen>
</listitem><listitem><para>(Optional) If <filename>/etc/nfs/nfslogtab</filename> is not
present, run any of the <command>share</command> commands to create the file
and then start the daemon.</para><screen># <userinput>shareall</userinput>
# <userinput>svcadm restart network/nfs/server:default</userinput></screen>
</listitem>
</itemizedlist>
</listitem>
</orderedlist>
</example>
</task>
</sect1><sect1 id="rfsadmin-61"><title>Mounting File Systems</title><para>You can mount file systems in several ways. File systems can be
mounted automatically when the system is booted, on demand from the command
line, or through the automounter. The automounter provides many advantages
to mounting at boot time or mounting from the command line. However, many
situations require a combination of all three methods. Additionally,  several
ways of enabling or disabling processes exist, depending on the options you
use when mounting the file system. See the following table for a complete
list of the tasks that are associated with file-system mounting.</para><table frame="all" pgwide="1" id="rfsadmin-tbl-171"><title>Task Map for Mounting
File Systems</title><tgroup cols="3" colsep="1" rowsep="1"><colspec colwidth="110*"/><colspec colname="col2" colwidth="167*"/><colspec colwidth="119*"/><thead><row><entry><para>Task</para>
</entry><entry><para>Description</para>
</entry><entry><para>For Instructions</para>
</entry>
</row>
</thead><tbody><row><entry><para>Mount a file system at boot time</para>
</entry><entry><para>Steps so that a file system is mounted whenever a system is rebooted.</para>
</entry><entry><para><olink targetptr="rfsadmin-62" remap="internal">How to Mount a File System at Boot Time</olink>.</para>
</entry>
</row><row><entry><para>Mount a file system by using a command</para>
</entry><entry><para>Steps to mount a file system when a system is running. This procedure
is useful when testing.</para>
</entry><entry><para><olink targetptr="rfsadmin-66" remap="internal">How to Mount a File System From the Command
Line</olink>.</para>
</entry>
</row><row><entry><para>Mount with the automounter</para>
</entry><entry><para>Steps to access a file system on demand without using the command line.</para>
</entry><entry><para><olink targetptr="rfsadmin-67" remap="internal">Mounting With the Automounter</olink>.</para>
</entry>
</row><row><entry><para>Prevent large files</para>
</entry><entry><para>Steps to prevent large files from being created on a file system.</para>
</entry><entry><para><olink targetptr="rfsadmin-75" remap="internal">How to Disable Large Files on an NFS
Server</olink>.</para>
</entry>
</row><row><entry><para>Start client-side failover</para>
</entry><entry><para>Steps to enable the automatic switchover to a working file system if
a server fails.</para>
</entry><entry><para><olink targetptr="rfsadmin-81" remap="internal">How to Use Client-Side Failover</olink>.</para>
</entry>
</row><row><entry><para>Disable mount access for a client</para>
</entry><entry><para>Steps to disable the ability of one client to access a remote file system.</para><note><para>The procedure shows you
how to use the <command>sharemgr</command> command. The example that follows
the procedure uses the <command>share</command> and <command>shareall</command> commands
to complete the same task.</para>
</note>
</entry><entry><para><olink targetptr="rfsadmin-84" remap="internal">How to Disable Mount Access for One Client</olink>.</para>
</entry>
</row><row><entry><para>Provide access to a file system through a firewall</para>
</entry><entry><para>Steps to allow access to a file system through a firewall by using the
WebNFS protocol.</para>
</entry><entry><para><olink targetptr="rfsadmin-88" remap="internal">How to Mount an NFS File System Through
a Firewall</olink>.</para>
</entry>
</row><row><entry><para>Mount a file system by using an NFS URL</para>
</entry><entry><para>Steps to allow access to a file system by using an NFS URL. This process
allows for file-system access without using the MOUNT protocol.</para>
</entry><entry><para><olink targetptr="rfsadmin-92" remap="internal">How to Mount an NFS File System Using
an NFS URL</olink>.</para>
</entry>
</row>
</tbody>
</tgroup>
</table><task id="rfsadmin-62"><title>How to Mount a File System at Boot Time</title><tasksummary><para>If you want to mount file systems at boot time instead of using
autofs maps, follow this procedure. This procedure must be completed on every
client that should have access to remote file systems.   </para>
</tasksummary><procedure>&rolestepA;<step id="rfsadmin-step-64"><para>Add an entry for the file system to <filename>/etc/vfstab</filename>.</para><para>Entries in the <filename>/etc/vfstab</filename> file have the
following syntax:</para><programlisting>special  fsckdev  mountp  fstype  fsckpass  mount-at-boot  mntopts</programlisting><para>See the <olink targetdoc="refman4" targetptr="vfstab-4" remap="external"><citerefentry><refentrytitle>vfstab</refentrytitle><manvolnum>4</manvolnum></citerefentry></olink> man
page for more information.</para><caution><para>NFS servers that also have NFS client <filename>vfstab</filename> entries
must always specify the <option role="nodash">bg</option> option to avoid
a system hang during reboot. For more information, see <olink targetptr="rfsrefer-16" remap="internal">mount Options for NFS File Systems</olink>.</para>
</caution>
</step>
</procedure><example id="rfsadmin-ex-233"><title>Entry in the Client's <filename>vfstab</filename> File</title><para>You want a client machine to mount the <filename>/var/mail</filename> directory
from the server <literal>wasp</literal>. You want the file system to be mounted
as <filename>/var/mail</filename> on the client and you want the client to
have read-write access. Add the following entry to the client's <filename>vfstab</filename> file.</para><screen>wasp:/var/mail - /var/mail nfs - yes rw</screen>
</example>
</task><task id="rfsadmin-66"><title>How to Mount a File System From the Command
Line</title><tasksummary><para>Mounting a file system from the command line is often performed
to test a new mount point. This type of mount allows for temporary access
to a file system that is not available through the automounter.</para>
</tasksummary><procedure>&rolestepA;<step id="rfsadmin-step-192"><para>Mount the file system.</para><para>Type the following
command:</para><screen># <userinput>mount -F nfs -o ro bee:/export/share/local /mnt</userinput></screen><para>In this instance, the <filename>/export/share/local</filename> file
system from the server <literal>bee</literal> is mounted on read-only <filename>/mnt</filename> on the local system. Mounting from the command line allows for
temporary viewing of the file system. You can unmount the file system with <command>umount</command> or by rebooting the local host.</para><caution><para>Starting with the Solaris 2.6 release, all versions of the <command>mount</command> command do not warn about invalid options. The command silently
ignores any options that cannot be interpreted. To prevent unexpected behavior,
ensure that you verify all of the options that were used.</para>
</caution>
</step>
</procedure>
</task><sect2 id="rfsadmin-67"><title>Mounting With the Automounter</title><para><olink targetptr="rfsadmin-127" remap="internal">Task Overview for Autofs Administration</olink> includes the specific instructions for establishing and supporting
mounts with the automounter. Without any changes to the generic system, clients
should be able to access remote file systems through the <filename>/net</filename> mount
point. To mount the <filename>/export/share/local</filename> file system from
the previous example,  type the following:  </para><screen>% <userinput>cd /net/bee/export/share/local</userinput></screen><para>Because the automounter allows all users to mount file systems, <literal>root</literal> access is not required. The automounter also provides for automatic
unmounting of file systems, so you do not need to unmount file systems after
you are finished.</para>
</sect2><task id="rfsadmin-75"><title>How to Disable Large Files on an NFS Server</title><tasksummary><para>For servers that are supporting clients that cannot handle a file
over 2 GBytes, you might need to disable the ability to create large files.</para><note><para>Versions prior to the 2.6 release of the Solaris release cannot
use large files. If the clients need to access large files, check that the
clients of the NFS server are running, at minimum, the 2.6 release.</para>
</note>
</tasksummary><procedure>&rolestepA;<step id="rfsadmin-step-77"><para>Check that no large files exist on the file
system.</para><para>For example:</para><screen># <userinput>cd /export/home1</userinput>
# <userinput>find . -xdev -size +2000000 -exec ls -l {} \;</userinput></screen><para>If large files are on the file system, you must remove or move these
files  to another file system.</para>
</step><step id="rfsadmin-step-78"><para>Unmount the file system.</para><screen># <userinput>umount /export/home1</userinput></screen>
</step><step id="rfsadmin-step-79"><para>Reset the file system state if the file
system has been mounted by using <option role="nodash">largefiles</option>.</para><para><command>fsck</command> resets the file system state if no large files
exist on the file system:</para><screen># <userinput>fsck /export/home1</userinput></screen>
</step><step id="rfsadmin-step-80"><para>Mount the file system by using <option role="nodash">nolargefiles</option>.</para><screen># <userinput>mount -F ufs -o nolargefiles /export/home1</userinput></screen><para>You can mount from the command line, but to make the option more
permanent, add an entry that resembles the following into <filename>/etc/vfstab</filename>:</para><screen>/dev/dsk/c0t3d0s1 /dev/rdsk/c0t3d0s1 /export/home1  ufs  2  yes  nolargefiles</screen>
</step>
</procedure>
</task><task id="rfsadmin-81"><title>How to Use Client-Side Failover</title><procedure>&rolestepA;<step id="rfsadmin-step-83"><para>On the NFS client, mount the file system
by using the <option role="nodash">ro</option> option.</para><para>You can mount from the command line, through the automounter,
or by adding an entry to <filename>/etc/vfstab</filename> that resembles the
following: </para><screen>bee,wasp:/export/share/local  -  /usr/local  nfs  -  no  ro</screen><para>This syntax has been allowed by the automounter. However, the failover
was not available while file systems were mounted, only when a server was
being selected.</para><note><para>Servers that are running different versions of the NFS protocol
cannot be mixed by using a command line or in a <filename>vfstab</filename> entry.
Mixing servers that support NFS version 2, version 3, or version 4 protocols
can only be performed with autofs. In autofs, the best subset of version 2,
version 3, or version 4 servers is used.</para>
</note>
</step>
</procedure>
</task><task id="rfsadmin-84"><title>How to Disable Mount Access for One Client</title><tasksummary><itemizedlist><para>Starting with the Solaris Express, Developer Edition 2/07 release, you
can do the following:</para><listitem><para>Use the <command>sharemgr</command> utility to share file
systems, set property values for the shared file systems, and perform related
tasks. For information about <command>sharemgr</command>, including descriptions
of subcommands and properties, see the <citerefentry><refentrytitle>sharemgr</refentrytitle><manvolnum>1M</manvolnum></citerefentry> man page and <olink targetptr="gcrvu" remap="internal">sharemgr
Command</olink>.</para>
</listitem><listitem><para>Use the <command>sharectl</command> utility to configure file-sharing
protocols, such as NFS. See the <citerefentry><refentrytitle>sharectl</refentrytitle><manvolnum>1M</manvolnum></citerefentry> man page and <olink targetptr="gecpc" remap="internal">sharectl
Command</olink>.</para>
</listitem>
</itemizedlist><note><para>When you use <command>sharemgr</command>, you do not need to use
the <command>share</command>, <command>shareall</command>,  and <command>unshare</command> commands.
Also, you do not need to edit the <filename>/etc/dfs/dfstab</filename> file.</para>
</note><para>The following procedure uses the <command>sharemgr</command> utility.
If you prefer to use the <command>share</command> and <command>shareall</command> utilities,
see the example that follows this procedure.</para>
</tasksummary><procedure>&rolestepA;<step id="rfsadmin-step-86"><para>Disable mount access for one client.</para><para>For example:</para><screen># sharemgr set ro=-rose:eng my-group</screen><variablelist><varlistentry><term><literal>-rose:eng</literal></term><listitem><para>The access-list that allows mount access to all clients in
the <literal>eng</literal> netgroup except the host, <literal>rose</literal></para>
</listitem>
</varlistentry><varlistentry><term><literal>my-group</literal></term><listitem><para>The share group</para>
</listitem>
</varlistentry>
</variablelist>
</step>
</procedure><example id="gedmr"><title>How to Use the <command>share</command> and <command>shareall</command> Commands
to Disable Mount Access for One Client</title><orderedlist><listitem><para>Become superuser or assume an equivalent role.</para><para>Roles
contain authorizations and privileged commands. For more information about
roles, see <olink targetdoc="sysadv6" targetptr="rbactask-15" remap="external"><citetitle remap="section">Configuring RBAC (Task Map)</citetitle> in <citetitle remap="book">System Administration Guide: Security Services</citetitle></olink>.
To configure a role with the Primary Administrator    profile, see <olink targetdoc="sysadv1" targetptr="smcover-1" remap="external">Chapter 2, <citetitle remap="chapter">Working With the Solaris Management Console (Tasks),</citetitle> in <citetitle remap="book">System Administration Guide: Basic Administration</citetitle></olink>.</para>
</listitem><listitem><para>Add an entry in <filename>/etc/dfs/dfstab</filename>.</para><para>The first example allows mount access to all clients in the <literal>eng</literal> netgroup except the host that is named <literal>rose</literal>.
The second example allows mount access to all clients in the <literal>eng.example.com</literal> DNS domain except for <literal>rose</literal>.</para><screen>share -F nfs -o ro=-rose:eng /export/share/man
share -F nfs -o ro=-rose:.eng.example.com /export/share/man</screen><para>For additional information about access lists, see <olink targetptr="rfsrefer-27" remap="internal">Setting Access Lists With the share Command</olink>.
For a description of <filename>/etc/dfs/dfstab</filename>, see <olink targetdoc="refman4" targetptr="dfstab-4" remap="external"><citerefentry><refentrytitle>dfstab</refentrytitle><manvolnum>4</manvolnum></citerefentry></olink>.</para>
</listitem><listitem><para>Share the file system.</para><para>The NFS server does not use changes to <filename>/etc/dfs/dfstab</filename> 
until the file systems are shared again or until the server is rebooted.</para><screen># shareall</screen>
</listitem>
</orderedlist>
</example>
</task><task id="rfsadmin-88"><title>How to Mount an NFS File System Through a Firewall</title><tasksummary><para>To access file systems through a firewall, use the following procedure.</para>
</tasksummary><procedure>&rolestepA;<step id="rfsadmin-step-91"><para>Manually mount the file system by using
a command such as the following:</para><screen># <userinput>mount -F nfs bee:/export/share/local /mnt</userinput></screen><para>In this example, the file system <literal>/export/share/local</literal> is
mounted on the local client by using the public file handle. An NFS URL can
be used instead of the standard path name. If the public file handle is not
supported by the server <literal>bee</literal>, the mount operation fails.</para><note><para>This procedure requires that the file system on the NFS server
be shared by using the <option role="nodash">public</option> option. Additionally,
any firewalls between the client and the server must allow TCP connections
on port <literal>2049</literal>. Starting with the Solaris 2.6 release, all
file systems that are shared allow for public file handle access, so the <option role="nodash">public</option> option is applied by default.</para>
</note>
</step>
</procedure>
</task><task id="rfsadmin-92"><title>How to Mount an NFS File System Using an NFS
URL</title><procedure>&rolestepA;<step performance="optional" id="rfsadmin-step-95"><para>If you are using
NFS version 2 or version 3, manually mount the file system by using a command
such as the following:</para><screen># <userinput>mount -F nfs nfs://bee:3000/export/share/local /mnt</userinput></screen><para>In this example, the <filename>/export/share/local</filename> file
system is being mounted from the server <literal>bee</literal> by using NFS
port number <literal>3000</literal>. The port number is not required and by
default the standard NFS port number of <literal>2049</literal> is used. You
can choose to include the <option role="nodash">public</option> option with
an NFS URL. Without the <option role="nodash">public</option> option, the
MOUNT protocol is used if the public file handle is not supported by the server.
The <option role="nodash">public</option> option forces the use of the public
file handle, and the mount fails if the public file handle is not supported.</para>
</step><step performance="optional" id="rfsadmin-step-227"><para>If you are using
NFS version 4, manually mount the file system by using a command such as the
following:</para><screen># <userinput>mount -F nfs -o vers=4 nfs://bee:3000/export/share/local /mnt</userinput></screen>
</step>
</procedure>
</task>
</sect1><sect1 id="rfsadmin-68"><title>Setting Up NFS Services</title><itemizedlist><para>This section describes some of the tasks that are necessary to
do the following:</para><listitem><para>Start and stop the NFS server</para>
</listitem><listitem><para>Start and stop the automounter</para>
</listitem><listitem><para>Select a different version of NFS</para>
</listitem>
</itemizedlist><note><para>Starting in the Solaris 10 release, NFS version 4 is the default.</para>
</note><table frame="all" pgwide="1" id="rfsadmin-tbl-196"><title>Task Map for NFS
Services</title><tgroup cols="3" colsep="1" rowsep="1"><colspec colname="colspec0" colwidth="110*"/><colspec colname="col2" colwidth="167*"/><colspec colname="colspec1" colwidth="119*"/><thead><row><entry><para>Task</para>
</entry><entry><para>Description</para>
</entry><entry><para>For Instructions</para>
</entry>
</row>
</thead><tbody><row><entry><para>Start the NFS server</para>
</entry><entry><para>Steps to start the NFS service if it has not been started automatically.</para>
</entry><entry><para><olink targetptr="rfsadmin-69" remap="internal">How to Start the NFS Services</olink></para>
</entry>
</row><row><entry><para>Stop the NFS server</para>
</entry><entry><para>Steps to stop the NFS service. Normally the service should not need
to be stopped.</para>
</entry><entry><para><olink targetptr="rfsadmin-72" remap="internal">How to Stop the NFS Services</olink></para>
</entry>
</row><row><entry><para>Start the automounter</para>
</entry><entry><para>Steps to start the automounter. This procedure is required when some
of the automounter maps are changed.</para>
</entry><entry><para><olink targetptr="rfsadmin-121" remap="internal">How to Start the Automounter</olink></para>
</entry>
</row><row><entry><para>Stop the automounter</para>
</entry><entry><para>Steps to stop the automounter. This procedure is required when some
of the automounter maps are changed.</para>
</entry><entry><para><olink targetptr="rfsadmin-124" remap="internal">How to Stop the Automounter</olink></para>
</entry>
</row><row><entry><para>Select a different version of NFS on the server</para>
</entry><entry><para>Steps to select a different version of NFS on the server. If you choose
not to use NFS version 4, use this procedure.</para>
</entry><entry><para><olink targetptr="rfsadmin-965" remap="internal">How to Select Different Versions of
NFS on a Server</olink></para>
</entry>
</row><row><entry><para>Select a different version of NFS on the client</para>
</entry><entry><para>Steps to select a different version of NFS on the client by modifying
the <filename>/etc/default/nfs</filename> file. If you choose not to use NFS
version 4, use this procedure.</para>
</entry><entry><para><olink targetptr="rfsadmin-966" remap="internal">How to Select Different Versions of
NFS on a Client by Modifying the /etc/default/nfs File</olink></para>
</entry>
</row><row><entry>
</entry><entry><para>Alternate steps to select a different version of NFS on the client by
using the command line. If you choose not to use NFS version 4, use this alternate
procedure.</para>
</entry><entry><para><olink targetptr="ekqwg" remap="internal">How to Use the Command Line to Select Different
Versions of NFS on a Client</olink></para>
</entry>
</row>
</tbody>
</tgroup>
</table><task id="rfsadmin-69"><title>How to Start the NFS Services</title><procedure>&rolestepA;<step id="rfsadmin-step-71"><para>Enable the NFS service on the server. </para><para>Type the following command.</para><screen># <userinput>svcadm enable network/nfs/server</userinput></screen><para>This command enables the NFS service.</para><note><para>Starting with the Solaris 9 release, the NFS server starts automatically
when you boot the system. Additionally, any time after the system has been
booted, the NFS service daemons can be automatically enabled by sharing the
NFS file system. See <olink targetptr="rfsadmin-57" remap="internal">How to Set Up Automatic
File-System Sharing</olink>.</para>
</note>
</step>
</procedure>
</task><task id="rfsadmin-72"><title>How to Stop the NFS Services</title><procedure>&rolestepA;<step id="rfsadmin-step-74"><para>Disable the NFS service on the server. </para><para>Type the following command.</para><screen># <userinput>svcadm disable network/nfs/server</userinput></screen>
</step>
</procedure>
</task><task id="rfsadmin-121"><title>How to Start the Automounter</title><procedure>&rolestepA;<step id="rfsadmin-step-123"><para>Enable the autofs daemon. </para><para>Type
the following command:</para><screen># <userinput>svcadm enable system/filesystem/autofs</userinput></screen>
</step>
</procedure>
</task><task id="rfsadmin-124"><title>How to Stop the Automounter</title><procedure>&rolestepA;<step id="rfsadmin-step-126"><para>Disable the autofs daemon. </para><para>Type
the following command:</para><screen># <userinput>svcadm disable system/filesystem/autofs</userinput></screen>
</step>
</procedure>
</task><task id="rfsadmin-965"><title>How to Select Different Versions of NFS on
a Server</title><tasksummary><para>If you choose not to use NFS version 4, use this procedure. </para>
</tasksummary><procedure>&rolestepA;<step id="rfsadmin-step-218"><para>Edit the <filename>/etc/default/nfs</filename> file.</para><para>For example, if you want the server to provide only version 3,
set the values for both NFS_SERVER_VERSMAX and NFS_SERVER_VERSMIN to 3. For
a list of keywords and their values, refer to <olink targetptr="rfsrefer-133" remap="internal">Keywords
for the /etc/default/nfs File</olink>.</para><screen>NFS_SERVER_VERSMAX=<replaceable>value</replaceable>
NFS_SERVER_VERSMIN=<replaceable>value</replaceable></screen><variablelist><varlistentry><term><replaceable>value</replaceable></term><listitem><para>Provide the version number.</para>
</listitem>
</varlistentry>
</variablelist><note><para>By default, these lines are commented. Remember to remove the
pound (#) sign, also.</para>
</note>
</step><step performance="optional" id="rfsadmin-step-726"><para>If you want to disable
server delegation, include this line in the <filename>/etc/default/nfs</filename> file.</para><screen><userinput>NFS_SERVER_DELEGATION=off</userinput></screen><note><para>In NFS version 4, server delegation is enabled by default. For
more information, see <olink targetptr="rfsrefer-140" remap="internal">Delegation in NFS Version
4</olink>.</para>
</note>
</step><step performance="optional" id="rfsadmin-step-244"><para>If you want to set
a common domain for clients and servers, include this line in the <filename>/etc/default/nfs</filename> file.</para><screen>NFSMAPID_DOMAIN=<replaceable>my.comany.com</replaceable></screen><variablelist><varlistentry><term><replaceable>my.comany.com</replaceable></term><listitem><para>Provide the common domain</para>
</listitem>
</varlistentry>
</variablelist><para>For more information, refer to <olink targetptr="rfsrefer-118" remap="internal">nfsmapid
Daemon</olink>.</para>
</step><step id="rfsadmin-step-240"><para>Check if the NFS service is running on
the server.</para><para>Type the following command:</para><screen># <userinput>svcs network/nfs/server</userinput></screen><para>This command reports whether the NFS server service is online or disabled.</para>
</step><step performance="optional" id="rfsadmin-step-219"><para>If necessary, disable
the NFS service. </para><para>If you discovered from the previous step that
the NFS service is online, type the following command to disable the service.</para><screen># <userinput>svcadm disable network/nfs/server</userinput></screen><note><para>If you need to configure your NFS service, refer to <olink targetptr="rfsadmin-57" remap="internal">How to Set Up Automatic File-System Sharing</olink>.</para>
</note>
</step><step id="rfsadmin-step-220"><para>Enable the NFS service. </para><para>Type
the following command to enable the service.</para><screen># <userinput>svcadm enable network/nfs/server</userinput></screen>
</step>
</procedure><taskrelated role="see-also"><para><olink targetptr="rfsrefer-147" remap="internal">Version Negotiation in NFS</olink></para>
</taskrelated>
</task><task id="rfsadmin-966"><title>How to Select Different Versions of NFS on
a Client by Modifying the <filename>/etc/default/nfs</filename> File</title><tasksummary><para>The following procedure shows you how to control which version of NFS
is used on the client by modifying the <filename>/etc/default/nfs</filename> file.
If you prefer to use the command line, refer to <olink targetptr="ekqwg" remap="internal">How
to Use the Command Line to Select Different Versions of NFS on a Client</olink>.</para>
</tasksummary><procedure>&rolestepA;<step id="rfsadmin-step-241"><para>Edit the <filename>/etc/default/nfs</filename> file.</para><para>For example, if you want only version 3 on the client, set the
values for both NFS_CLIENT_VERSMAX and NFS_CLIENT_VERSMIN to 3. For a list
of keywords and their values, refer to <olink targetptr="rfsrefer-133" remap="internal">Keywords
for the /etc/default/nfs File</olink>.</para><screen>NFS_CLIENT_VERSMAX=<replaceable>value</replaceable>
NFS_CLIENT_VERSMIN=<replaceable>value</replaceable></screen><variablelist><varlistentry><term><replaceable>value</replaceable></term><listitem><para>Provide the version number.</para>
</listitem>
</varlistentry>
</variablelist><note><para>By default, these lines are commented. Remember to remove the
pound (#) sign, also.</para>
</note>
</step><step id="rfsadmin-step-243"><para>Mount NFS on the client.</para><para>Type
the following command:</para><screen># mount <replaceable>server-name</replaceable>:<replaceable>/share-point</replaceable> <replaceable>/local-dir</replaceable></screen><variablelist><varlistentry><term><replaceable>server-name</replaceable></term><listitem><para>Provide the name of the server.</para>
</listitem>
</varlistentry><varlistentry><term><replaceable>/share-point</replaceable></term><listitem><para>Provide the path of the remote directory to be shared.</para>
</listitem>
</varlistentry><varlistentry><term><replaceable>/local-dir</replaceable></term><listitem><para>Provide the path of the local mount point.</para>
</listitem>
</varlistentry>
</variablelist>
</step>
</procedure><taskrelated role="see-also"><para><olink targetptr="rfsrefer-147" remap="internal">Version Negotiation in NFS</olink></para>
</taskrelated>
</task><task id="ekqwg"><title>How to Use the Command Line to Select Different Versions
of NFS on a Client</title><tasksummary><para>The following procedure shows you how to use the command line to control
which version of NFS is used on a client for a particular mount. If you prefer
to modify the <filename>/etc/default/nfs</filename> file, see <olink targetptr="rfsadmin-966" remap="internal">How to Select Different Versions of NFS on a Client
by Modifying the /etc/default/nfs File</olink>.</para>
</tasksummary><procedure>&rolestepA;<step><para>Mount the desired version of NFS on the client.</para><para>Type
the following command:</para><screen># mount -o vers=<replaceable>value</replaceable> <replaceable>server-name</replaceable>:<replaceable>/share-point</replaceable> <replaceable>/local-dir</replaceable></screen><variablelist><varlistentry><term><replaceable>value</replaceable></term><listitem><para>Provide the version number.</para>
</listitem>
</varlistentry><varlistentry><term><replaceable>server-name</replaceable></term><listitem><para>Provide the name of the server.</para>
</listitem>
</varlistentry><varlistentry><term><replaceable>/share-point</replaceable></term><listitem><para>Provide the path of the remote directory to be shared.</para>
</listitem>
</varlistentry><varlistentry><term><replaceable>/local-dir</replaceable></term><listitem><para>Provide the path of the local mount point.</para>
</listitem>
</varlistentry>
</variablelist><note><para>This command uses the NFS protocol to mount the remote directory
and overrides the client settings in the <filename>/etc/default/nfs</filename> file.</para>
</note>
</step>
</procedure><taskrelated role="see-also"><para><olink targetptr="rfsrefer-147" remap="internal">Version Negotiation in NFS</olink></para>
</taskrelated>
</task>
</sect1><sect1 id="rfsadmin-96"><title>Administering the Secure NFS System</title><para>To use the Secure NFS system, all the computers that you are responsible
for must have a domain name. Typically, a domain is an administrative entity
of several computers that is part of a larger network. If you are running
a name service, you should also establish the name service for the domain.
See <olink targetdoc="sysadv7" remap="external"><citetitle remap="book">System Administration Guide: Naming and Directory Services (NIS+)</citetitle></olink>.     </para><para>Kerberos V5 authentication is supported by the NFS service. <olink targetdoc="sysadv6" targetptr="intro-1" remap="external">Chapter 20, <citetitle remap="chapter">Introduction to the Kerberos Service,</citetitle> in <citetitle remap="book">System Administration Guide: Security Services</citetitle></olink> discusses the Kerberos service.</para><para>You can also configure the Secure NFS environment to use Diffie-Hellman
authentication. <olink targetdoc="sysadv6" targetptr="auth-1" remap="external">Chapter 15, <citetitle remap="chapter">Using Authentication Services (Tasks),</citetitle> in <citetitle remap="book">System Administration Guide: Security Services</citetitle></olink> discusses
this authentication service. </para><para>The following procedure shows you how to use the <command>sharemgr</command> utility to set up a secure NFS environment with DH authentication.
The example that follows the procedure shows you how to use the <command>share</command> command
to complete the same task.</para><task id="rfsadmin-97"><title>How to Set
Up a Secure NFS Environment With DH Authentication</title><tasksummary><itemizedlist><para>Starting with the Solaris Express, Developer Edition 2/07 release, you
can do the following:</para><listitem><para>Use the <command>sharemgr</command> utility to share file
systems, set property values for the shared file systems, and perform related
tasks. For information about <command>sharemgr</command>, including descriptions
of subcommands and properties, see the <citerefentry><refentrytitle>sharemgr</refentrytitle><manvolnum>1M</manvolnum></citerefentry> man page and <olink targetptr="gcrvu" remap="internal">sharemgr
Command</olink>.</para>
</listitem><listitem><para>Use the <command>sharectl</command> utility to configure file-sharing
protocols, such as NFS. See the <citerefentry><refentrytitle>sharectl</refentrytitle><manvolnum>1M</manvolnum></citerefentry> man page and <olink targetptr="gecpc" remap="internal">sharectl
Command</olink>.</para>
</listitem>
</itemizedlist><note><para>When you use <command>sharemgr</command>, you do not need to use
the <command>share</command>, <command>shareall</command>,  and <command>unshare</command> commands.
Also, you do not need to edit the <filename>/etc/dfs/dfstab</filename> file.</para>
</note><para>The following procedure uses the <command>sharemgr</command> utility.
If you prefer to use the <command>share</command> utility, see the example
that follows this procedure.</para>
</tasksummary><procedure><step id="rfsadmin-step-99"><para>Assign your domain a domain name, and make
the domain name known to each computer in the domain.</para><para>See the <olink targetdoc="sysadv7" remap="external"><citetitle remap="book">System Administration Guide: Naming and Directory Services (NIS+)</citetitle></olink> if you are using NIS+ as
your name service.</para>
</step><step id="rfsadmin-step-100"><para>Establish public keys and secret keys for
your clients' users by using the <command>newkey</command> or <command>nisaddcred</command> command. Have each user establish his or her own secure RPC password
by using the <command>chkey</command> command.</para><note><para>For information about these commands, see the <olink targetdoc="refman1m" targetptr="newkey-1m" remap="external"><citerefentry><refentrytitle>newkey</refentrytitle><manvolnum>1M</manvolnum></citerefentry></olink>, the <olink targetdoc="refman1m" targetptr="nisaddcred-1m" remap="external"><citerefentry><refentrytitle>nisaddcred</refentrytitle><manvolnum>1M</manvolnum></citerefentry></olink>, and the <olink targetdoc="refman1" targetptr="chkey-1" remap="external"><citerefentry><refentrytitle>chkey</refentrytitle><manvolnum>1</manvolnum></citerefentry></olink> man pages. </para>
</note><para>When public keys and secret keys have been generated, the public keys
and encrypted secret keys are stored in the <envar>publickey</envar> database. </para>
</step><step id="rfsadmin-step-101"><para>Verify that the name service is responding.</para><itemizedlist><para>For example:</para><listitem><para>If you are running NIS+, type the following:</para><screen># <userinput>nisping -u</userinput>
Last updates for directory eng.acme.com. :
Master server is eng-master.acme.com.
        Last update occurred at Mon Jun  5 11:16:10 2006

Replica server is eng1-replica-replica-58.acme.com.
        Last Update seen was Mon Jun  5 11:16:10 2006</screen>
</listitem><listitem><para>If you are running NIS, verify that the <command>ypbind</command> daemon
is running.</para>
</listitem>
</itemizedlist>
</step><step id="rfsadmin-step-102"><para>Verify that the <command>keyserv</command> daemon
of the key server is running. </para><para>Type the following command.</para><screen># <userinput>ps -ef | grep keyserv</userinput>
root    100      1  16    Apr 11 ?        0:00 /usr/sbin/keyserv
root   2215   2211   5  09:57:28 pts/0    0:00 grep keyserv</screen><para>If the daemon is not running, start the key server by typing the following: </para><screen># <userinput>/usr/sbin/keyserv</userinput></screen>
</step><step id="rfsadmin-step-103"><para>Decrypt and store the secret key. </para><para>Usually, the login password is identical to the network password. In
this situation, <command>keylogin</command> is not required. If the passwords
are different, the users have to log in, and then run <command>keylogin</command>.
You still need to use the <command>keylogin -r</command> command as <literal>root</literal> to store the decrypted secret key in <filename>/etc/.rootkey</filename>.</para><note><para>You need to run <command>keylogin -r</command> if the root secret
key changes or if <filename>/etc/.rootkey</filename> is lost.</para>
</note>
</step><step id="rfsadmin-step-104"><para>Use the <command>sharemgr</command> utility
to set the security mode for the file system to be shared.</para><para>For
example:</para><screen># <userinput>sharemgr set -P nfs -S dh MyShareGroup</userinput></screen><variablelist><varlistentry><term><option>P</option></term><listitem><para>Use this option to specify a file-system type, such as <literal>nfs</literal>.</para>
</listitem>
</varlistentry><varlistentry><term><option>S</option></term><listitem><para>Use this option to specify a security mode, such as <literal>sys</literal>, <literal>dh</literal>, or <literal>krb5</literal>. For more information about security
modes, see the <olink targetdoc="group-refman" targetptr="nfssec-5" remap="external"><citerefentry><refentrytitle>nfssec</refentrytitle><manvolnum>5</manvolnum></citerefentry></olink> man
page.</para>
</listitem>
</varlistentry><varlistentry><term><literal>MyShareGroup</literal></term><listitem><para>Use the name of the share group that you created. For more
information, see the <citerefentry><refentrytitle>sharemgr</refentrytitle><manvolnum>1M</manvolnum></citerefentry> man page or <olink targetptr="gcrvu" remap="internal">sharemgr
Command</olink></para>
</listitem>
</varlistentry>
</variablelist><note><para>You do not need to edit the <filename>etc/dfs/dfstab</filename> file.</para>
</note>
</step><step id="rfsadmin-step-105"><para>Update the automounter maps for the file
system.</para><para>Edit the <envar>auto_master</envar> data to include <option role="nodash">sec=dh</option> as a mount option in the appropriate entries
for Diffie-Hellman authentication:</para><screen>/home	auto_home	-nosuid,sec=dh</screen><note><para>Releases through Solaris 2.5 have a limitation. If a client does
not securely mount a shared file system that is secure, users have access
as <literal>nobody</literal> rather than as themselves. For subsequent releases
that use version 2, the NFS server refuses access if the security modes do
not match, unless <option role="nodash">sec=none</option> is included on the <command>share</command> command line. With version 3, the mode is inherited from the
NFS server, so clients do not need to specify <option role="nodash">sec=dh</option>.
The users have access to the files as themselves.</para>
</note><para>When you reinstall, move, or upgrade a computer, remember to save <filename>/etc/.rootkey</filename> if you do not establish new keys or change the keys
for <literal>root</literal>. If you do delete <filename>/etc/.rootkey</filename>,
you can always type the following:  </para><screen># <userinput>keylogin -r</userinput></screen>
</step>
</procedure><example id="gedhm"><title>How to Use the <command>share</command> Command to Set Up a Secure
NFS Environment With DH Authentication</title><orderedlist><listitem><para>Assign your domain a domain name, and make the domain name known
to each computer in the domain.</para><para>See the <olink targetdoc="sysadv7" remap="external"><citetitle remap="book">System Administration Guide: Naming and Directory Services (NIS+)</citetitle></olink> if
you are using NIS+ as your name service.</para>
</listitem><listitem><para>Establish public keys and secret keys for your clients' users
by using the <command>newkey</command> or <command>nisaddcred</command> command.
Have each user establish his or her own secure RPC password by using the <command>chkey</command> command.</para><note><para>For information about these commands, see the <olink targetdoc="refman1m" targetptr="newkey-1m" remap="external"><citerefentry><refentrytitle>newkey</refentrytitle><manvolnum>1M</manvolnum></citerefentry></olink>, the <olink targetdoc="refman1m" targetptr="nisaddcred-1m" remap="external"><citerefentry><refentrytitle>nisaddcred</refentrytitle><manvolnum>1M</manvolnum></citerefentry></olink>, and the <olink targetdoc="refman1" targetptr="chkey-1" remap="external"><citerefentry><refentrytitle>chkey</refentrytitle><manvolnum>1</manvolnum></citerefentry></olink> man pages. </para>
</note><para>When public keys and secret keys have been generated, the public
keys and encrypted secret keys are stored in the <envar>publickey</envar> database. </para>
</listitem><listitem><para>Verify that the name service is responding. </para><itemizedlist><para>For example:</para><listitem><para>If you are running NIS+, type the following:</para><screen># <userinput>nisping -u</userinput>
Last updates for directory eng.acme.com. :
Master server is eng-master.acme.com.
        Last update occurred at Mon Jun  5 11:16:10 2006

Replica server is eng1-replica-replica-58.acme.com.
        Last Update seen was Mon Jun  5 11:16:10 2006</screen>
</listitem><listitem><para>If you are running NIS, verify that the <command>ypbind</command> daemon
is running.</para>
</listitem>
</itemizedlist>
</listitem><listitem><para>Verify that the <command>keyserv</command> daemon of the key
server is running. </para><para>Type the following command.</para><screen># <userinput>ps -ef | grep keyserv</userinput>
root    100      1  16    Apr 11 ?        0:00 /usr/sbin/keyserv
root   2215   2211   5  09:57:28 pts/0    0:00 grep keyserv</screen><para>If the daemon is not running, start the key server by typing the
following: </para><screen># <userinput>/usr/sbin/keyserv</userinput></screen>
</listitem><listitem><para>Decrypt and store the secret key. </para><para>Usually, the login
password is identical to the network password. In this situation, <command>keylogin</command> is not required. If the passwords are different, the users have
to log in, and then run <command>keylogin</command>. You still need to use
the <command>keylogin -r</command> command as <literal>root</literal> to store
the decrypted secret key in <filename>/etc/.rootkey</filename>.</para><note><para>You need to run <command>keylogin -r</command> if the root secret
key changes or if <filename>/etc/.rootkey</filename> is lost.</para>
</note>
</listitem><listitem><para>Update mount options for the file system.</para><para>For Diffie-Hellman authentication, edit the <filename>/etc/dfs/dfstab</filename> file and add the <option role="nodash">sec=dh</option> option
to the appropriate entries.</para><screen><userinput>share -F nfs -o sec=dh /export/home</userinput></screen><para>See the <olink targetdoc="refman4" targetptr="dfstab-4" remap="external"><citerefentry><refentrytitle>dfstab</refentrytitle><manvolnum>4</manvolnum></citerefentry></olink> man
page for a description of <filename>/etc/dfs/dfstab</filename>.</para>
</listitem><listitem><para>Update the automounter maps for the file system.</para><para>Edit the <envar>auto_master</envar> data to include <option role="nodash">sec=dh</option> as a mount option in the appropriate entries
for Diffie-Hellman authentication:  </para><screen>/home	auto_home	-nosuid,sec=dh</screen><note><para>Releases through Solaris 2.5 have a limitation. If a client does
not securely mount a shared file system that is secure, users have access
as <literal>nobody</literal> rather than as themselves. For subsequent releases
that use version 2, the NFS server refuses access if the security modes do
not match, unless <option>sec=none</option> is included on the <command>share</command> command
line. With version 3, the mode is inherited from the NFS server, so clients
do not need to specify <option role="nodash">sec=dh</option>. The users have
access to the files as themselves.</para>
</note><para>When you reinstall, move, or upgrade a computer, remember to save <filename>/etc/.rootkey</filename> if you do not establish new keys or change the keys
for <literal>root</literal>. If you do delete <filename>/etc/.rootkey</filename>,
you can always type the following:  </para><screen># <userinput>keylogin -r</userinput></screen>
</listitem>
</orderedlist>
</example>
</task>
</sect1><sect1 id="rfsadmin-110"><title>WebNFS Administration Tasks</title><para>This section provides instructions for administering the WebNFS
system. Related tasks follow.</para><table frame="all" pgwide="1" id="rfsadmin-tbl-58"><title>Task Map for WebNFS
Administration</title><tgroup cols="3" colsep="1" rowsep="1"><colspec colwidth="110*"/><colspec colname="col2" colwidth="167*"/><colspec colwidth="119*"/><thead><row><entry><para>Task</para>
</entry><entry><para>Description</para>
</entry><entry><para>For Instructions</para>
</entry>
</row>
</thead><tbody><row><entry><para>Plan for WebNFS</para>
</entry><entry><para>Issues to consider before enabling the WebNFS service.</para>
</entry><entry><para><olink targetptr="rfsadmin-111" remap="internal">Planning for WebNFS Access</olink></para>
</entry>
</row><row><entry><para>Enable WebNFS</para>
</entry><entry><para>Steps to enable mounting of an NFS file system by using the WebNFS protocol.</para>
</entry><entry><para><olink targetptr="rfsadmin-112" remap="internal">How to Enable WebNFS Access</olink></para>
</entry>
</row><row><entry><para>Enable WebNFS through a firewall</para>
</entry><entry><para>Steps to allow access to files through a firewall by using the WebNFS
protocol.</para>
</entry><entry><para><olink targetptr="rfsadmin-119" remap="internal">How to Enable WebNFS Access Through
a Firewall</olink></para>
</entry>
</row><row><entry><para>Browse by using an NFS URL</para>
</entry><entry><para>Instructions for using an NFS URL within a web browser.</para>
</entry><entry><para><olink targetptr="rfsadmin-118" remap="internal">How to Browse Using an NFS URL</olink></para>
</entry>
</row><row><entry><para>Use a public file handle with autofs</para>
</entry><entry><para>Steps to force use of the public file handle when mounting a file system
with the automounter.</para>
</entry><entry><para><olink targetptr="rfsadmin-189" remap="internal">How to Use a Public File Handle With
Autofs</olink></para>
</entry>
</row><row><entry><para>Use an NFS URL with autofs</para>
</entry><entry><para>Steps to add an NFS URL to the  automounter maps.</para>
</entry><entry><para><olink targetptr="rfsadmin-192" remap="internal">How to Use NFS URLs With Autofs</olink></para>
</entry>
</row><row><entry><para>Provide access to a file system through a firewall</para>
</entry><entry><para>Steps to allow access to a file system through a firewall by using the
WebNFS protocol.</para>
</entry><entry><para><olink targetptr="rfsadmin-88" remap="internal">How to Mount an NFS File System Through
a Firewall</olink></para>
</entry>
</row><row><entry><para>Mount a file system by using an NFS URL</para>
</entry><entry><para>Steps to allow access to a file system by  using an NFS URL. This process
allows for file-system access without using the MOUNT protocol.</para>
</entry><entry><para><olink targetptr="rfsadmin-92" remap="internal">How to Mount an NFS File System Using
an NFS URL</olink></para>
</entry>
</row>
</tbody>
</tgroup>
</table><sect2 id="rfsadmin-111"><title>Planning for WebNFS Access</title><para>To use WebNFS, you first need an application that is capable of running
and loading an NFS URL (for example, <literal>nfs://server/path</literal>).
The next step is to choose the file system that can be exported for WebNFS
access. If the application is web browsing, often the document root for the
web server is used. You need to consider several factors when choosing a file
system to export for WebNFS access.</para><orderedlist><listitem><para>Each server has one public file handle that by default is associated
with the server's root file system. The path in an NFS URL is evaluated relative
to the directory with which the public file handle is associated. If the path
leads to a file or directory within an exported file system, the server provides
access. You can use the <option role="nodash">public</option> option of the <command>share</command> command to associate the public file handle with a specific
exported directory. Using this option allows URLs to be relative to the shared
file system rather than to the server's root file system. The root file system
does not allow web access unless the root file system is shared.  </para>
</listitem><listitem><para>The WebNFS environment enables users who already have mount privileges
to access files through a browser. This capability is enabled  regardless
of whether the file system is exported by using the <option role="nodash">public</option> option.
Because users already have access to these files through the NFS setup, this
access should not create any additional security risk. You only need to share
a file system by using the <option role="nodash">public</option> option if
users who cannot mount the file system need to use WebNFS access. </para>
</listitem><listitem><para>File systems that are already open to the public make good candidates
for using the <option role="nodash">public</option> option. Some examples
are the top directory in an ftp archive or the main URL directory for a web
site.</para>
</listitem><listitem><para>You can use the <option role="nodash">index</option> option with
the <command>share</command> command to force the loading of an HTML file.
Otherwise, you can list the directory when an NFS URL is accessed.</para><para>After a file system is chosen, review the files and set access
permissions to restrict viewing of files or directories, as needed. Establish
the permissions, as appropriate, for any NFS file system that is being shared.
For many sites, <literal>755</literal> permissions for directories and <literal>644</literal> permissions for files provide the correct level of access.</para><para>You need to consider additional factors if both NFS and HTTP URLs are
to be used to access one web site. These factors are described in <olink targetptr="rfsrefer-57" remap="internal">WebNFS Limitations With Web Browser Use</olink>.</para>
</listitem>
</orderedlist>
</sect2><sect2 id="rfsadmin-118"><title>How to Browse Using an NFS URL</title><para>Browsers that are capable of supporting the WebNFS service should provide
access to an NFS URL that resembles the following:</para><screen>nfs://<replaceable>server</replaceable>&lt;:<replaceable>port</replaceable>>/<replaceable>path</replaceable></screen><variablelist><varlistentry><term><replaceable>server</replaceable></term><listitem><para>Name of the file server</para>
</listitem>
</varlistentry><varlistentry><term><replaceable>port</replaceable></term><listitem><para>Port number to use (<literal>2049</literal>, default value)</para>
</listitem>
</varlistentry><varlistentry><term><replaceable>path</replaceable></term><listitem><para>Path to file, which can be relative to the public file handle
or to the root file system</para>
</listitem>
</varlistentry>
</variablelist><note><para>In most browsers, the URL service type (for example, <literal>nfs</literal> or <literal>http</literal>) is remembered from one transaction to the next. The exception
occurs when a URL that includes a different service type is loaded. After
you use an NFS URL, a reference to an HTTP URL might be loaded. If such a
reference is loaded, subsequent pages are loaded by using the HTTP protocol
instead of the NFS protocol.</para>
</note>
</sect2><sect2 id="rfsadmin-119"><title>How to Enable WebNFS Access Through a Firewall</title><para>You can enable WebNFS access for clients that are not part of
the local subnet by configuring the firewall to allow a TCP connection on
port <literal>2049</literal>. Just allowing access for <command>httpd</command> does
not allow NFS URLs to be used.</para>
</sect2>
</sect1><sect1 id="rfsadmin-127"><title>Task Overview for Autofs Administration</title><para>This section describes some of the most common tasks you might encounter
in your own environment. Recommended procedures are included for each scenario
to help you configure autofs to best meet your clients' needs. To perform
the tasks that are discussed in this section, use the Solaris Management Console
tools or see the <olink targetdoc="sysadv7" remap="external"><citetitle remap="book">System Administration Guide: Naming and Directory Services (NIS+)</citetitle></olink>.</para><note><para>Starting in the Solaris 10 release, you can also use the <filename>/etc/default/autofs</filename> file to configure your autofs environment. For task information,
refer to <olink targetptr="rfsadmin-249" remap="internal">Using the /etc/default/autofs File
to Configure Your autofs Environment</olink>.</para>
</note><sect2 id="rfsadmin-60"><title>Task Map for Autofs Administration</title><para>The following table provides a description and a pointer to many of
the tasks that are related to autofs.</para><table frame="all" pgwide="1" id="rfsadmin-tbl-59"><title>Task Map for Autofs
Administration</title><tgroup cols="3" colsep="1" rowsep="1"><colspec colname="colspec0" colwidth="110*"/><colspec colname="col2" colwidth="167*"/><colspec colname="colspec1" colwidth="119*"/><thead><row><entry><para>Task</para>
</entry><entry><para>Description</para>
</entry><entry><para>For Instructions</para>
</entry>
</row>
</thead><tbody><row><entry><para>Start autofs</para>
</entry><entry><para>Start the automount service without having to reboot the system</para>
</entry><entry><para><olink targetptr="rfsadmin-121" remap="internal">How to Start the Automounter</olink></para>
</entry>
</row><row><entry><para>Stop autofs</para>
</entry><entry><para>Stop the automount service without disabling other network services</para>
</entry><entry><para><olink targetptr="rfsadmin-124" remap="internal">How to Stop the Automounter</olink></para>
</entry>
</row><row><entry><para>Configure your autofs environment by using the <filename>/etc/default/autofs</filename> file</para>
</entry><entry><para>Assign values to keywords in the <filename>/etc/default/autofs</filename> file</para>
</entry><entry><para><olink targetptr="rfsadmin-249" remap="internal">Using the /etc/default/autofs File to
Configure Your autofs Environment</olink></para>
</entry>
</row><row><entry><para>Access file systems by using autofs</para>
</entry><entry><para>Access file systems by using the automount service</para>
</entry><entry><para><olink targetptr="rfsadmin-67" remap="internal">Mounting With the Automounter</olink></para>
</entry>
</row><row><entry><para>Modify the autofs maps</para>
</entry><entry><para>Steps to modify the master map, which should be used to list other maps</para>
</entry><entry><para><olink targetptr="rfsadmin-133" remap="internal">How to Modify the Master Map</olink></para>
</entry>
</row><row><entry>
</entry><entry><para>Steps to modify an indirect map, which should be used for most maps</para>
</entry><entry><para><olink targetptr="rfsadmin-139" remap="internal">How to Modify Indirect Maps</olink></para>
</entry>
</row><row><entry>
</entry><entry><para>Steps to modify a direct map, which should be used when a direct association
between a mount point on a client and a server is required</para>
</entry><entry><para><olink targetptr="rfsadmin-142" remap="internal">How to Modify Direct Maps</olink></para>
</entry>
</row><row><entry><para>Modify the autofs maps to access non-NFS file systems</para>
</entry><entry><para>Steps to set up an autofs map with an entry for a CD-ROM application</para>
</entry><entry><para><olink targetptr="rfsadmin-149" remap="internal">How to Access CD-ROM Applications With
Autofs</olink></para>
</entry>
</row><row><entry>
</entry><entry><para>Steps to set up an autofs map with an entry for a PC-DOS diskette</para>
</entry><entry><para><olink targetptr="rfsadmin-152" remap="internal">How to Access PC-DOS Data Diskettes
With Autofs</olink></para>
</entry>
</row><row><entry>
</entry><entry><para>Steps to use autofs to access a CacheFS file system</para>
</entry><entry><para><olink targetptr="rfsadmin-156" remap="internal">How to Access NFS File Systems by Using
CacheFS</olink></para>
</entry>
</row><row><entry><para>Using <filename>/home</filename></para>
</entry><entry><para>Example of how to set up a common <filename>/home</filename> map</para>
</entry><entry><para><olink targetptr="rfsadmin-161" remap="internal">Setting Up a Common View of /home</olink></para>
</entry>
</row><row><entry>
</entry><entry><para>Steps to set up a <filename>/home</filename> map that refers to multiple
file systems</para>
</entry><entry><para><olink targetptr="rfsadmin-162" remap="internal">How to Set Up /home With Multiple Home
Directory File Systems</olink></para>
</entry>
</row><row><entry><para>Using a new autofs mount point</para>
</entry><entry><para>Steps to set up a project-related autofs map</para>
</entry><entry><para><olink targetptr="rfsadmin-166" remap="internal">How to Consolidate Project-Related Files
Under /ws</olink></para>
</entry>
</row><row><entry>
</entry><entry><para>Steps to set up an autofs map that supports different client architectures</para>
</entry><entry><para><olink targetptr="rfsadmin-171" remap="internal">How to Set Up Different Architectures
to Access a Shared Namespace</olink></para>
</entry>
</row><row><entry>
</entry><entry><para>Steps to set up an autofs map that supports different operating systems</para>
</entry><entry><para><olink targetptr="rfsadmin-179" remap="internal">How to Support Incompatible Client Operating
System Versions</olink></para>
</entry>
</row><row><entry><para>Replicate file systems with autofs</para>
</entry><entry><para>Provide access to file systems that fail over</para>
</entry><entry><para><olink targetptr="rfsadmin-183" remap="internal">How to Replicate Shared Files Across
Several Servers</olink></para>
</entry>
</row><row><entry><para>Using security restrictions with autofs</para>
</entry><entry><para>Provide access to file systems while restricting remote <literal>root</literal> access
to the files</para>
</entry><entry><para><olink targetptr="rfsadmin-186" remap="internal">How to Apply Autofs Security Restrictions</olink></para>
</entry>
</row><row><entry><para>Using a public file handle with autofs</para>
</entry><entry><para>Force use of the public file handle when mounting a file system</para>
</entry><entry><para><olink targetptr="rfsadmin-189" remap="internal">How to Use a Public File Handle With
Autofs</olink></para>
</entry>
</row><row><entry><para>Using an NFS URL with autofs</para>
</entry><entry><para>Add an NFS URL so that the automounter can use it</para>
</entry><entry><para><olink targetptr="rfsadmin-192" remap="internal">How to Use NFS URLs With Autofs</olink></para>
</entry>
</row><row><entry><para>Disable autofs browsability</para>
</entry><entry><para>Steps to disable browsability so that autofs mount points are not automatically
populated on a single client</para>
</entry><entry><para><olink targetptr="rfsadmin-196" remap="internal">How to Completely Disable Autofs Browsability
on a Single NFS Client</olink></para>
</entry>
</row><row><entry>
</entry><entry><para>Steps to disable browsability so that autofs mount points are not automatically
populated on all clients</para>
</entry><entry><para><olink targetptr="rfsadmin-200" remap="internal">How to Disable Autofs Browsability for
All Clients</olink></para>
</entry>
</row><row><entry>
</entry><entry><para>Steps to disable browsability so that a specific autofs mount point
is  not automatically populated on a client</para>
</entry><entry><para><olink targetptr="rfsadmin-204" remap="internal">How to Disable Autofs Browsability on
a Selected File System</olink></para>
</entry>
</row>
</tbody>
</tgroup>
</table>
</sect2><sect2 id="rfsadmin-249"><title>Using the <filename>/etc/default/autofs</filename> File
to Configure Your autofs Environment</title><para>Starting in the Solaris 10 release, you can use the <filename>/etc/default/autofs</filename> file to configure your autofs environment. Specifically, this
file provides an additional way to configure your autofs commands and autofs
daemons. The same specifications you would make on the command line can be
made in this configuration file. You can make your specifications by providing
values to keywords. For more information, refer to <olink targetptr="rfsrefer-146" remap="internal">/etc/default/autofs File</olink>.</para><para>The following procedure shows you how to use the <filename>/etc/default/autofs</filename> file.</para>
</sect2><task id="rfsadmin-250"><title>How to Use the <filename>/etc/default/autofs</filename> File</title><procedure>&rolestepA;<step><para>Add or modify an entry in the <filename>/etc/default/autofs</filename> file.</para><para>For example, if you want to turn off browsing for all autofs
mount points, you could add the following line.</para><screen><userinput>AUTOMOUNTD_NOBROWSE=ON</userinput></screen><para>This keyword is the equivalent of the <option>n</option> argument for <command>automountd</command>. For a list of keywords, refer to <olink targetptr="rfsrefer-146" remap="internal">/etc/default/autofs File</olink>.</para>
</step><step><para>Restart the autofs daemon. </para><para>Type the following command:</para><screen># <userinput>svcadm restart system/filesystem/autofs</userinput></screen>
</step>
</procedure>
</task><sect2 id="rfsadmin-128"><title>Administrative Tasks Involving Maps</title><para>The following tables describe several of the factors you need
to be aware of when administering autofs maps. Your choice of map and name
service affect the mechanism that you need to use to make changes to the autofs
maps. </para><para>The following table describes the types of maps and their uses.</para><table frame="topbot" id="rfsadmin-tbl-129"><title>Types of autofs Maps and
Their Uses</title><tgroup cols="2" colsep="0" rowsep="0"><colspec colnum="1" colname="column1" colwidth="2*"/><colspec colnum="2" colname="column2" colwidth="7*"/><thead><row rowsep="1"><entry><para>Type of Map</para>
</entry><entry><para>Use</para>
</entry>
</row>
</thead><tbody><row><entry><para>Master </para>
</entry><entry><para>Associates a directory with a map</para>
</entry>
</row><row><entry><para>Direct </para>
</entry><entry><para>Directs autofs to specific file systems</para>
</entry>
</row><row><entry><para>Indirect </para>
</entry><entry><para>Directs autofs to reference-oriented file systems</para>
</entry>
</row>
</tbody>
</tgroup>
</table><para>The following table describes how to make changes to your autofs
environment that are  based on your name service.  </para><table frame="topbot" id="rfsadmin-tbl-130"><title>Map Maintenance</title><tgroup cols="2" colsep="0" rowsep="0"><colspec colnum="1" colname="column1" colwidth="2*"/><colspec colnum="2" colname="column2" colwidth="2*"/><thead><row rowsep="1"><entry><para>Name Service</para>
</entry><entry><para>Method</para>
</entry>
</row>
</thead><tbody><row><entry><para>Local files</para>
</entry><entry><para>Text editor</para>
</entry>
</row><row><entry><para>NIS</para>
</entry><entry><para><command>make</command> files</para>
</entry>
</row><row><entry><para>NIS+</para>
</entry><entry><para><command>nistbladm</command></para>
</entry>
</row>
</tbody>
</tgroup>
</table><para>The next table tells you when to run the <command>automount</command> command,
depending on the modification you have made to the type of map. For example,
if you have made an addition or a deletion to a direct map, you need to run
the <command>automount</command> command on the local system. By running the
command, you make the change effective. However, if you have modified an existing
entry, you do not need to run the <command>automount</command> command for
the change to become effective. </para><table frame="topbot" id="rfsadmin-tbl-131"><title>When to Run the <command>automount</command> Command</title><tgroup cols="3" colsep="0" rowsep="0"><colspec colnum="1" colname="column1" colwidth="2*"/><colspec colnum="2" colname="column2" colwidth="3*"/><colspec colnum="3" colname="column3" colwidth="3*"/><thead><row><entry><para>Type of Map</para>
</entry><entry><para>Restart <command>automount</command>?</para>
</entry><entry><para></para>
</entry>
</row><row rowsep="1"><entry><para></para>
</entry><entry><para>Addition or Deletion</para>
</entry><entry><para>Modification</para>
</entry>
</row>
</thead><tbody><row><entry><para><literal>auto_master</literal> </para>
</entry><entry><para><literal>Y</literal></para>
</entry><entry><para><literal>Y</literal></para>
</entry>
</row><row><entry><para><literal>direct</literal> </para>
</entry><entry><para><literal>Y</literal></para>
</entry><entry><para><literal>N</literal></para>
</entry>
</row><row><entry><para><literal>indirect</literal> </para>
</entry><entry><para><literal>N</literal></para>
</entry><entry><para><literal>N</literal></para>
</entry>
</row>
</tbody>
</tgroup>
</table>
</sect2><sect2 id="rfsadmin-132"><title>Modifying the Maps</title><para>The following procedures require that you use NIS+ as your name service.</para>
</sect2><task id="rfsadmin-133"><title>How to Modify the Master Map</title><procedure><step id="rfsadmin-step-211"><para>Log in as a user who has permissions to
change the maps.</para>
</step><step id="rfsadmin-step-135"><para>Using the <command>nistbladm</command> command, make your changes
to the master map.   </para><para>See the <olink targetdoc="sysadv7" remap="external"><citetitle remap="book">System Administration Guide: Naming and Directory Services (NIS+)</citetitle></olink>.</para>
</step><step id="rfsadmin-step-136"><para>For each client, become superuser or assume
an equivalent role.</para><para>Roles contain authorizations and privileged
commands. For more information about roles, see <olink targetdoc="sysadv6" targetptr="rbactask-15" remap="external"><citetitle remap="section">Configuring RBAC (Task Map)</citetitle> in <citetitle remap="book">System Administration Guide: Security Services</citetitle></olink>. To configure a role with the Primary Administrator
profile, see <olink targetdoc="sysadv1" targetptr="smcover-1" remap="external">Chapter 2, <citetitle remap="chapter">Working With the Solaris Management Console (Tasks),</citetitle> in <citetitle remap="book">System Administration Guide: Basic Administration</citetitle></olink>.</para>
</step><step id="rfsadmin-step-137"><para>For each client, run the <command>automount</command> command
to ensure that your changes become effective.</para>
</step><step id="rfsadmin-step-138"><para>Notify your users of the changes. </para><para>Notification is required so that the users can also run the <command>automount</command> command as superuser on their own computers. Note that the <command>automount</command> command gathers information from the master map whenever it is
run.</para>
</step>
</procedure>
</task><task id="rfsadmin-139"><title>How to Modify Indirect Maps</title><procedure><step id="rfsadmin-step-210"><para>Log in as a user who has permissions to
change the maps.</para>
</step><step id="rfsadmin-step-141"><para>Using the <command>nistbladm</command> command, make your changes
to the indirect map.  </para><para>See the <olink targetdoc="sysadv7" remap="external"><citetitle remap="book">System Administration Guide: Naming and Directory Services (NIS+)</citetitle></olink>.
Note that the change becomes effective the next time that the map is used,
which is the next time a mount is performed.</para>
</step>
</procedure>
</task><task id="rfsadmin-142"><title>How to Modify Direct Maps</title><procedure><step id="rfsadmin-step-212"><para>Log in as a user who has permissions to
change the maps.</para>
</step><step id="rfsadmin-step-144"><para>Using the <command>nistbladm</command> command, add or delete
your changes to the direct map.  </para><para>See the <olink targetdoc="sysadv7" remap="external"><citetitle remap="book">System Administration Guide: Naming and Directory Services (NIS+)</citetitle></olink>.</para>
</step><step id="rfsadmin-step-145"><para>If you added or deleted a mount-point entry in the previous step,
run the <command>automount</command> command.</para>
</step><step id="rfsadmin-step-146"><para>Notify your users of the changes. </para><para>Notification is required so that the users can also run the <command>automount</command> command as superuser on their own computers.</para><note><para>If you only modify or change the contents of an existing direct
map entry, you do not need to run the <command>automount</command> command. </para>
</note><para>For example, suppose you modify the <filename>auto_direct</filename> map
so that the <filename>/usr/src</filename> directory is now mounted from a
different server. If <filename>/usr/src</filename> is not mounted at this
time, the new entry becomes effective immediately when you try to access <filename>/usr/src</filename>. If <filename>/usr/src</filename> is mounted now, you
can wait until the auto-unmounting occurs, then access the file. </para><note><para>Use indirect maps whenever possible. Indirect maps are easier
to construct and less demanding on the computers' file systems. Also, indirect
maps do not occupy as much space in the mount table as direct maps.</para>
</note>
</step>
</procedure>
</task><sect2 id="rfsadmin-147"><title>Avoiding Mount-Point Conflicts</title><para>If you have a local disk partition that is mounted on <filename>/src</filename> and
you plan to use the autofs service to mount other source directories, you
might encounter a problem. If you specify the mount point <filename>/src</filename>,
the NFS service hides the local partition whenever you try to reach it.   </para><para>You need to mount the partition in some other location, for example,
on <filename>/export/src</filename>. You then need an entry in <filename>/etc/vfstab</filename> such as the following:</para><screen><command>/dev/dsk/d0t3d0s5 /dev/rdsk/c0t3d0s5 /export/src ufs 3 yes -</command> </screen><para>You also need this entry in <filename>auto_src</filename>: </para><screen>terra		terra:/export/src </screen><para><literal>terra</literal> is the name of the computer.</para>
</sect2><sect2 id="rfsadmin-148"><title>Accessing Non-NFS File Systems</title><para>Autofs can also mount files other than NFS files. Autofs mounts
files on removable media, such as diskettes or CD-ROM. Normally, you would
mount files on removable media by using the Volume Manager. The following
examples show how this mounting could be accomplished through autofs. The
Volume Manager and autofs do not work together, so these entries would not
be used without first deactivating the Volume Manager.  </para><para>Instead of mounting a file system from a server, you put the media in
the drive and reference the file system from the map. If you plan to access
non-NFS file systems and you are using autofs, see the following procedures.</para>
</sect2><task id="rfsadmin-149"><title>How to Access CD-ROM Applications With Autofs</title><tasksummary><note><para>Use this procedure if you are <emphasis>not</emphasis> using Volume
Manager. </para>
</note>
</tasksummary><procedure>&rolestepA;<step id="rfsadmin-step-151"><para>Update the autofs map.</para><para>Add
an entry for the CD-ROM file system, which should resemble the following:</para><screen>hsfs     -fstype=hsfs,ro     :/dev/sr0</screen><para>The CD-ROM device that you intend to mount must appear as a name
that follows the colon.</para>
</step>
</procedure>
</task><task id="rfsadmin-152"><title>How to Access PC-DOS Data Diskettes With Autofs</title><tasksummary><note><para>Use this procedure if you are <emphasis>not</emphasis> using Volume
Manager.   </para>
</note>
</tasksummary><procedure>&rolestepA;<step id="rfsadmin-step-154"><para>Update the autofs map.</para><para>Add an entry for the diskette file system such as the following:</para><screen> pcfs     -fstype=pcfs     :/dev/diskette</screen>
</step>
</procedure>
</task><sect2 id="rfsadmin-155"><title>Accessing NFS File Systems Using CacheFS</title><para>The cache file system (CacheFS) is a generic nonvolatile caching
mechanism. CacheFS improves the performance of certain file systems by utilizing
a small, fast local disk. For example, you can improve the performance of
the NFS environment by using CacheFS.</para><para>CacheFS works differently with different versions of NFS. For example,
if both the client and the back file system are running NFS version 2 or version
3, the files are cached in the front file system for access by the client.
However, if both the client and the server are running NFS version 4, the
functionality is as follows. When the client makes the initial request to
access a file from a CacheFS file system, the request bypasses the front (or
cached) file system and goes directly to the back file system. With NFS version
4, files are no longer cached in a front file system.  All file access is
provided by the back file system.  Also, since no files are being cached in
the front file system, CacheFS-specific mount options, which are meant to
affect the front file system, are ignored.  CacheFS-specific mount options
do not apply to the back file system.</para><note><para>The first time you configure your system for NFS version 4, a
warning appears on the console to indicate that caching is no longer performed.</para>
</note>
</sect2><task id="rfsadmin-156"><title>How to Access NFS File Systems by Using CacheFS</title><procedure>&rolestepA;<step id="rfsadmin-step-158"><para>Run the <command>cfsadmin</command> command to create a cache
directory on the local disk. </para><screen># <userinput>cfsadmin -c /var/cache</userinput></screen>
</step><step id="rfsadmin-step-159"><para>Add the <literal>cachefs</literal> entry
to the appropriate automounter map.</para><para>For example, adding this entry to the master map caches all home
directories:</para><screen>/home auto_home -fstype=cachefs,cachedir=/var/cache,backfstype=nfs</screen><para>Adding this entry to the <filename>auto_home</filename> map only caches
the home directory for the user who is named <literal>rich</literal>:</para><screen>rich -fstype=cachefs,cachedir=/var/cache,backfstype=nfs dragon:/export/home1/rich</screen><note><para>Options that are included in maps that are searched later override
options which are set in maps that are searched earlier. The last options
that are found are the ones that are used. In the previous example, an additional
entry to the <filename>auto_home</filename> map only needs to include the
options in the master maps if some options required changes. </para>
</note>
</step>
</procedure>
</task><sect2 id="rfsadmin-160"><title>Customizing the Automounter</title><para>You can set up the automounter maps in several ways. The following tasks
give details about how to customize the automounter maps to provide an easy-to-use
directory structure.</para>
</sect2><sect2 id="rfsadmin-161"><title>Setting Up a Common View of <filename>/home</filename></title><para>The ideal is for all network users to be able to locate their
own or anyone's home directory under <filename>/home</filename>. This view
should be common across all computers, whether client or server.   </para><para>Every Solaris installation comes with a master map: <filename>/etc/auto_master</filename>. </para><screen># Master map for autofs
#
+auto_master
/net     -hosts     -nosuid,nobrowse
/home    auto_home  -nobrowse</screen><para>A map for <filename>auto_home</filename> is also installed under <filename>/etc</filename>. </para><screen># Home directory map for autofs
#
+auto_home</screen><para>Except for a reference to an external <literal>auto_home</literal> map,
this map is empty. If the directories under <literal>/home</literal> are to
be common to all computers, do not modify this <filename>/etc/auto_home</filename> map.
All home directory entries should appear in the name service files, either
NIS or NIS+.</para><note><para>Users should not be permitted to run <literal>setuid</literal> executables
from their home directories. Without this restriction, any user could have
superuser privileges on any computer.</para>
</note>
</sect2><task id="rfsadmin-162"><title>How to Set Up <literal>/home</literal> With
Multiple Home Directory File Systems</title><procedure>&rolestepA;<step id="rfsadmin-step-164"><para>Install home directory partitions under <filename>/export/home</filename>.
   </para><para>If the system has several partitions, install the partitions
under separate directories, for example, <filename>/export/home1</filename> and <filename>/export/home2</filename>. </para>
</step><step id="rfsadmin-step-165"><para>Use the Solaris Management Console tools
to create and maintain the <filename>auto_home</filename> map. </para><para>Whenever
you create a new user account, type the location of the user's home directory
in the <filename>auto_home</filename> map. Map entries can be simple, for
example: </para><screen>rusty        dragon:/export/home1/&amp;
gwenda       dragon:/export/home1/&amp;
charles      sundog:/export/home2/&amp;
rich         dragon:/export/home3/&amp;</screen><para>Notice the use of the <command>&amp;</command> (ampersand) to substitute
the map key. The ampersand is an abbreviation for the second occurrence of <literal>rusty</literal> in the following example. </para><screen>rusty     	dragon:/export/home1/rusty</screen><para>With the <literal>auto_home</literal> map in place, users can refer
to any home directory (including their own) with the path <filename>/home/</filename><replaceable>user</replaceable>. <replaceable>user</replaceable> is their login name and
the key in the map. This common view of all home directories is valuable when
logging in to another user's computer. Autofs mounts your home directory for
you. Similarly, if you run a remote windowing system client on another computer,
the client program has the same view of the <filename>/home</filename> directory. </para><para>This common view also extends to the server. Using the previous
example, if <literal>rusty</literal> logs in to the server <literal>dragon</literal>,
autofs there provides direct access to the local disk by loopback-mounting <filename>/export/home1/rusty</filename> onto <filename>/home/rusty</filename>. </para><para>Users do not need to be aware of the real location of their home directories.
If <literal>rusty</literal> needs more disk space and needs to have his home
directory relocated to another server, a simple change is sufficient. You
need only change <literal>rusty</literal>'s entry in the <filename>auto_home</filename> map
to reflect the new location. Other users can continue to use the <filename>/home/rusty</filename> path.</para>
</step>
</procedure>
</task><task id="rfsadmin-166"><title>How to Consolidate Project-Related Files Under <literal>/ws</literal></title><tasksummary><para>Assume that you are the administrator of a large software development
project. You plan to make all project-related files available under a directory
that is called <filename>/ws</filename>. This directory is to be common across
all workstations at the site.    </para>
</tasksummary><procedure><step id="rfsadmin-step-168"><para>Add an entry for the <filename>/ws</filename> directory
to the site <filename>auto_master</filename> map, either NIS or NIS+. </para><screen>/ws     auto_ws     -nosuid </screen><para>The <filename>auto_ws</filename> map determines the contents of the <filename>/ws</filename> directory. </para>
</step><step id="rfsadmin-step-269"><para>Add the <command>-nosuid</command> option
as a precaution. </para><para>This option prevents users from running setuid
programs that might exist in any workspaces. </para>
</step><step id="rfsadmin-step-270"><para>Add entries to the <filename>auto_ws</filename> map.</para><para>The <filename>auto_ws</filename> map is organized so that each
entry describes a subproject. Your first attempt yields a map that resembles
the following: </para><screen>compiler   alpha:/export/ws/&amp;
windows    alpha:/export/ws/&amp;
files      bravo:/export/ws/&amp;
drivers    alpha:/export/ws/&amp;
man        bravo:/export/ws/&amp;
tools      delta:/export/ws/&amp;</screen><para>The ampersand (<command>&amp;</command>) at the end of each entry is
an abbreviation for the entry key. For instance, the first entry is equivalent
to the following: </para><screen>compiler		alpha:/export/ws/compiler </screen><para>This first attempt provides a map that appears simple, but the map is
inadequate. The project organizer decides that the documentation in the <filename>man</filename> entry should be provided as a subdirectory under each subproject.
Also, each subproject requires subdirectories to describe several versions
of the software. You must assign each of these subdirectories to an entire
disk partition on the server. </para><para>Modify the entries in the map as
follows:</para><screen>compiler \
    /vers1.0    alpha:/export/ws/&amp;/vers1.0 \
    /vers2.0    bravo:/export/ws/&amp;/vers2.0 \
    /man        bravo:/export/ws/&amp;/man
windows \
    /vers1.0    alpha:/export/ws/&amp;/vers1.0 \
    /man        bravo:/export/ws/&amp;/man
files \
    /vers1.0    alpha:/export/ws/&amp;/vers1.0 \
    /vers2.0    bravo:/export/ws/&amp;/vers2.0 \
    /vers3.0    bravo:/export/ws/&amp;/vers3.0 \
    /man        bravo:/export/ws/&amp;/man
drivers \
    /vers1.0    alpha:/export/ws/&amp;/vers1.0 \
    /man        bravo:/export/ws/&amp;/man
tools \
    /           delta:/export/ws/&amp;</screen><para>Although the map now appears to be much larger, the map still contains
only the five entries. Each entry is larger because each entry contains multiple
mounts. For instance, a reference to <filename>/ws/compiler</filename> requires
three mounts for the <filename>vers1.0</filename>, <filename>vers2.0</filename>,
and <filename>man</filename> directories. The backslash at the end of each
line informs autofs that the entry is continued onto the next line. Effectively,
the entry is one long line, though line breaks and some indenting have been
used to make the entry more readable. The <filename>tools</filename> directory
contains software development tools for all subprojects, so this directory
is not subject to the same subdirectory structure. The <filename>tools</filename> directory
continues to be a single mount. </para><para>This arrangement provides the
administrator with much flexibility. Software projects typically consume substantial
amounts of disk space. Through the life of the project, you might be required
to relocate and expand various disk partitions. If these changes are reflected
in the <filename>auto_ws</filename> map, the users do not need to be notified,
as the directory hierarchy under <filename>/ws</filename> is not changed. </para><para>Because the servers <literal>alpha</literal> and <literal>bravo</literal> view
the same autofs map, any users who log in to these computers can find the <filename>/ws</filename> namespace as expected. These users are provided with direct
access to local files through loopback mounts instead of NFS mounts. </para>
</step>
</procedure>
</task><task id="rfsadmin-171"><title>How to Set Up Different Architectures to Access
a Shared Namespace</title><tasksummary><para>You need to assemble a shared namespace for local executables,
and applications, such as spreadsheet applications and word-processing packages.
The clients of this namespace use several different workstation architectures
that require different executable formats. Also, some workstations are running
different releases of the operating system.  </para>
</tasksummary><procedure><step id="rfsadmin-step-173"><para>Create the <filename>auto_local</filename> map
with the <command>nistbladm</command> command. </para><para>See the <olink targetdoc="sysadv7" remap="external"><citetitle remap="book">System Administration Guide: Naming and Directory Services (NIS+)</citetitle></olink>.</para>
</step><step id="rfsadmin-step-174"><para>Choose a single, site-specific name for
the shared namespace.  This name makes the files and directories that belong
to this space easily identifiable. </para><para>For example, if you choose <filename>/usr/local</filename> as the name, the path <filename>/usr/local/bin</filename> is
obviously a part of this namespace. </para>
</step><step id="rfsadmin-step-175"><para>For ease of user community recognition,
create an autofs indirect map. Mount this map at <filename>/usr/local</filename>.
Set up the following entry in the NIS+ (or NIS) <filename>auto_master</filename> map: </para><screen>/usr/local     auto_local     -ro</screen><para>Notice that the <option>ro</option> mount option implies that clients
cannot write to any files or directories. </para>
</step><step id="rfsadmin-step-176"><para>Export the appropriate directory on the
server. </para>
</step><step id="rfsadmin-step-177"><para>Include a <filename>bin</filename> entry
in the auto_local map. </para><para>Your directory structure resembles the
following: </para><screen> bin     aa:/export/local/bin </screen>
</step><step performance="optional" id="rfsadmin-step-178"><para>To serve clients
of different architectures, change the entry by adding the autofs <command>CPU</command> variable. </para><screen>bin     aa:/export/local/bin/$CPU </screen><itemizedlist><listitem><para>For SPARC clients &ndash; Place executables in <literal>/export/local/bin/sparc</literal>.</para>
</listitem><listitem><para>For x86 clients &ndash; Place executables in <literal>/export/local/bin/i386</literal>.</para>
</listitem>
</itemizedlist>
</step>
</procedure>
</task><task id="rfsadmin-179"><title>How to Support Incompatible Client Operating
System Versions</title><procedure><step id="rfsadmin-step-181"><para>Combine the architecture type with a variable that determines
the operating system type of the client.   </para><para>You can combine the
autofs <literal>OSREL</literal> variable with the <literal>CPU</literal> variable
to form a name that determines both CPU type and OS release. </para>
</step><step id="rfsadmin-step-182"><para>Create the following map entry. </para><screen>bin     aa:/export/local/bin/$CPU$OSREL</screen><itemizedlist><para>For clients that are running version 5.6 of the operating system, export
the following file systems:</para><listitem><para>For SPARC clients  &ndash; Export <literal>/export/local/bin/sparc5.6</literal>.</para>
</listitem><listitem><para>For x86 clients  &ndash; Place executables in <literal>/export/local/bin/i3865.6</literal>.</para>
</listitem>
</itemizedlist>
</step>
</procedure>
</task><task id="rfsadmin-183"><title>How to Replicate Shared Files Across Several
Servers</title><tasksummary><para>The best way to share replicated file systems that are read-only is
to use failover. See <olink targetptr="rfsrefer-51" remap="internal">Client-Side Failover</olink> for
a discussion of failover.</para>
</tasksummary><procedure>&rolestepA;<step id="rfsadmin-step-185"><para>Modify the entry in the autofs maps.</para><para>Create the list of all replica servers as a comma-separated list,
such as the following:     </para><screen><literal>bin     aa,bb,cc,dd:/export/local/bin/$CPU</literal></screen><para>Autofs chooses the nearest server. If a server has several network interfaces,
list each interface. Autofs chooses the nearest interface to the client, avoiding
unnecessary routing of NFS traffic. </para>
</step>
</procedure>
</task><task id="rfsadmin-186"><title>How to Apply Autofs Security Restrictions</title><procedure>&rolestepA;<step id="rfsadmin-step-188"><para>Create the following entry in the name service <filename>auto_master</filename> file,
either NIS or NIS+:  </para><screen><literal>/home     auto_home     -nosuid</literal></screen><para>The <option role="nodash">nosuid</option> option prevents users from
creating files with the <literal>setuid</literal> or <literal>setgid</literal> bit
set.</para><para>This entry overrides the entry for <filename>/home</filename> in
a generic local <filename>/etc/auto_master</filename> file. See the previous
example. The override happens because the <literal>+auto_master</literal> reference
to the external name service map occurs before the <filename>/home</filename> entry
in the file. If the entries in the <literal>auto_home</literal> map include
mount options, the <option role="nodash">nosuid</option> option is overwritten.
Therefore, either no options should be used in the <literal>auto_home</literal> map
or the <option role="nodash">nosuid</option> option must be included with
each entry.</para><note><para>Do not mount the home directory disk partitions on or under <literal>/home</literal> on the server.</para>
</note>
</step>
</procedure>
</task><task id="rfsadmin-189"><title>How to Use a Public File Handle With Autofs</title><procedure>&rolestepA;<step id="rfsadmin-step-191"><para>Create an entry in the autofs map such as the following:</para><screen>/usr/local     -ro,public    bee:/export/share/local</screen><para>The <option role="nodash">public</option> option forces the public handle
to be used. If the NFS server does not support a public file handle, the mount
fails.</para>
</step>
</procedure>
</task><task id="rfsadmin-192"><title>How to Use NFS URLs With Autofs</title><procedure>&rolestepA;<step id="rfsadmin-step-194"><para>Create an autofs entry such as the following:</para><screen>/usr/local     -ro    nfs://bee/export/share/local</screen><para>The service tries to use the public file handle on the NFS server. However,
 if the server does not support a public file handle, the MOUNT protocol is
used.</para>
</step>
</procedure>
</task><sect2 id="rfsadmin-195"><title>Disabling Autofs Browsability</title><para>Starting with the Solaris 2.6 release, the default version of <filename>/etc/auto_master</filename> that is installed has the <option>nobrowse</option> option
added to the entries for <literal>/home</literal> and <literal>/net</literal>.
In addition, the upgrade procedure  adds the <option>nobrowse</option> option
to the <literal>/home</literal> and <literal>/net</literal> entries in <filename>/etc/auto_master</filename> if these entries have not been modified. However,
you might have to make these changes manually or to turn off browsability
for site-specific autofs mount points after the installation.</para><para>You can turn off the browsability feature in several ways. Disable the
feature by using a command-line option to the <command>automountd</command> daemon,
which completely disables autofs browsability for the client. Or disable browsability
for each map entry on all clients by using the autofs maps in either an NIS
or NIS+ namespace. You can also disable the feature for each map entry on
each client, using local autofs maps if no network-wide namespace is being
used. </para>
</sect2><task id="rfsadmin-196"><title>How to Completely Disable Autofs Browsability
on a Single NFS Client</title><procedure><step id="rfsadmin-step-204"><para>Become superuser or assume an equivalent
role on the NFS client.</para><para>Roles contain authorizations and privileged
commands. For more information about roles, see <olink targetdoc="sysadv6" targetptr="rbactask-15" remap="external"><citetitle remap="section">Configuring RBAC (Task Map)</citetitle> in <citetitle remap="book">System Administration Guide: Security Services</citetitle></olink>. To configure a role with the Primary Administrator
profile, see <olink targetdoc="sysadv1" targetptr="smcover-1" remap="external">Chapter 2, <citetitle remap="chapter">Working With the Solaris Management Console (Tasks),</citetitle> in <citetitle remap="book">System Administration Guide: Basic Administration</citetitle></olink>.</para>
</step><step id="rfsadmin-step-252"><para>Edit the <filename>/etc/default/autofs</filename> file
to include the following keyword and value.</para><screen>AUTOMOUNTD_NOBROWSE=TRUE</screen>
</step><step id="rfsadmin-step-199"><para>Restart the autofs service. </para><screen># <userinput>svcadm restart system/filesystem/autofs</userinput></screen>
</step>
</procedure>
</task><task id="rfsadmin-200"><title>How to Disable Autofs Browsability for All
Clients</title><tasksummary><para>To disable browsability for all clients, you must employ a name service
such as NIS or NIS+. Otherwise, you need to manually edit the automounter
maps on each client. In this example, the browsability of the <filename>/home</filename> directory
is disabled. You must follow this procedure for each indirect autofs node
that needs to be disabled.</para>
</tasksummary><procedure><step id="rfsadmin-step-202"><para>Add the <option>nobrowse</option> option
to the <literal>/home</literal> entry in the name service <filename>auto_master</filename> file. </para><screen><userinput>/home     auto_home     -nobrowse</userinput></screen>
</step><step id="rfsadmin-step-203"><para>Run the <command>automount</command> command
on all clients.</para><para>The new behavior becomes effective after you run
the <command>automount</command> command on the client systems or after a
reboot.</para><screen># <userinput>/usr/sbin/automount</userinput></screen>
</step>
</procedure>
</task><task id="rfsadmin-204"><title>How to Disable Autofs Browsability on a Selected
File System</title><tasksummary><para>In this example, browsability of the <filename>/net</filename> directory
is disabled. You can use the same procedure for <literal>/home</literal> or
any other autofs mount points.</para>
</tasksummary><procedure><step id="rfsadmin-step-206"><para>Check the <literal>automount</literal> entry
in <filename>/etc/nsswitch.conf</filename>.</para><para>For local file entries
to have precedence, the entry in the name service switch file should list <literal>files</literal> before the name service. For example:</para><screen>automount:  files nisplus</screen><para>This entry shows the default configuration in a standard Solaris installation.</para>
</step><step id="rfsadmin-step-207"><para>Check the position of the <literal>+auto_master</literal> entry in <filename>/etc/auto_master</filename>.</para><para>For
additions to the local files to have precedence over the entries in the namespace,
the <literal>+auto_master</literal> entry must be moved to follow <literal>/net</literal>:</para><screen># Master map for automounter
#
/net    -hosts     -nosuid
/home   auto_home
/xfn    -xfn
<userinput>+auto_master</userinput></screen><para>A standard configuration places the <literal>+auto_master</literal> entry
at the top of the file. This placement prevents any local changes from being
used.</para>
</step><step id="rfsadmin-step-208"><para>Add the <option role="nodash">nobrowse</option> option
to the <literal>/net</literal> entry in the <filename>/etc/auto_master</filename> file. </para><screen>/<literal>net     -hosts     -nosuid,</literal><userinput>nobrowse</userinput></screen>
</step><step id="rfsadmin-step-209"><para>On all clients, run the <command>automount</command> command.</para><para>The new behavior becomes effective after running the <command>automount</command> command on the client systems or after a reboot.</para><screen># <userinput>/usr/sbin/automount</userinput></screen>
</step>
</procedure>
</task>
</sect1><sect1 id="rfsadmin-214"><title>Strategies for NFS Troubleshooting</title><para>When tracking an NFS problem, remember the main points of possible
failure: the server, the client, and the network. The strategy that is outlined
in this section tries to isolate each individual component to find the one
that is not working. In all situations, the <command>mountd</command> and <command>nfsd</command> daemons must be running on the server for remote mounts to
succeed.</para><para>The <option>intr</option> option is set by default for all mounts.
If a program hangs with a <literal>server not responding</literal> message,
you can kill the program with the keyboard interrupt Control-c.</para><para>When the network or server has problems, programs that access hard-mounted
remote files fail differently than those programs that access soft-mounted
remote files. Hard-mounted remote file systems cause the client's kernel to
retry the requests until the server responds again. Soft-mounted remote file
systems cause the client's system calls to return an error after trying for
awhile. Because these errors can result in unexpected application errors and
data corruption, avoid soft mounting.</para><para>When a file system is hard mounted, a program that tries to access
the file system hangs if the server fails to respond. In this situation, the
NFS system displays the following message on the console: </para><screen>NFS server <replaceable>hostname</replaceable> not responding still trying</screen><para>When the server finally responds, the following message appears on the
console: </para><screen>NFS server <replaceable>hostname</replaceable> ok</screen><para>A program that accesses a soft-mounted file system whose server is not
responding generates the following message:</para><screen>NFS <replaceable>operation</replaceable> failed for server <replaceable>hostname</replaceable>: error # (<replaceable>error-message</replaceable>)</screen><note><para>Because of possible errors, do not soft-mount file systems with
read-write data or file systems from which executables are run. Writable data
could be corrupted if the application ignores the errors. Mounted executables
might not load properly and can fail. </para>
</note>
</sect1><sect1 id="rfsadmin-215"><title>NFS Troubleshooting Procedures</title><itemizedlist><para>To determine where the NFS service has failed, you need to follow several
procedures to isolate the failure. Check for the following items:</para><listitem><para>Can the client reach the server?</para>
</listitem><listitem><para>Can the client contact the NFS services on the server?</para>
</listitem><listitem><para>Are the NFS services running on the server?</para>
</listitem>
</itemizedlist><para>In the process of checking these items, you might notice that
other portions of the network are not functioning. For example, the name service
or the physical network hardware might not be functioning. The <olink targetdoc="sysadv5" remap="external"><citetitle remap="book">System Administration Guide: Naming and Directory Services (DNS, NIS, and LDAP)</citetitle></olink> contains debugging
procedures for several name services. Also, during the process you might see
that the problem is not at the client end. An example is if you get at least
one trouble call from every subnet in your work area. In this situation, you
should  assume that the problem is the server or the network hardware near
the server. So, you should  start the debugging process at the server, not
at the client.   </para><task id="rfsadmin-216"><title>How to Check Connectivity on an NFS Client</title><procedure><step id="rfsadmin-step-785"><para>Check that the NFS server is reachable from the client. On the
client, type the following command.</para><screen>% <userinput>/usr/sbin/ping bee</userinput>
bee is alive</screen><para>If the command reports that the server is alive, remotely check the
NFS server. See <olink targetptr="rfsadmin-224" remap="internal">How to Check the NFS Server
Remotely</olink>.</para>
</step><step id="rfsadmin-step-786"><para>If the server is not reachable from the
client, ensure that the local name service is running. </para><para>For NIS+
clients, type the following:</para><screen>% <userinput>/usr/lib/nis/nisping -u</userinput>
Last updates for directory eng.acme.com. :
Master server is eng-master.acme.com.
        Last update occurred at Mon Jun  5 11:16:10 1995

Replica server is eng1-replica-58.acme.com.
        Last Update seen was Mon Jun  5 11:16:10 1995</screen>
</step><step id="rfsadmin-step-787"><para>If the name service is running, ensure
that the client has received the correct host information by typing the following:</para><screen>% <userinput>/usr/bin/getent hosts bee</userinput>
129.144.83.117	bee.eng.acme.com</screen>
</step><step id="rfsadmin-step-221"><para>If the host information is correct, but
the server is not reachable from the client, run the <command>ping</command> command
from another client.</para><para>If the command run from a second client fails,
see <olink targetptr="rfsadmin-231" remap="internal">How to Verify the NFS Service on the Server</olink>.</para>
</step><step id="rfsadmin-step-788"><para>If the server is reachable from the second
client, use <command>ping</command> to check connectivity of the first client
to other systems on the local net.</para><para>If this command fails, check
the networking software configuration on the client, for example, <filename>/etc/netmasks</filename> and <filename>/etc/nsswitch.conf</filename>.</para>
</step><step performance="optional" id="rfsadmin-step-231"><para>Check the output
of the <command>rpcinfo</command> command.</para><para>If the <command>rpcinfo</command> command
does not display <literal>program 100003 version 4 ready and waiting</literal>,
then NFS version 4 is not enabled on the server. See <olink targetptr="rfsadmin-tbl-196" remap="internal">Table 5&ndash;3</olink> for information about
enabling NFS version 4.</para>
</step><step id="rfsadmin-step-789"><para>If the software is correct, check the networking
hardware.</para><para>Try to move the client onto a second net drop.</para>
</step>
</procedure>
</task><task id="rfsadmin-224"><title>How to Check the NFS Server Remotely</title><tasksummary><para>Note that support for both the UDP and the MOUNT protocols is not necessary
if you are using an NFS version 4 server.</para>
</tasksummary><procedure><step id="rfsadmin-step-226"><para>Check that the NFS services have started
on the NFS server by typing the following command:</para><screen>% <userinput>rpcinfo -s bee|egrep 'nfs|mountd'</userinput>
 100003  3,2    tcp,udp,tcp6,upd6                nfs     superuser
 100005  3,2,1  ticots,ticotsord,tcp,tcp6,ticlts,udp,upd6  mountd  superuser</screen><para>If the daemons have not been started, see <olink targetptr="rfsadmin-240" remap="internal">How
to Restart NFS Services</olink>.</para>
</step><step id="rfsadmin-step-275"><para>Check that the server's <command>nfsd</command> processes
are responding. </para><para>On the client, type the following command to test the UDP NFS
connections from the server.  </para><screen>% <userinput>/usr/bin/rpcinfo -u bee nfs</userinput>
program 100003 version 2 ready and waiting
program 100003 version 3 ready and waiting</screen><note><para>NFS version 4 does not support UDP.</para>
</note><para>If the server is running, it prints a list of program and version numbers.
Using the <option>t</option> option tests the TCP connection. If this command
fails, proceed to <olink targetptr="rfsadmin-231" remap="internal">How to Verify the NFS Service
on the Server</olink>.</para>
</step><step id="rfsadmin-step-228"><para>Check that the server's <command>mountd</command> is responding,
by typing the following command.</para><screen>% <userinput>/usr/bin/rpcinfo -u bee mountd</userinput>
program 100005 version 1 ready and waiting
program 100005 version 2 ready and waiting
program 100005 version 3 ready and waiting</screen><para>If the server is running, it prints a list of program and version numbers
that are associated with the UDP protocol. Using the <option>t</option> option
tests the TCP connection. If either attempt fails, proceed to <olink targetptr="rfsadmin-231" remap="internal">How to Verify the NFS Service on the Server</olink>.</para>
</step><step id="rfsadmin-step-276"><para>Check the local autofs service if it is
being used:</para><screen>% <userinput>cd /net/wasp</userinput></screen><para>Choose a <filename>/net</filename> or <filename>/home</filename> mount
point that you know should work properly. If this command fails, then as <literal>root</literal> on the client, type the following to restart the autofs service:</para><screen># <userinput>svcadm restart system/filesystem/autofs</userinput></screen>
</step><step id="rfsadmin-step-277"><para>Verify that file system is shared as expected
on the server.</para><screen>% <userinput>/usr/sbin/showmount -e bee</userinput>
/usr/src										eng
/export/share/man						(everyone)</screen><para>Check the entry on the server and the local mount entry for errors.
Also, check the namespace. In this instance, if the first client is not in
the <literal>eng</literal> netgroup, that client cannot mount the <filename>/usr/src</filename> file system.</para><para>Check all entries that include mounting
information in all the local files. The list includes <filename>/etc/vfstab</filename> and
all the <filename>/etc/auto_*</filename> files.</para>
</step>
</procedure>
</task><task id="rfsadmin-231"><title>How to Verify the NFS Service on the Server</title><procedure>&rolestepA;<step id="rfsadmin-step-234"><para>Check that the server can reach the clients. </para><screen># <userinput>ping lilac</userinput>
lilac is alive</screen>
</step><step id="rfsadmin-step-235"><para>If the client is not reachable from the
server, ensure that the local name service is running. For NIS+ clients, type
the following:</para><screen>% <userinput>/usr/lib/nis/nisping -u</userinput>
Last updates for directory eng.acme.com. :
Master server is eng-master.acme.com.
        Last update occurred at Mon Jun  5 11:16:10 1995

Replica server is eng1-replica-58.acme.com.
        Last Update seen was Mon Jun  5 11:16:10 1995</screen>
</step><step id="rfsadmin-step-236"><para>If the name service is running, check the
networking software configuration on the server, for example, <filename>/etc/netmasks</filename> and <filename>/etc/nsswitch.conf</filename>.</para>
</step><step id="rfsadmin-step-239"><para>Type the following command to check whether the <command>rpcbind</command> daemon
is running. </para><screen># <userinput>/usr/bin/rpcinfo -u localhost rpcbind</userinput>
program 100000 version 1 ready and waiting
program 100000 version 2 ready and waiting
program 100000 version 3 ready and waiting</screen><para>If the server is running, it prints a list of program and version
numbers that are associated with the UDP protocol. If <command>rpcbind</command> seems
to be hung, either reboot the server or follow the steps in <olink targetptr="rfsadmin-243" remap="internal">How to Warm-Start rpcbind</olink>. </para>
</step><step id="rfsadmin-step-237"><para>Type the following command to check whether the <command>nfsd</command> daemon
is running.  </para><screen># <userinput>rpcinfo -u localhost nfs</userinput>
program 100003 version 2 ready and waiting
program 100003 version 3 ready and waiting
# <userinput>ps -ef | grep nfsd</userinput>
root    232      1  0  Apr 07     ?     0:01 /usr/lib/nfs/nfsd -a 16
root   3127   2462  1  09:32:57  pts/3  0:00 grep nfsd</screen><note><para>NFS version 4 does not support UDP.</para>
</note><para>If the server is running, it prints a list of program and version numbers
that are associated with the UDP protocol. Also use the <option>t</option> option
with <command>rpcinfo</command> to check the TCP connection. If these commands
fail, restart the NFS service. See <olink targetptr="rfsadmin-240" remap="internal">How to
Restart NFS Services</olink>. </para>
</step><step id="rfsadmin-step-238"><para>Type the following command to check whether the <command>mountd</command> daemon
is running.    </para><screen># <userinput>/usr/bin/rpcinfo -u localhost mountd</userinput>
program 100005 version 1 ready and waiting
program 100005 version 2 ready and waiting
program 100005 version 3 ready and waiting
# <userinput>ps -ef | grep mountd</userinput>
root    145      1 0 Apr 07  ?     21:57 /usr/lib/autofs/automountd
root    234      1 0 Apr 07  ?     0:04  /usr/lib/nfs/mountd
root   3084 2462 1 09:30:20 pts/3  0:00  grep mountd</screen><para>If the server is running, it prints a list of program and version numbers
that are associated with the UDP protocol. Also use the <option>t</option> option
with <command>rpcinfo</command> to check the TCP connection. If these commands
fail, restart the NFS service. See <olink targetptr="rfsadmin-240" remap="internal">How to
Restart NFS Services</olink>. </para>
</step>
</procedure>
</task><task id="rfsadmin-240"><title>How to Restart NFS Services</title><procedure>&rolestepA;<step id="rfsadmin-step-242"><para>Restart the NFS service on the server.</para><para>Type the following command.</para><screen># <userinput>svcadm restart network/nfs/server</userinput></screen>
</step>
</procedure>
</task><task id="rfsadmin-243"><title>How to Warm-Start <command>rpcbind</command></title><tasksummary><para>If the NFS server cannot be rebooted because of work in progress,
you can restart <command>rpcbind</command> without having to restart all of
the services that use RPC. Just complete a warm start by following these steps.</para>
</tasksummary><procedure>&rolestepA;<step id="rfsadmin-step-245"><para>Determine the PID for <command>rpcbind</command>.</para><para>Run <command>ps</command> to get the PID, which is the value
in the second column.</para><screen># <userinput>ps -ef |grep rpcbind</userinput>
    root   115     1  0   May 31 ?        0:14 /usr/sbin/rpcbind
    root 13000  6944  0 11:11:15 pts/3    0:00 grep rpcbind</screen>
</step><step id="rfsadmin-step-246"><para>Send a SIGTERM signal to the <command>rpcbind</command> process.</para><para>In this example, <literal>term</literal> is the signal that is
to be sent and <literal>115</literal> is the PID for the program (see the <olink targetdoc="refman1" targetptr="kill-1" remap="external"><citerefentry><refentrytitle>kill</refentrytitle><manvolnum>1</manvolnum></citerefentry></olink> man page). This command causes <command>rpcbind</command> to create a list of the current registered services in <filename>/tmp/portmap.file</filename> and <filename>/tmp/rpcbind.file</filename>.</para><screen># <userinput>kill -s term 115</userinput></screen><note><para>If you do not kill the <command>rpcbind</command> process with
the <option>s</option> <literal>term</literal> option, you cannot complete
a warm start of <filename>rpcbind</filename>. You must reboot the server to
restore service.</para>
</note>
</step><step id="rfsadmin-step-247"><para>Restart <command>rpcbind</command>.</para><para>Warm-restart the command so that the files that were created by the <command>kill</command> command are consulted. A warm start also ensures that the process
resumes without requiring a restart of all the RPC services. See the <olink targetdoc="refman1m" targetptr="rpcbind-1m" remap="external"><citerefentry><refentrytitle>rpcbind</refentrytitle><manvolnum>1M</manvolnum></citerefentry></olink> man page.</para><screen># <userinput>/usr/sbin/rpcbind -w</userinput></screen>
</step>
</procedure>
</task><sect2 id="rfsadmin-248"><title>Identifying Which Host Is Providing NFS File
Service</title><para>Run the <command>nfsstat</command> command with the <option>m</option> option
to gather current NFS information. The name of the current server is printed
after &ldquo;<literal>currserver=</literal>&rdquo;. </para><screen>% <userinput>nfsstat -m</userinput>
/usr/local from bee,wasp:/export/share/local
 Flags: vers=3,proto=tcp,sec=sys,hard,intr,llock,link,synlink,
		acl,rsize=32768,wsize=32678,retrans=5
 Failover: noresponse=0, failover=0, remap=0, currserver=bee</screen>
</sect2><task id="rfsadmin-251"><title>How to Verify Options Used With the <command>mount</command> Command</title><tasksummary><para>In the Solaris 2.6 release and in any versions of the <command>mount</command> command
that were patched after the 2.6 release, no warning is issued for invalid
options. The following procedure helps determine whether the options that
were supplied either on the command line or through <filename>/etc/vfstab</filename> were
valid.</para><para>For this example, assume that the following command has been run:</para><screen># <userinput>mount -F nfs -o ro,vers=2 bee:/export/share/local /mnt</userinput></screen>
</tasksummary><procedure><step id="rfsadmin-step-253"><para>Verify the options by running the following
command.</para><screen>% <userinput>nfsstat -m</userinput>
/mnt from bee:/export/share/local
Flags:  vers=2,proto=tcp,sec=sys,hard,intr,dynamic,acl,rsize=8192,wsize=8192,
        retrans=5</screen><para>The file system from <literal>bee</literal> has been mounted with the
protocol version set to <literal>2</literal>. Unfortunately, the <command>nfsstat</command> command does not display information about all of the options.
However, using the <command>nfsstat</command> command is the most accurate
way to verify the options.</para>
</step><step id="rfsadmin-step-254"><para>Check the entry in <filename>/etc/mnttab</filename>.</para><para>The <command>mount</command> command does not allow invalid options
to be added to the mount table. Therefore, verify that the options that are
listed in the file match those options that are listed on the command line.
In this way, you can check those options that are not reported by the <command>nfsstat</command> command.</para><screen># <userinput>grep bee /etc/mnttab</userinput>
bee:/export/share/local /mnt nfs	ro,vers=2,dev=2b0005e 859934818</screen>
</step>
</procedure>
</task>
</sect1><sect1 id="rfsadmin-210"><title>Troubleshooting Autofs</title><para>Occasionally, you might encounter problems with autofs. This section
should improve the problem-solving process. The section is divided into two
subsections.   </para><itemizedlist><para>This section presents a list of the error messages that autofs generates.
The list is divided into two parts: </para><listitem><para>Error messages that are generated by the verbose (<option>v</option>)
option of <command>automount</command></para>
</listitem><listitem><para>Error messages that might appear at any time</para>
</listitem>
</itemizedlist><para>Each error message is followed by a description and probable cause of
the message. </para><para>When troubleshooting, start the autofs programs with the verbose (<option>v</option>) option. Otherwise, you might experience problems without knowing
the cause.</para><para>The following paragraphs are labeled with the error message you are
likely to see if autofs fails, and a description of the possible problem. </para><sect2 id="rfsadmin-211"><title>Error Messages Generated by <filename>automount</filename> <option>v</option></title><msgset><simplemsgentry><msgtext><para>bad key <replaceable>key</replaceable> in direct map <replaceable>mapname</replaceable>    </para>
</msgtext><msgexplan role="description"><para>While scanning a direct map, autofs has
found an entry key without a prefixed /. </para>
</msgexplan><msgexplan role="solution"><para>Keys in direct maps must be full path names. </para>
</msgexplan>
</simplemsgentry><simplemsgentry><msgtext><para>bad key <replaceable>key</replaceable> in indirect map <replaceable>mapname</replaceable> </para>
</msgtext><msgexplan role="description"><para>While scanning an indirect map, autofs
has found an entry key that contains a <literal>/</literal>. </para>
</msgexplan><msgexplan role="solution"><para>Indirect map keys must be simple names, not
path names. </para>
</msgexplan>
</simplemsgentry><simplemsgentry><msgtext><para>can't mount <replaceable>server</replaceable>:<replaceable>pathname:
reason</replaceable> </para>
</msgtext><msgexplan role="description"><para>The mount daemon on the server refuses
to provide a file handle for <replaceable>server</replaceable>:<replaceable>pathname</replaceable>. </para>
</msgexplan><msgexplan role="solution"><para>Check the export table on the server.</para>
</msgexplan>
</simplemsgentry><simplemsgentry><msgtext><para>couldn't create mount point <replaceable>mountpoint</replaceable>: <replaceable>reason</replaceable> </para>
</msgtext><msgexplan role="description"><para>Autofs was unable to create a mount point
that was required for a mount. This problem most frequently occurs when you
attempt to hierarchically mount all of a server's exported file systems. </para>
</msgexplan><msgexplan role="solution"><para>A required mount point can exist only in
a file system that cannot be mounted, which means the file system cannot be
exported. The mount point cannot be created because the exported parent file
system is exported read-only. </para>
</msgexplan>
</simplemsgentry><simplemsgentry><msgtext><para>leading space in map entry <replaceable>entry</replaceable> text
in <replaceable>mapname</replaceable>  </para>
</msgtext><msgexplan role="description"><para>Autofs has discovered an entry in an automount
map that contains leading spaces. This problem is usually an indication of
an improperly continued map entry. For example: </para><screen>fake
/blat   		frobz:/usr/frotz </screen>
</msgexplan><msgexplan role="solution"><para>In this example, the warning is generated
when autofs encounters the second line because the first line should be terminated
with a backslash (<literal>\</literal>). </para>
</msgexplan>
</simplemsgentry><simplemsgentry><msgtext><para><replaceable>mapname</replaceable>: Not found </para>
</msgtext><msgexplan role="description"><para>The required map cannot be located. This
message is produced only when the <option>v</option> option is used. </para>
</msgexplan><msgexplan role="solution"><para>Check the spelling and path name of the map
name. </para>
</msgexplan>
</simplemsgentry><simplemsgentry><msgtext><para>remount <replaceable>server</replaceable>:<replaceable>pathname</replaceable> on <replaceable>mountpoint</replaceable>: server not responding</para>
</msgtext><msgexplan role="description"><para>Autofs has failed to remount a file system
that it previously unmounted.</para>
</msgexplan><msgexplan role="solution"><para>Contact Sun for assistance. This error message
is extremely rare and has no straightforward solution.</para>
</msgexplan>
</simplemsgentry><simplemsgentry><msgtext><para>WARNING: <replaceable>mountpoint</replaceable> already mounted
on</para>
</msgtext><msgexplan role="description"><para>Autofs is attempting to mount over an
existing mount point. This message means that an internal error occurred in
autofs (an anomaly).</para>
</msgexplan><msgexplan role="solution"><para>Contact Sun for assistance. This error message
is extremely rare and has no straightforward solution.</para>
</msgexplan>
</simplemsgentry>
</msgset>
</sect2><sect2 id="rfsadmin-212"><title>Miscellaneous Error Messages</title><msgset><simplemsgentry><msgtext><para>dir <replaceable>mountpoint</replaceable> must start with '/'</para>
</msgtext><msgexplan role="solution"><para>The automounter mount point must be given
as a full path name. Check the spelling and path name of the mount point. </para>
</msgexplan>
</simplemsgentry><simplemsgentry><msgtext><para>hierarchical mountpoint: <replaceable>pathname1</replaceable> and <replaceable>pathname2</replaceable> </para>
</msgtext><msgexplan role="solution"><para>Autofs does not allow its mount points to
have a hierarchical relationship. An autofs mount point must not be contained
within another automounted file system. </para>
</msgexplan>
</simplemsgentry><simplemsgentry><msgtext><para>host <replaceable>server</replaceable> not responding </para>
</msgtext><msgexplan role="description"><para>Autofs attempted to contact <replaceable>server</replaceable>, but received no response. </para>
</msgexplan><msgexplan role="solution"><para>Check the NFS server status.</para>
</msgexplan>
</simplemsgentry><simplemsgentry><msgtext><para><replaceable>hostname</replaceable>: exports: <replaceable>rpc-err</replaceable> </para>
</msgtext><msgexplan role="description"><para>An error occurred while getting the export
list from <replaceable>hostname</replaceable>. This message indicates a server
or network problem. </para>
</msgexplan><msgexplan role="solution"><para>Check the NFS server status.</para>
</msgexplan>
</simplemsgentry><simplemsgentry><msgtext><para>map <replaceable>mapname</replaceable>, key <replaceable>key</replaceable>:
bad </para>
</msgtext><msgexplan role="description"><para>The map entry is malformed, and autofs
cannot interpret the entry. </para>
</msgexplan><msgexplan role="solution"><para>Recheck the entry. Perhaps the entry has
characters that need to be escaped. </para>
</msgexplan>
</simplemsgentry><simplemsgentry><msgtext><para><replaceable>mapname</replaceable>: <replaceable>nis-err</replaceable> </para>
</msgtext><msgexplan role="description"><para>An error occurred when looking up an entry
in a NIS map. This message can indicate NIS problems. </para>
</msgexplan><msgexplan role="solution"><para>Check the NIS server status.</para>
</msgexplan>
</simplemsgentry><simplemsgentry><msgtext><para>mount of <replaceable>server</replaceable>:<replaceable>pathname</replaceable> on <replaceable>mountpoint:reason</replaceable></para>
</msgtext><msgexplan role="description"><para>Autofs failed to do a mount. This occurrence
 can indicate a server or network problem. The <replaceable>reason</replaceable> string
defines the problem.</para>
</msgexplan><msgexplan role="solution"><para>Contact Sun for assistance. This error message
is extremely rare and has no straightforward solution.</para>
</msgexplan>
</simplemsgentry><simplemsgentry><msgtext><para><replaceable>mountpoint</replaceable>: Not a directory</para>
</msgtext><msgexplan role="description"><para>Autofs cannot mount itself on <replaceable>mountpoint</replaceable> because it is not a directory. </para>
</msgexplan><msgexplan role="solution"><para>Check the spelling and path name of the mount
point.</para>
</msgexplan>
</simplemsgentry><simplemsgentry><msgtext><para>nfscast: cannot send packet: <replaceable>reason</replaceable></para>
</msgtext><msgexplan role="description"><para>Autofs cannot send a query packet to a
server in a list of replicated file system locations. The <replaceable>reason</replaceable> string
defines the problem.</para>
</msgexplan><msgexplan role="solution"><para>Contact Sun for assistance. This error message
is extremely rare and has no straightforward solution.</para>
</msgexplan>
</simplemsgentry><simplemsgentry><msgtext><para>nfscast: cannot receive reply: <replaceable>reason</replaceable> 
 </para>
</msgtext><msgexplan role="description"><para>Autofs cannot receive replies from any
of the servers in a list of replicated file system locations. The <replaceable>reason</replaceable> string defines the problem.</para>
</msgexplan><msgexplan role="solution"><para>Contact Sun for assistance. This error message
is extremely rare and has no straightforward solution.</para>
</msgexplan>
</simplemsgentry><simplemsgentry><msgtext><para>nfscast: select: <replaceable>reason</replaceable></para>
</msgtext><msgexplan role="description"><para>All these error messages indicate problems
in attempting to check servers for a replicated file system. This message
can indicate a network problem. The <replaceable>reason</replaceable> string
defines the problem.</para>
</msgexplan><msgexplan role="solution"><para>Contact Sun for assistance. This error message
is extremely rare and has no straightforward solution.</para>
</msgexplan>
</simplemsgentry><simplemsgentry><msgtext><para>pathconf: no info for <replaceable>server</replaceable><command>:</command><replaceable>pathname</replaceable></para>
</msgtext><msgexplan role="description"><para>Autofs failed to get <command>pathconf</command> information
for the path name. </para>
</msgexplan><msgexplan role="solution"><para>See the <olink targetdoc="refman2" targetptr="fpathconf-2" remap="external"><citerefentry><refentrytitle>fpathconf</refentrytitle><manvolnum>2</manvolnum></citerefentry></olink> man page.</para>
</msgexplan>
</simplemsgentry><simplemsgentry><msgtext><para><command>pathconf:</command> <replaceable>server</replaceable><command>: server not responding</command></para>
</msgtext><msgexplan role="description"><para>Autofs is unable to contact the mount
daemon on <replaceable>server</replaceable> that provides the information
to <function>pathconf</function>.</para>
</msgexplan><msgexplan role="solution"><para>Avoid using the <literal>POSIX</literal> mount
option with this server.</para>
</msgexplan>
</simplemsgentry>
</msgset>
</sect2><sect2 id="rfsadmin-213"><title>Other Errors With Autofs</title><para>If the <filename>/etc/auto*</filename> files have the execute bit set,
the automounter tries to execute the maps, which creates messages such as
the following:</para><para><command>/etc/auto_home: +auto_home: not found</command></para><para>In this situation, the <filename>auto_home</filename> file has incorrect
permissions. Each entry in the file generates an error message that is similar
to this message. The permissions to the file should be reset by typing the
following command:</para><screen># <userinput>chmod 644 /etc/auto_home</userinput></screen>
</sect2>
</sect1><sect1 id="rfsadmin-255"><title>NFS Error Messages</title><para>This section shows an error message that is followed by a description
of the conditions that should create the error and at minimum one remedy.</para><msgset><simplemsgentry><msgtext><para>Bad argument specified with index option
- must be a file</para>
</msgtext><msgexplan role="solution"><para>You must include a file name with the <option role="nodash">index</option> option.
You cannot use directory names.</para>
</msgexplan>
</simplemsgentry><simplemsgentry><msgtext><para>Cannot establish NFS service over /dev/<replaceable>tcp</replaceable>: transport setup problem</para>
</msgtext><msgexplan role="description"><para>This message is often created when the services information in
the namespace has not been updated. The message can also be reported for UDP. </para>
</msgexplan><msgexplan role="solution"><para>To fix this problem, you must update the
services data in the namespace. For NIS+, the entries should be as follows:</para><screen>nfsd nfsd tcp 2049 NFS server daemon
nfsd nfsd udp 2049 NFS server daemon</screen><para>For NIS and <filename>/etc/services</filename>, the entries should be
as follows:</para><screen>nfsd    2049/tcp    nfs    # NFS server daemon
nfsd    2049/udp    nfs    # NFS server daemon</screen>
</msgexplan>
</simplemsgentry><simplemsgentry><msgtext><para>Cannot use index option without public option</para>
</msgtext><msgexplan role="solution"><para>Include the <option role="nodash">public</option> option with
the <option role="nodash">index</option> option in the share command. You
must define the public file handle in order for the <option role="nodash">index</option> option
to work.</para><note><para>The Solaris 2.5.1 release required that the public file handle
be set by using the <command>share</command> command. A change in the Solaris
2.6  release sets the public file handle to be <filename>root</filename> (<literal>/</literal>) by default. This error message is no longer relevant.</para>
</note>
</msgexplan>
</simplemsgentry><simplemsgentry><msgtext><para>Could not start <replaceable>daemon</replaceable>: <replaceable>error</replaceable></para>
</msgtext><msgexplan role="description"><para>This message is displayed if the daemon
terminates abnormally or if a system call error occurs. The <replaceable>error</replaceable> string
defines the problem.</para>
</msgexplan><msgexplan role="solution"><para>Contact Sun for assistance. This error message
is rare and has no straightforward solution.</para>
</msgexplan>
</simplemsgentry><simplemsgentry><msgtext><para>Could not use public filehandle in request
to <replaceable>server</replaceable></para>
</msgtext><msgexplan role="description"><para>This message is displayed if the <option role="nodash">public</option> option
is specified but the NFS server does not support the public file handle. In
this situation, the mount fails. </para>
</msgexplan><msgexplan role="solution"><para>To remedy this situation, either try the
mount request without using the public file handle or reconfigure the NFS
server to support the public file handle.</para>
</msgexplan>
</simplemsgentry><simplemsgentry><msgtext><para><replaceable>daemon</replaceable> running already
with pid <replaceable>pid</replaceable></para>
</msgtext><msgexplan role="description"><para>The daemon is already running. </para>
</msgexplan><msgexplan role="solution"><para>If you want to run a new copy, kill the current
version and start a new version.</para>
</msgexplan>
</simplemsgentry><simplemsgentry><msgtext><para>error locking <replaceable>lock file</replaceable></para>
</msgtext><msgexplan role="description"><para>This message is displayed when the <replaceable>lock file</replaceable> that
is associated with a daemon cannot be locked properly.</para>
</msgexplan><msgexplan role="solution"><para>Contact Sun for assistance. This error message
is rare and has no straightforward solution.</para>
</msgexplan>
</simplemsgentry><simplemsgentry><msgtext><para>error checking <replaceable>lock file</replaceable>: <replaceable>error</replaceable></para>
</msgtext><msgexplan role="description"><para>This message is displayed when the <replaceable>lock file</replaceable> that
is associated with a daemon cannot be opened properly.</para>
</msgexplan><msgexplan role="solution"><para>Contact Sun for assistance. This error message
is rare and has no straightforward solution.</para>
</msgexplan>
</simplemsgentry><simplemsgentry><msgtext><para>NOTICE: NFS3: failing over from <replaceable>host1</replaceable> to <replaceable>host2</replaceable></para>
</msgtext><msgexplan role="description"><para>This message is displayed on the console when a failover occurs.
The message is advisory only.</para>
</msgexplan><msgexplan role="solution"><para>No action required.</para>
</msgexplan>
</simplemsgentry><simplemsgentry><msgtext><para><replaceable>filename</replaceable>: File too
large</para>
</msgtext><msgexplan role="description"><para>An NFS version 2 client is trying to access a file that is over
2 Gbytes.</para>
</msgexplan><msgexplan role="solution"><para>Avoid using NFS version 2. Mount the file
system with version 3 or version 4. Also, see the description of the <option role="nodash">nolargefiles</option> option in <olink targetptr="rfsrefer-16" remap="internal">mount
Options for NFS File Systems</olink>.</para>
</msgexplan>
</simplemsgentry><simplemsgentry><msgtext><para>mount: ... server not responding:RPC_PMAP_FAILURE
- RPC_TIMED_OUT</para>
</msgtext><msgexplan role="description"><para>The server that is sharing the file system you are trying to mount
is down or unreachable, at the wrong run level, or its <command>rpcbind</command> is
dead or hung.</para>
</msgexplan><msgexplan role="solution"><para>Wait for the server to reboot. If the server
is hung, reboot the server.</para>
</msgexplan>
</simplemsgentry><simplemsgentry><msgtext><para>mount: ... server not responding: RPC_PROG_NOT_REGISTERED</para>
</msgtext><msgexplan role="description"><para>The mount request registered with <command>rpcbind</command>,
but the NFS mount daemon <command>mountd</command> is not registered.    </para>
</msgexplan><msgexplan role="solution"><para>Wait for the server to reboot. If the server
is hung, reboot the server.</para>
</msgexplan>
</simplemsgentry><simplemsgentry><msgtext><para>mount: ... No such file or directory  </para>
</msgtext><msgexplan role="description"><para>Either the remote directory or the local directory does not exist.</para>
</msgexplan><msgexplan role="solution"><para>Check the spelling of the directory names.
Run <command>ls</command> on both directories. </para>
</msgexplan>
</simplemsgentry><simplemsgentry><msgtext><para>mount: ...: Permission denied</para>
</msgtext><msgexplan role="description"><para>Your computer name might not be in the list of clients or netgroup
that is allowed access to the file system you tried to mount.</para>
</msgexplan><msgexplan role="solution"><para>Use <command>showmount -e</command> to verify
the access list.</para>
</msgexplan>
</simplemsgentry><simplemsgentry><msgtext><para>NFS file temporarily unavailable on the server,
retrying ...</para>
</msgtext><msgexplan role="description"><para>An NFS version 4 server can delegate the
management of a file to a client. This message indicates that the server is
recalling a delegation for another client that conflicts with a request from
your client. </para>
</msgexplan><msgexplan role="solution"><para>The recall must occur before the server can
process your client's request. For more information about delegation, refer
to <olink targetptr="rfsrefer-140" remap="internal">Delegation in NFS Version 4</olink>.</para>
</msgexplan>
</simplemsgentry><simplemsgentry><msgtext><para>NFS fsstat failed for server <replaceable>hostname</replaceable>: RPC: Authentication error</para>
</msgtext><msgexplan role="description"><para>This error can be caused by many situations.
One of the most difficult situations to debug is when this problem occurs
because a user is in too many groups. Currently, a user can be in no more
than 16 groups if the user is accessing files through NFS mounts.</para>
</msgexplan><msgexplan role="solution"><para>An alternate does exist for users who need
to be in more than 16 groups. You can use access control lists to provide
the needed access privileges if you run at minimum the Solaris 2.5 release
on the NFS server and the NFS clients.</para>
</msgexplan>
</simplemsgentry><simplemsgentry><msgtext><para>nfs mount: ignoring invalid option &ldquo;<replaceable>-option</replaceable>&rdquo;</para>
</msgtext><msgexplan role="description"><para>The <replaceable>-option</replaceable> flag is not valid. </para>
</msgexplan><msgexplan role="solution"><para>Refer to the <olink targetdoc="refman1m" targetptr="mount-nfs-1m" remap="external"><citerefentry><refentrytitle>mount_nfs</refentrytitle><manvolnum>1M</manvolnum></citerefentry></olink> man page to verify the required
syntax.</para><note><para>This error message is not displayed when running any version of
the <command>mount</command> command that is included in a Solaris release
from  2.6 to the current release or in earlier versions that have been patched.</para>
</note>
</msgexplan>
</simplemsgentry><simplemsgentry><msgtext><para>nfs mount: NFS can't support &ldquo;nolargefiles&rdquo;</para>
</msgtext><msgexplan role="description"><para>An NFS client has attempted to mount a file system from an NFS
server by using the <option>nolargefiles</option> option. </para>
</msgexplan><msgexplan role="solution"><para>This option is not supported for NFS file
system types.</para>
</msgexplan>
</simplemsgentry><simplemsgentry><msgtext><para>nfs mount: NFS V2 can't support &ldquo;largefiles&rdquo;</para>
</msgtext><msgexplan role="description"><para>The NFS version 2 protocol cannot handle large files. </para>
</msgexplan><msgexplan role="solution"><para>You must use version 3 or version 4 if access
to large files is required.</para>
</msgexplan>
</simplemsgentry><simplemsgentry><msgtext><para>NFS server <replaceable>hostname</replaceable> not
responding still trying</para>
</msgtext><msgexplan role="description"><para>If programs hang while doing file-related work, your NFS server
might have failed. This message indicates that NFS server <replaceable>hostname</replaceable> is
down or that a problem has occurred with the server or the network.      
  </para>
</msgexplan><msgexplan role="solution"><para>If failover is being used, <replaceable>hostname</replaceable> is a list of servers. Start troubleshooting with <olink targetptr="rfsadmin-216" remap="internal">How to Check Connectivity on an NFS Client</olink>.</para>
</msgexplan>
</simplemsgentry><simplemsgentry><msgtext><para>NFS server recovering</para>
</msgtext><msgexplan role="description"><para>During part of the NFS version 4 server
reboot, some operations were not permitted. This message indicates that the
client is waiting for the server to permit this operation to proceed.</para>
</msgexplan><msgexplan role="solution"><para>No action required. Wait for the server to
permit the operation.</para>
</msgexplan>
</simplemsgentry><simplemsgentry><msgtext><para>Permission denied</para>
</msgtext><msgexplan role="description"><para>This message is displayed by the <command>ls</command> <option>l</option>, <command>getfacl</command>, and <command>setfacl</command> commands for  the following
reasons:</para><itemizedlist><listitem><para>If the user or group that exists in an access control list
(ACL) entry on an NFS version 4 server cannot be mapped to a valid user or
group on an NFS version 4 client, the user is not allowed to read the ACL
on the client.</para>
</listitem><listitem><para>If the user or group that exists in an ACL entry that is being
set on an NFS version 4 client cannot be mapped to a valid user or group on
an NFS version 4 server, the user is not allowed to write or modify an ACL
on the client.</para>
</listitem><listitem><para>If an NFS version 4 client and server have mismatched NFSMAPID_DOMAIN
values, ID mapping fails.</para>
</listitem>
</itemizedlist><para>For more information, see <olink targetptr="gande" remap="internal">ACLs and nfsmapid
in NFS Version 4</olink>.</para>
</msgexplan><msgexplan role="solution"><para>Do the following:</para><itemizedlist><listitem><para>Make sure that all user and group IDs in the ACL entries exist
on both the client and server.</para>
</listitem><listitem><para>Make sure that the value for NFSMAPID_DOMAIN is set correctly
in the <filename>/etc/default/nfs</filename> file. For more information, see <olink targetptr="rfsrefer-133" remap="internal">Keywords for the /etc/default/nfs File</olink>.</para>
</listitem>
</itemizedlist><para>To determine if any user or group cannot be mapped on the server or
client, use the script that is provided in <olink targetptr="gandj" remap="internal">Checking
for Unmapped User or Group IDs</olink>.</para>
</msgexplan>
</simplemsgentry><simplemsgentry><msgtext><para>port <replaceable>number</replaceable> in nfs
URL not the same as port <replaceable>number</replaceable> in port option</para>
</msgtext><msgexplan role="description"><para>The port number that is included in the
NFS URL must match the port number that is included with the <option>port</option> option
to mount. If the port numbers do not match, the mount fails. </para>
</msgexplan><msgexplan role="solution"><para>Either change the command to make the port
numbers identical or do not specify the port number that is incorrect. Usually,
you do not need to specify the port number with both the NFS URL and the <option>port</option> option.</para>
</msgexplan>
</simplemsgentry><simplemsgentry><msgtext><para>replicas must have the same version</para>
</msgtext><msgexplan role="description"><para>For NFS failover to function properly, the NFS servers that are
replicas must support the same version of the NFS protocol. </para>
</msgexplan><msgexplan role="solution"><para>Running multiple versions is not allowed.</para>
</msgexplan>
</simplemsgentry><simplemsgentry><msgtext><para>replicated mounts must be read-only</para>
</msgtext><msgexplan role="description"><para>NFS failover does not work on file systems that are mounted read-write.
Mounting the file system read-write increases the likelihood that a file could
change. </para>
</msgexplan><msgexplan role="solution"><para>NFS failover depends on the file systems
being identical.</para>
</msgexplan>
</simplemsgentry><simplemsgentry><msgtext><para>replicated mounts must not be soft</para>
</msgtext><msgexplan role="description"><para>Replicated mounts require that you wait for a timeout before failover
occurs. </para>
</msgexplan><msgexplan role="solution"><para>The <option role="nodash">soft</option> option
requires that the mount fail immediately when a timeout starts, so you cannot
include the <option>soft</option> option with a replicated mount.</para>
</msgexplan>
</simplemsgentry><simplemsgentry><msgtext><para>share_nfs: Cannot share more than one filesystem
with 'public' option</para>
</msgtext><msgexplan role="solution"><para>Check that the <filename>/etc/dfs/dfstab</filename> file has only
one file system selected to be shared with the <option>public</option> option.
Only one public file handle can be established per server, so only one file
system per server can be shared with this option.</para>
</msgexplan>
</simplemsgentry><simplemsgentry><msgtext><para>WARNING: No network locking on <replaceable>hostname</replaceable>:<replaceable>path</replaceable>:  contact admin to install
server change</para>
</msgtext><msgexplan role="description"><para>An NFS client has unsuccessfully attempted
to establish a connection with the network lock manager on an NFS server.
Rather than fail the mount, this warning is generated to warn you that locking
does not work.</para>
</msgexplan><msgexplan role="solution"><para>Upgrade the server with a new version of
the OS that provides complete lock manager support.</para>
</msgexplan>
</simplemsgentry>
</msgset>
</sect1>
</chapter>