JavaScript is required to for searching.
Skip Navigation Links
Exit Print View
Managing Network File Systems in Oracle Solaris 11.1     Oracle Solaris 11.1 Information Library
search filter icon
search icon

Document Information

Preface

1.  Managing Network File Systems (Overview)

2.  Network File System Administration (Tasks)

Automatic File System Sharing

How to Set Up Automatic File-System Sharing

How to Enable WebNFS Access

How to Enable NFS Server Logging

Mounting File Systems

How to Mount a File System at Boot Time

How to Mount a File System From the Command Line

Mounting With the Automounter

How to Mount All File Systems from a Server

How to Use Client-Side Failover

How to Disable Mount Access for One Client

How to Mount an NFS File System Through a Firewall

How to Mount an NFS File System Using an NFS URL

Setting up a DNS Record for a FedFS Server

How to Display Information About File Systems Available for Mounting

Setting Up NFS Services

How to Start the NFS Services

How to Stop the NFS Services

How to Start the Automounter

How to Stop the Automounter

How to Select Different Versions of NFS on a Server

How to Select Different Versions of NFS on a Client

How to Use the mount Command to Select Different Versions of NFS on a Client

Administering the Secure NFS System

How to Set Up a Secure NFS Environment With DH Authentication

WebNFS Administration Tasks

Planning for WebNFS Access

How to Browse Using an NFS URL

How to Enable WebNFS Access Through a Firewall

Task Overview for Autofs Administration

Task Map for Autofs Administration

Using SMF Parameters to Configure Your Autofs Environment

How to Configure Your Autofs Environment Using SMF Parameters

Administrative Tasks Involving Maps

Modifying the Maps

How to Modify the Master Map

How to Modify Indirect Maps

How to Modify Direct Maps

Avoiding Mount-Point Conflicts

Accessing Non-NFS File Systems

How to Access CD-ROM Applications With Autofs

How to Access PC-DOS Data Diskettes With Autofs

Customizing the Automounter

Setting Up a Common View of /home

How to Set Up /home With Multiple Home Directory File Systems

How to Consolidate Project-Related Files Under /ws

How to Set Up Different Architectures to Access a Shared Namespace

How to Support Incompatible Client Operating System Versions

How to Replicate Shared Files Across Several Servers

How to Apply Autofs Security Restrictions

How to Use a Public File Handle With Autofs

How to Use NFS URLs With Autofs

Disabling Autofs Browsability

How to Completely Disable Autofs Browsability on a Single NFS Client

How to Disable Autofs Browsability for All Clients

How to Disable Autofs Browsability on a Selected File System

Administering NFS Referrals

How to Create and Access an NFS Referral

How to Remove an NFS Referral

Administering FedFS

How to Create an Namespace Database (NSDB)

How to Use a Secured Connection to the NSDB

How to Create a FedFS Referral

Strategies for NFS Troubleshooting

NFS Troubleshooting Procedures

How to Check Connectivity on an NFS Client

How to Check the NFS Server Remotely

How to Verify the NFS Service on the Server

How to Restart NFS Services

Identifying Which Host Is Providing NFS File Service

How to Verify Options Used With the mount Command

Troubleshooting Autofs

Error Messages Generated by automount -v

Miscellaneous Error Messages

Other Errors With Autofs

NFS Error Messages

3.  Accessing Network File Systems (Reference)

Index

Mounting File Systems

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.

Table 2-2 Task Map for Mounting File Systems

Task
Description
For Instructions
Mount a file system at boot time
Steps so that a file system is mounted whenever a system is rebooted.
Mount a file system by using a command
Steps to mount a file system when a system is running. This procedure is useful when testing.
Mount with the automounter
Steps to access a file system on demand without using the command line.
Mount a file system with mirror mounts
Steps to mount one or more file systems using mirror mounts.
Mount all file systems with mirror mounts
Steps to mount all of the file systems from one server.
Start client-side failover
Steps to enable the automatic switchover to a working file system if a server fails.
Disable mount access for a client
Steps to disable the ability of one client to access a remote file system.
Provide access to a file system through a firewall
Steps to allow access to a file system through a firewall by using the WebNFS protocol.
Mount a file system by using an NFS URL
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.
Mount a FedFS file system
Process to establish a DNS record so that a FedFS file system can be accessed through the /nfs4 mount point.

How to Mount a File System at Boot Time

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.

  1. Become an administrator.

    For more information, see How to Use Your Assigned Administrative Rights in Oracle Solaris 11.1 Administration: Security Services.

  2. Add an entry for the file system to /etc/vfstab.

    Entries in the /etc/vfstab file have the following syntax:

    special  fsckdev  mountp  fstype  fsckpass  mount-at-boot  mntopts

    See the vfstab(4) man page for more information.


    Caution

    Caution - NFS servers that also have NFS client vfstab entries must always specify the bg option to avoid a system hang during reboot. For more information, see mount Options for NFS File Systems.


Example 2-1 Entry in the Client's vfstab File

You want a client machine to mount the /var/mail directory from the server wasp. You want the file system to be mounted as /var/mail on the client and you want the client to have read-write access. Add the following entry to the client's vfstab file.

wasp:/var/mail - /var/mail nfs - yes rw

How to Mount a File System From the Command Line

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.

  1. Become an administrator.

    For more information, see How to Use Your Assigned Administrative Rights in Oracle Solaris 11.1 Administration: Security Services.

  2. Mount the file system.

    Type the following command:

    # mount -F nfs -o ro bee:/export/share/local /mnt

    In this instance, the /export/share/local file system from the server bee is mounted read-only on /mnt on the local system. Mounting from the command line allows for temporary viewing of the file system. You can unmount the file system with umount or by rebooting the local host.


    Caution

    Caution - All versions of the mount 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.


Example 2-2 Using Mirror Mounts After Mounting a File System

This release includes the mirror mount facility. This new mounting technology can be used from any NFSv4 client accessing a second file system from an NFSv4 server. Once the first file system is mounted from the server using either the mount command or the automounter, then any file systems that are added to that mount point may be accessed. All you have to do is try to access the file system. The mirror mount occurs automatically. For more information, see How Mirror Mounts Work.

Mounting With the Automounter

Task Overview for Autofs Administration 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 /net mount point. To mount the /export/share/local file system from the previous example, type the following:

% cd /net/bee/export/share/local

Because the automounter allows all users to mount file systems, root 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.

See Example 2-2 for information about how to mount additional file systems on a client.

How to Mount All File Systems from a Server

This release includes the mirror mount facility, which allows a client to access all available file systems shared using NFS from a server, once one mount from that server has succeeded. For more information, see How Mirror Mounts Work.

  1. Become an administrator.

    For more information, see How to Use Your Assigned Administrative Rights in Oracle Solaris 11.1 Administration: Security Services.

  2. Mount the root of the exported namespace of the server.

    This command mirrors the file system hierarchy from the server on the client. In this case, a /mnt/export/share/local directory structure is created.

    # mount bee:/ /mnt
  3. Access a file system.

    This command or any other command which accesses the file system causes the file system to be mounted.

    # cd /mnt/export/share/local

How to Use Client-Side Failover

  1. Become an administrator.

    For more information, see How to Use Your Assigned Administrative Rights in Oracle Solaris 11.1 Administration: Security Services.

  2. On the NFS client, mount the file system by using the ro option.

    You can mount from the command line, through the automounter, or by adding an entry to /etc/vfstab that resembles the following:

    bee,wasp:/export/share/local  -  /usr/local  nfs  -  no  ro

    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.


    Note - Servers that are running different versions of the NFS protocol cannot be mixed by using a command line or in a vfstab 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.


How to Disable Mount Access for One Client

  1. Become an administrator.

    For more information, see How to Use Your Assigned Administrative Rights in Oracle Solaris 11.1 Administration: Security Services.

  2. Disable mount access for one client.
    # share -F nfs ro=-rose:eng /export/share/man
    ro=-rose:eng

    The access-list that allows read-only mount access to all clients in the eng netgroup except for the host named rose

    /export/share/man

    The file system to be shared.

How to Mount an NFS File System Through a Firewall

To access file systems through a firewall, use the following procedure.

  1. Become an administrator.

    For more information, see How to Use Your Assigned Administrative Rights in Oracle Solaris 11.1 Administration: Security Services.

  2. Manually mount the file system by using a command such as the following:
    # mount -F nfs bee:/export/share/local /mnt

    In this example, the file system /export/share/local 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 bee, the mount operation fails.


    Note - This procedure requires that the file system on the NFS server be shared by using the public option. Additionally, any firewalls between the client and the server must allow TCP connections on port 2049. All file systems that are shared allow for public file handle access, so the public option is applied by default.


How to Mount an NFS File System Using an NFS URL

  1. Become an administrator.

    For more information, see How to Use Your Assigned Administrative Rights in Oracle Solaris 11.1 Administration: Security Services.

  2. (Optional) Manually mount the file system.
    # mount -F nfs nfs://bee:3000/export/share/local /mnt

    In this example, the /export/share/local file system is being mounted from the server bee by using NFS port number 3000. The port number is not required and by default the standard NFS port number of 2049 is used. You can choose to include the public option with an NFS URL. Without the public option, the MOUNT protocol is used if the public file handle is not supported by the server. The public option forces the use of the public file handle, and the mount fails if the public file handle is not supported.


    Note - The NFS protocol version used when mounting the file system is the highest version supported by both the client and the server. The vers=# option can be used to select a specific NFS protocol version.


Setting up a DNS Record for a FedFS Server

Once an appropriate DNS record is created, mounting a a file system using FedFS is completed by the automounter once the mount point has been accessed. The DNS record for the server should look something like:

% nslookup -q=srv _nfs-domainroot._tcp.example.com bee.example.com
Server:         bee.example.com
Address:        192.168.1.1

_nfs-domainroot._tcp.example.com        service = 1 0 2049 bee.example.com.

How to Display Information About File Systems Available for Mounting

The showmount command displays information about file systems that have been remotely mounted or are available for mounting. In some environments, this information should not be viewable by all clients. See Example 2-3 for instructions.

Example 2-3 Restricting File System Information Displayed to Clients

In some environments, information about shared file systems and which systems have mounted them should not be displayed. Instead of displaying all information about shared file systems, the showmount_info property can be set so that a client:

This property can be set by running the following command on the server:

bee# sharectl set -p showmount_info=none nfs

Now on the client rose, the following information would be displayed:

% /usr/sbin/showmount -e bee
export list for bee:
/export/share/local  (everyone)
/export/home2        rose

Note that information about the /export/home file system is no longer displayed.