JavaScript is required to for searching.
Skip Navigation Links
Exit Print View
Oracle Solaris Administration: Network Services     Oracle Solaris 11 Information Library
search filter icon
search icon

Document Information

Preface

Part I Network Services Topics

1.  Network Service (Overview)

2.  Managing Web Cache Servers

3.  Time-Related Services

Part II Accessing Network File Systems Topics

4.  Managing Network File Systems (Overview)

5.  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 Disable Large Files on an NFS 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 Federated File System Server

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

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

6.  Accessing Network File Systems (Reference)

Part III SLP Topics

7.  SLP (Overview)

8.  Planning and Enabling SLP (Tasks)

9.  Administering SLP (Tasks)

10.  Incorporating Legacy Services

11.  SLP (Reference)

Part IV Mail Services Topics

12.  Mail Services (Overview)

13.  Mail Services (Tasks)

14.  Mail Services (Reference)

Part V Serial Networking Topics

15.  Solaris PPP 4.0 (Overview)

16.  Planning for the PPP Link (Tasks)

17.  Setting Up a Dial-up PPP Link (Tasks)

18.  Setting Up a Leased-Line PPP Link (Tasks)

19.  Setting Up PPP Authentication (Tasks)

20.  Setting Up a PPPoE Tunnel (Tasks)

21.  Fixing Common PPP Problems (Tasks)

22.  Solaris PPP 4.0 (Reference)

23.  Migrating From Asynchronous Solaris PPP to Solaris PPP 4.0 (Tasks)

24.  UUCP (Overview)

25.  Administering UUCP (Tasks)

26.  UUCP (Reference)

Part VI Working With Remote Systems Topics

27.  Working With Remote Systems (Overview)

28.  Administering the FTP Server (Tasks)

29.  Accessing Remote Systems (Tasks)

Part VII Monitoring Network Services Topics

30.  Monitoring Network Performance (Tasks)

Glossary

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 5-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.
Prevent large files
Steps to prevent large files from being created on a file system.
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 Obtain Administrative Rights in Oracle Solaris 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 5-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 Obtain Administrative Rights in Oracle Solaris 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 on read-only /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 5-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 Using Mirrormounts After Mounting a File System 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 Obtain Administrative Rights in Oracle Solaris 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 Disable Large Files on an NFS Server

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.

  1. Become an administrator.

    For more information, see How to Obtain Administrative Rights in Oracle Solaris Administration: Security Services.

  2. Check that no large files exist on the file system.

    For example:

    # cd /export/home1
    # find . -xdev -size +2000000 -exec ls -l {} \;

    If large files are on the file system, you must remove or move these files to another file system.

  3. Unmount the file system.
    # umount /export/home1
  4. Reset the file system state if the file system has been mounted by using largefiles.

    fsck resets the file system state if no large files exist on the file system:

    # fsck /export/home1
  5. Mount the file system by using nolargefiles.
    # mount -F ufs -o nolargefiles /export/home1

    You can mount from the command line, but to make the option more permanent, add an entry that resembles the following into /etc/vfstab:

    /dev/dsk/c0t3d0s1 /dev/rdsk/c0t3d0s1 /export/home1  ufs  2  yes  nolargefiles

How to Use Client-Side Failover

  1. Become an administrator.

    For more information, see How to Obtain Administrative Rights in Oracle Solaris 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 Obtain Administrative Rights in Oracle Solaris Administration: Security Services.

  2. Disable mount access for one client.
    # share -F nfs  ro=-rose:eng /export/share/man
    or=-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 Obtain Administrative Rights in Oracle Solaris 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 Obtain Administrative Rights in Oracle Solaris Administration: Security Services.

  2. (Optional) If you are using NFS version 2 or version 3, manually mount the file system by using a command such as the following:
    # 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.

  3. (Optional) If you are using NFS version 4, manually mount the file system by using a command such as the following:
    # mount -F nfs -o vers=4 nfs://bee:3000/export/share/local /mnt

Setting up a DNS Record for a Federated File System Server

Once an appropriate DNS record is created, mounting a Federated File System 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 _nfs4._domainroot._tcp.example.com bee.example.com
Server:         bee.example.com
Address:        192.168.1.1

_nfs4._domainroot._tcp.example.com        service = 1 0 2049 bee.example.com.