Part I Network Services Topics
Part II Accessing Network File Systems Topics
4. Managing Network File Systems (Overview)
5. 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 Disable Large Files on an NFS Server
How to Use Client-Side Failover
How to Disable Mount Access for One Client
How to Select Different Versions of NFS on a Server
How to Select Different Versions of NFS on a Client by Modifying the /etc/default/nfs File
How to Use the Command Line 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 the /etc/default/autofs File to Configure Your autofs Environment
How to Use the /etc/default/autofs File
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
Accessing NFS File Systems Using CacheFS
How to Access NFS File Systems by Using CacheFS
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
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
6. Accessing Network File Systems (Reference)
8. Planning and Enabling SLP (Tasks)
10. Incorporating Legacy Services
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)
25. Administering UUCP (Tasks)
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
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
|
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.
Roles contain authorizations and privileged commands. For more information about roles, see Configuring RBAC (Task Map) in System Administration Guide: 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 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
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.
Roles contain authorizations and privileged commands. For more information about roles, see Configuring RBAC (Task Map) in System Administration Guide: 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 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 - Starting with the Solaris 2.6 release, 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. |
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.
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.
Note - 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.
Roles contain authorizations and privileged commands. For more information about roles, see Configuring RBAC (Task Map) in System Administration Guide: Security Services.
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.
# umount /export/home1
fsck resets the file system state if no large files exist on the file system:
# fsck /export/home1
# 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
Roles contain authorizations and privileged commands. For more information about roles, see Configuring RBAC (Task Map) in System Administration Guide: 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.
Roles contain authorizations and privileged commands. For more information about roles, see Configuring RBAC (Task Map) in System Administration Guide: Security Services.
The first example allows mount access to all clients in the eng netgroup except the host that is named rose. The second example allows mount access to all clients in the eng.example.com DNS domain except for rose.
share -F nfs -o ro=-rose:eng /export/share/man share -F nfs -o ro=-rose:.eng.example.com /export/share/man
For additional information about access lists, see Setting Access Lists With the share Command. For a description of /etc/dfs/dfstab, see dfstab(4).
The NFS server does not use changes to /etc/dfs/dfstab until the file systems are shared again or until the server is rebooted.
# shareall
To access file systems through a firewall, use the following procedure.
Roles contain authorizations and privileged commands. For more information about roles, see Configuring RBAC (Task Map) in System Administration Guide: 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. Starting with the Solaris 2.6 release, all file systems that are shared allow for public file handle access, so the public option is applied by default.
Roles contain authorizations and privileged commands. For more information about roles, see Configuring RBAC (Task Map) in System Administration Guide: 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.
# mount -F nfs -o vers=4 nfs://bee:3000/export/share/local /mnt