Skip Navigation Links | |
Exit Print View | |
Managing Network File Systems in Oracle Solaris 11.1 Oracle Solaris 11.1 Information Library |
1. Managing Network File Systems (Overview)
2. Network File System Administration (Tasks)
How to Set Up Automatic File-System Sharing
How to Enable NFS Server Logging
How to Mount a File System at Boot Time
How to Mount a File System From the Command Line
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
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
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
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
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
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
How to Create and Access an NFS Referral
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
Identifying Which Host Is Providing NFS File Service
How to Verify Options Used With the mount Command
Error Messages Generated by automount -v
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
|
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.
For more information, see How to Use Your Assigned Administrative Rights in Oracle Solaris 11.1 Administration: Security Services.
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 - 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
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.
For more information, see How to Use Your Assigned Administrative Rights in Oracle Solaris 11.1 Administration: Security Services.
# 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 - 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.
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.
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.
For more information, see How to Use Your Assigned Administrative Rights in Oracle Solaris 11.1 Administration: Security Services.
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
This command or any other command which accesses the file system causes the file system to be mounted.
# cd /mnt/export/share/local
For more information, see How to Use Your Assigned Administrative Rights in Oracle Solaris 11.1 Administration: Security Services.
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.
For more information, see How to Use Your Assigned Administrative Rights in Oracle Solaris 11.1 Administration: Security Services.
# share -F nfs ro=-rose:eng /export/share/man
The access-list that allows read-only mount access to all clients in the eng netgroup except for the host named rose
The file system to be shared.
To access file systems through a firewall, use the following procedure.
For more information, see How to Use Your Assigned Administrative Rights in Oracle Solaris 11.1 Administration: Security Services.
# 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.
For more information, see How to Use Your Assigned Administrative Rights in Oracle Solaris 11.1 Administration: Security Services.
# 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.
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.
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.
The -e option is used to print a list of the shared file systems. For information about other options, see showmount Command or the showmount(1M) man page.
% /usr/sbin/showmount -e bee export list for bee: /export/share/local (everyone) /export/home tulip,lilac /export/home2 rose
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:
Can only see information about file systems that it is allowed to access
Cannot see information about all file systems that are shared
Cannot see information about which other systems have mounted the file systems
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.