|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Part I Network Services Topics Part II Accessing Network File Systems Topics 4. Managing Network File Systems (Overview) 5. Network File System Administration (Tasks) 6. Accessing Network File Systems (Reference) Commands for Troubleshooting NFS Problems 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 |
NFS CommandsThese commands must be run as root to be fully effective, but requests for information can be made by all users: automount CommandThis command installs autofs mount points and associates the information in the automaster files with each mount point. The syntax of the command is as follows: automount [ -t duration ] [ -v ] -t duration sets the time, in seconds, that a file system is to remain mounted, and -v selects the verbose mode. Running this command in the verbose mode allows for easier troubleshooting. If not specifically set, the value for duration is set to 5 minutes. In most circumstances, this value is good. However, on systems that have many automounted file systems, you might need to increase the duration value. In particular, if a server has many users active, checking the automounted file systems every 5 minutes can be inefficient. Checking the autofs file systems every 1800 seconds, which is 30 minutes, could be more optimal. By not unmounting the file systems every 5 minutes, /etc/mnttab can become large. To reduce the output when df checks each entry in /etc/mnttab, you can filter the output from df by using the -F option (see the df(1M) man page) or by using egrep. You should consider that adjusting the duration also changes how quickly changes to the automounter maps are reflected. Changes cannot be seen until the file system is unmounted. Refer to Modifying the Maps for instructions on how to modify automounter maps. clear_locks CommandThis command enables you to remove all file, record, and share locks for an NFS client. You must be root to run this command. From an NFS server, you can clear the locks for a specific client. From an NFS client, you can clear locks for that client on a specific server. The following example would clear the locks for the NFS client that is named tulip on the current system. # clear_locks tulip Using the -s option enables you to specify which NFS host to clear the locks from. You must run this option from the NFS client, which created the locks. In this situation, the locks from the client would be removed from the NFS server that is named bee. # clear_locks -s bee Caution - This command should only be run when a client crashes and cannot clear its locks. To avoid data corruption problems, do not clear locks for an active client. fsstat CommandStarting in the Solaris 10 11/06 release, the fsstat utility enables you to monitor file system operations by file system type and by mount point. Various options allow you to customize the output. See the following examples. This example shows output for NFS version 3, version 4, and the root mount point. % fsstat nfs3 nfs4 / new name name attr attr lookup rddir read read write write file remov chng get set ops ops ops bytes ops bytes 3.81K 90 3.65K 5.89M 11.9K 35.5M 26.6K 109K 118M 35.0K 8.16G nfs3 759 503 457 93.6K 1.44K 454K 8.82K 65.4K 827M 292 223K nfs4 25.2K 18.1K 1.12K 54.7M 1017 259M 1.76M 22.4M 20.1G 1.43M 3.77G / This example uses the -i option to provide statistics about the I/O operations for NFS version 3, version 4, and the root mount point. % fsstat -i nfs3 nfs4 / read read write write rddir rddir rwlock rwulock ops bytes ops bytes ops bytes ops ops 109K 118M 35.0K 8.16G 26.6K 4.45M 170K 170K nfs3 65.4K 827M 292 223K 8.82K 2.62M 74.1K 74.1K nfs4 22.4M 20.1G 1.43M 3.77G 1.76M 3.29G 25.5M 25.5M / This example uses the -n option to provide statistics about the naming operations for NFS version 3, version 4, and the root mount point. % fsstat -n nfs3 nfs4 / lookup creat remov link renam mkdir rmdir rddir symlnk rdlnk 35.5M 3.79K 90 2 3.64K 5 0 26.6K 11 136K nfs3 454K 403 503 0 101 0 0 8.82K 356 1.20K nfs4 259M 25.2K 18.1K 114 1017 10 2 1.76M 12 8.23M / For more information, see the fsstat(1M) man page. mount CommandWith this command, you can attach a named file system, either local or remote, to a specified mount point. For more information, see the mount(1M) man page. Used without arguments, mount displays a list of file systems that are currently mounted on your computer. Many types of file systems are included in the standard Solaris installation. Each file-system type has a specific man page that lists the options to mount that are appropriate for that file-system type. The man page for NFS file systems is mount_nfs(1M). For UFS file systems, see mount_ufs(1M). The Solaris 7 release includes the ability to select a path name to mount from an NFS server by using an NFS URL instead of the standard server:/pathname syntax. See How to Mount an NFS File System Using an NFS URL for further information. Caution - The version of the mount command that is included in any Solaris release from 2.6 to the current release does not warn about invalid options. The command silently ignores any options that cannot be interpreted. Ensure that you verify all of the options that were used so that you can prevent unexpected behavior. mount Options for NFS File SystemsThe subsequent text lists some of the options that can follow the -o flag when you are mounting an NFS file system. For a complete list of options, refer to the mount_nfs(1M) man page.
Using the mount CommandRefer to the following examples.
umount CommandThis command enables you to remove a remote file system that is currently mounted. The umount command supports the -V option to allow for testing. You might also use the -a option to unmount several file systems at one time. If mount-points are included with the -a option, those file systems are unmounted. If no mount points are included, an attempt is made to unmount all file systems that are listed in /etc/mnttab except for the “required” file systems, such as /, /usr, /var, /proc, /dev/fd, and /tmp. Because the file system is already mounted and should have an entry in /etc/mnttab, you do not need to include a flag for the file-system type. The -f option forces a busy file system to be unmounted. You can use this option to unhang a client that is hung while trying to mount an unmountable file system. Caution - By forcing an unmount of a file system, you can cause data loss if files are being written to. See the following examples. Example 6-1 Unmounting a File SystemThis example unmounts a file system that is mounted on /usr/man: # umount /usr/manExample 6-2 Using Options with umount This example displays the results of running umount -a -V: # umount -a -V umount /home/kathys umount /opt umount /home umount /net Notice that this command does not actually unmount the file systems. mountall CommandUse this command to mount all file systems or a specific group of file systems that are listed in a file-system table. The command provides a way of doing the following:
Because all file systems that are labeled as NFS file-system type are remote file systems, some of these options are redundant. For more information, see the mountall(1M) man page. Note that the following two examples of user input are equivalent: # mountall -F nfs # mountall -F nfs -r umountall CommandUse this command to unmount a group of file systems. The -k option runs the fuser -k mount-point command to kill any processes that are associated with the mount-point. The -s option indicates that unmount is not to be performed in parallel. -l specifies that only local file systems are to be used, and -r specifies that only remote file systems are to be used. The -h host option indicates that all file systems from the named host should be unmounted. You cannot combine the -h option with -l or -r. The following is an example of unmounting all file systems that are mounted from remote hosts: # umountall -r The following is an example of unmounting all file systems that are currently mounted from the server bee: # umountall -h bee sharemgr CommandThe Solaris Express, Developer Edition 2/07 release includes the sharemgr utility, which is an administrative tool that provides an enhanced method of sharing files and performing related tasks. Previously, such tasks were accomplished by adding entries to the /etc/dfs/dfstab file and using the share command to create a temporary share. You made the share permanent by rebooting the system or using the shareall command. Related administrative tasks necessitated that you manually edit configuration files. The sharemgr utility simplifies this process by introducing two concepts:
The sharemgr utility accomplishes different tasks by using subcommands. Options and their related properties can be used with each subcommand. The utility uses the following syntax: # sharemgr [subcommand] [option] [share_group] Note - The sharemgr utility provides a unique way of checking the validity of a desired configuration. The -n option allows you to test the validity of the options and properties you want to use with a specific subcommand. The test does not change your configuration. For example, if you use the -n option with the subcommand create, no share group is created. The following tables describes the subcommands supported by the sharemgr utility. Table 6-2 Subcommands Supported by sharemgr
The following table describes the properties supported by the sharemgr utility. Table 6-3 Properties Supported by sharemgr Utility
Note - sharemgr and sharectl are the preferred utilities for managing your file systems and file-sharing protocols. For procedures that use the sharemgr utility, see the following: Also, see the sharemgr(1M) man page. The sharectl utility is an administrative tool that enables you to configure and manage file-sharing protocols, such as NFS. For more information, see the following:
The sections that follow describe each subcommand for sharemgr and provide examples. create SubcommandThe create subcommand makes (or creates) a share group. After you create a share group, use the add-share subcommand to add shares to the group. Note the following:
This subcommand supports the following options:
The create subcommand uses the following syntax: # sharemgr create [-h] [-n] [-P protocol] [-p property=value] share_group The following example creates my_group with the following parameters:
example# sharemgr create -P nfs -p rw=true -p nosuid=true my_group delete SubcommandThis subcommand removes a share group. Before using this option, use the remove-share subcommand to delete all shares from the group. Alternately, use the -f option with this subcommand to force the removal of a group that might still contain shares. The -f option unshares and removes all shares from the share group, so the share group can be removed. To remove a protocol from a share group, use the -P option. Note that when using the -P option, the share group is not removed. Only the protocol is removed from the group. This subcommand supports the following options:
This subcommand uses the following syntax: # sharemgr delete [-h] [-n] [-f] [-P protocol] share_group list SubcommandThis subcommand provides a list of current share groups. You can customize the output by using various options with this subcommand. This subcommand supports the following options:
This subcommand uses the following syntax: # sharemgr list [-h] [-P protocol] [-v] The following example shows the output for the -v option: example# sharemgr list -v group01 enabled nfs group02 disabled nfs show SubcommandThis subcommand provides a list of shares by group. By specifying one or more share groups, you can limit the output to a list of shares in the specified groups. If no groups are specified, the list shows the shares in each group. This subcommand supports the following options:
This subcommand uses the following syntax: # sharemgr show [-h] [-v] [-p] [-x] [share_group...] The following example uses the -p option to show the shares and group properties for my_group: example01# sharemgr show -p my_group my_group nfs=(rw=true nosuid=true) /export/home/home0 /export/home/home1 The next example uses the -v option to show the shares in my_group and their descriptions: example02# sharemgr show -v my_group my_group HOME0=/export/home/home0 "Home directory set 0" HOME1=/export/home/home1 "Home directory set 1" set SubcommandThis subcommand sets properties to a share group. Note the following conditions:
A group can be associated with more than one protocol and can have different properties for each protocol. This subcommand supports the following options:
This subcommand uses the following syntax: # sharemgr set [-h] [-n] [-P protocol] [-s share-path] [-S security-mode] [-p property=value] share_group The following example sets the user ID for unknown users in my_group to 1234546: example01# sharemgr set -p anon=123456 my_group In the next example, the following occurs:
example02# sharemgr create -P nfs -p rw=true -p nosuid=true my_group example02# sharemgr set -P nfs -p nosuid=false my_group unset SubcommandThis subcommand removes (or unsets) properties from a share group. This subcommand supports the following options:
This subcommand uses the following syntax: # sharemgr unset [-h] [-n] -P protocol [-s share-path] [-p property] share_group add-share SubcommandAfter creating a share group, use this subcommand to add shares to the group. A share is a path to a file or a directory. Note that a share can exist in one group only. If you try to add a share to another group, you will get an error message. This subcommand supports the following options:
This subcommand uses the following syntax: # sharemgr add-share [-h] [-n] -s share-path [-t] [-d description] [-r resource-name] share_group The following example adds the shares /export/home/home0 and /export/home/home1 to my_group. example# sharemgr add-share -s /export/home/home0 my_group example# sharemgr add-share -s /export/home/home1 my_group move-share SubcommandUse this subcommand to move a share from one group to another. This subcommand supports the following options:
This subcommand uses the following syntax: # sharemgr move-share [-h] [-n] -s share-path share_group The following example shows a share that was added to my_group and then moved to your_group. example# sharemgr add-share -s /export/home/home0 my_group example# sharemgr move-share -s /export/home/home0 your_group remove-share SubcommandUse this subcommand to remove a share from a share group. This subcommand supports the following options:
This subcommand uses the following syntax: # sharemgr remove-share [-h] [-n] -s share-path share_group The following example removes the share /export/home/home0 from my_group. example# sharemgr remove-share -s /export/home/home0 my_group set-share SubcommandUse this subcommand to change the properties associated with a share. Currently, you can use this subcommand to change the descriptive text associated with a specific share. This subcommand supports the following options:
This subcommand uses the following syntax: # sharemgr set-share [-h] [-n] -s share-path [-d description] [-r resource-name] share_group The following example shows how a description is changed. example# sharemgr add-share -s /export/home/home0 -d "original text" my_group example# sharemgr set-share -s /export/home/home0 -d "new text" my_group enable SubcommandUse this subcommand to share (or enable) the shares in the groups that you specify. Note that the groups you create are enabled by default. You must use this subcommand to enable a group that has previously been disabled with the disable subcommand. Note - If you specify a protocol, only the groups that are associated with that protocol are enabled. This subcommand supports the following options:
This subcommand uses the following syntax: # sharemgr enable [-h] [-n] [-P protocol] [share_group | -a] The following example shares (or enables) the shares in all groups that use NFS. example01# sharemgr enable -P NFS -a In this next example, all shares in my_group are shared (or enabled). example02# sharemgr enable my_group disable SubcommandUse this subcommand to unshare (or disable) the shares in the groups that you specify. This subcommand can be reversed by using the enable subcommand. Note - If you specify a protocol, only the groups that are associated with that protocol are disabled. This subcommand supports the following options:
This subcommand uses the following syntax: # sharemgr disable [-h] [-P protocol] [share_group | -a] The following example unshares (or disables) the shares in all groups that use NFS. example01# sharemgr disable -P NFS -a In this next example, all shares in my_group are unshared (or disabled). example02# sharemgr disable my_group start SubcommandThis subcommand is similar to the enable subcommand with these distinctions:
This subcommand supports the following options:
Table 6-4 Two Ways to Start a Share Group
stop SubcommandThis subcommand is similar to the disable subcommand with these distinctions:
This subcommand supports the following options:
Table 6-5 Two Ways to Stop a Share Group
-h FeatureThe sharemgr utility has an online help feature that describes sharemgr and its subcommands and options, and shows proper syntax. For online help, use -h. This feature uses the following syntax: # sharemgr [subcommand] -h The following example uses -h to provide a complete description of the sharemgr utility. example01# sharemgr -h USAGE: # sharemgr [subcommand] [option] [share_group] DESCRIPTION: Configures and manages file sharing SUBCOMMANDS: create Makes (or creates) a new share group delete Removes a share group list Lists the current share groups show Lists the shares by share group set Sets a share group's properties unset Removes (or unsets) properties from a share group add-share Adds a new share to a share group move-share Moves a share from one share group to another remove-share Removes a share from a share group set-share Updates the properties associated with a share disable Unshares one or more share groups enable Shares one or more share groups start Used by the smf utility to share one or more share groups stop Used by the smf utility to unshare one or more share groups -h Online-help feature SEE ALSO: sharemgr(1M) man page System Administration Guide: Network Services This next example uses -h to provide information about the set subcommand. example02# sharemgr set -h USAGE: # sharemgr set [-h] [-n] [-P protocol] [-S security-mode] [-p property=value] share_group DESCRIPTION: Sets a share group's properties OPTIONS: -h Online-help feature -n Checks the validity of the command-line string -P Specifies a file-system type. -p Specifies a property for the share group. -S Specifies the security mode, such as sys, dh, or krb5 PROPERTIES: aclok={true|false} Enable access control lists (ACL) for NFS version 2. anon=UID Specify the User ID for unknown users. index=file path Include the specified file in a content list for a directory. log=tag Specify a tag to use for log messages. nosub={true|false} Disallow clients from mounting subdirectories of shares. nosuid={true|false} Disallow the use of the setuid() and setgid() functions. ro={access-list|true|*} If ro is set to an access-list, permissions for the list are read-only. If ro is set to no value or to true, permissions for the share group are read-only. If ro is set to an asterisk (*), permissions for all hosts are set to read-only. root={access-list|*} If root is set to an access-list, permissions for the list are set to allow root access. If root is set to an asterisk (*), all hosts have root access. rw={access-list|true|*} If rw is set to an access list, permissions for the list are set to read-write. If rw is set to no value or to true, permissions for the share group are set to read-write. If rw is set to an asterisk (*), permissions for all hosts are set to read-write. window=integer For the dh security mode, set the number of seconds a credential is available. SEE ALSO: sharemgr(1M) man page System Administration Guide: Network Services nfssec(5) man page for more information about security modes For help, you can also refer to the sharemgr(1M) man page. sharectl CommandThe Solaris Express, Developer Edition 2/07 release includes the sharectl utility, which is an administrative tool that enables you to configure and manage file-sharing protocols, such as NFS. You can use this command to do the following:
The sharectl utility uses the following syntax: # sharectl subcommand [option] [protocol] The sharectl utility supports the following subcommands: Table 6-6 Subcommands for sharectl Utility
Note - sharemgr and sharectl are the preferred utilities for managing your file systems and file-sharing protocols. For more information about the sharectl utility, see the following:
For information about the sharemgr utility, see the following:
set SubcommandThe set subcommand, which defines the properties for a file-sharing protocol, supports the following options:
The set subcommand uses the following syntax: # sharectl set [-h] [-p property=value] protocol Note - The following:
The following example sets the minimum version of the NFS protocol for the client to 3: # sharectl set -p nfs_client_versmin=3 nfs get SubcommandThe get subcommand, which displays the properties and property values for the specified protocol, supports the following options:
The get subcommand uses the following syntax: # sharectl get [-h] [-p property] protocol Note - You must have root privileges to use the get subcommand. The following example uses nfsd_servers, which is the property that enables you to specify the maximum number of concurrent NFS requests: # sharectl get -p nfsd_servers nfs nfsd_servers=16 In the following example, because the -p option is not used, all property values are displayed: # sharectl get nfs listen_backlog=32 protocol=ALL servers=32 lockd_listen_backlog=32 lockd_servers=20 lockd_retransmit_timeout=5 grace_period=90 nfsmapid_domain=company.com server_versmin=2 server_versmax=4 client_versmin=2 client_versmax=4 max_connections=-1 status SubcommandThe status subcommand, which displays whether the specified protocol is enabled or disabled, supports the following option:
The status subcommand uses the following syntax: # sharectl status [-h] [protocol] The following example shows the status of the NFS protocol: # sharectl status nfs nfs enabled share CommandNote - Starting with the Solaris Express, Developer Edition 2/07 release, sharemgr and sharectl are the preferred utilities for managing your file systems and file-sharing protocols. See sharemgr Command and sharectl Command With this command, you can make a local file system on an NFS server available for mounting. You can also use the share command to display a list of the file systems on your system that are currently shared. The NFS server must be running for the share command to work. The NFS server software is started automatically during boot if an entry is in /etc/dfs/dfstab. The command does not report an error if the NFS server software is not running, so you must verify that the software is running. The objects that can be shared include any directory tree. However, each file system hierarchy is limited by the disk slice or partition that the file system is located on. For instance, sharing the root (/) file system would not also share /usr, unless these directories are on the same disk partition or slice. Normal installation places root on slice 0 and /usr on slice 6. Also, sharing /usr would not share any other local disk partitions that are mounted on subdirectories of /usr. A file system cannot be shared if that file system is part of a larger file system that is already being shared. For example, if /usr and /usr/local are on one disk slice, /usr can be shared or /usr/local can be shared. However, if both directories need to be shared with different share options, /usr/local must be moved to a separate disk slice. You can gain access to a file system that is read-only shared through the file handle of a file system that is read-write shared. However, the two file systems have to be on the same disk slice. You can create a more secure situation. Place those file systems that need to be read-write on a separate partition or separate disk slice from the file systems that you need to share as read-only. Note - For information about how NFS version 4 functions when a file system is unshared and then reshared, refer to Unsharing and Resharing a File System in NFS Version 4. Non-File-System-Specific share OptionsSome of the options that you can include with the -o flag are as follows.
NFS-Specific share OptionsThe options that you can use with NFS file systems include the following.
Setting Access Lists With the share CommandIn Solaris releases prior to 2.6, the accesslist that was included with either the -ro=, -rw=, or -root= option of the share command was restricted to a list of host names or netgroup names. Starting with the Solaris 2.6 release, the access list can also include a domain name, a subnet number, or an entry to deny access. These extensions should simplify file access control on a single server without having to change the namespace or maintain long lists of clients. This command provides read-only access for most systems but allows read-write access for rose and lilac: # share -F nfs -o ro,rw=rose:lilac /usr/src In the next example, read-only access is assigned to any host in the eng netgroup. The client rose is specifically given read-write access. # share -F nfs -o ro=eng,rw=rose /usr/src Note - You cannot specify both rw and ro without arguments. If no read-write option is specified, the default is read-write for all clients. To share one file system with multiple clients, you must type all options on the same line. Multiple invocations of the share command on the same object “remember” only the last command that is run. This command enables read-write access to three client systems, but only rose and tulip are given access to the file system as root. # share -F nfs -o rw=rose:lilac:tulip,root=rose:tulip /usr/src When sharing a file system that uses multiple authentication mechanisms, ensure that you include the -ro, -ro=, -rw, -rw=, -root, and -window options after the correct security modes. In this example, UNIX authentication is selected for all hosts in the netgroup that is named eng. These hosts can only mount the file system in read-only mode. The hosts tulip and lilac can mount the file system read-write if these hosts use Diffie-Hellman authentication. With these options, tulip and lilac can mount the file system read-only even if these hosts are not using DH authentication. However, the host names must be listed in the eng netgroup. # share -F nfs -o sec=dh,rw=tulip:lilac,sec=sys,ro=eng /usr/src Even though UNIX authentication is the default security mode, UNIX authentication is not included if the -sec option is used. Therefore, you must include a -sec=sys option if UNIX authentication is to be used with any other authentication mechanism. You can use a DNS domain name in the access list by preceding the actual domain name with a dot. The string that follows the dot is a domain name, not a fully qualified host name. The following entry allows mount access to all hosts in the eng.example.com domain: # share -F nfs -o ro=.:.eng.example.com /export/share/man In this example, the single “.” matches all hosts that are matched through the NIS or NIS+ namespaces. The results that are returned from these name services do not include the domain name. The “.eng.example.com” entry matches all hosts that use DNS for namespace resolution. DNS always returns a fully qualified host name. So, the longer entry is required if you use a combination of DNS and the other namespaces. You can use a subnet number in an access list by preceding the actual network number or the network name with “@”. This character differentiates the network name from a netgroup or a fully qualified host name. You must identify the subnet in either /etc/networks or in an NIS or NIS+ namespace. The following entries have the same effect if the 192.168 subnet has been identified as the eng network: # share -F nfs -o ro=@eng /export/share/man # share -F nfs -o [email protected] /export/share/man # share -F nfs -o [email protected] /export/share/man The last two entries show that you do not need to include the full network address. If the network prefix is not byte aligned, as with Classless Inter-Domain Routing (CIDR), the mask length can be explicitly specified on the command line. The mask length is defined by following either the network name or the network number with a slash and the number of significant bits in the prefix of the address. For example: # share -f nfs -o ro=@eng/17 /export/share/man # share -F nfs -o [email protected]/17 /export/share/man In these examples, the “/17” indicates that the first 17 bits in the address are to be used as the mask. For additional information about CIDR, look up RFC 1519. You can also select negative access by placing a “-” before the entry. Note that the entries are read from left to right. Therefore, you must place the negative access entries before the entry that the negative access entries apply to: # share -F nfs -o ro=-rose:.eng.example.com /export/share/man This example would allow access to any hosts in the eng.example.com domain except the host that is named rose. unshare CommandThis command allows you to make a previously available file system unavailable for mounting by clients. You can use the unshare command to unshare any file system, whether the file system was shared explicitly with the share command or automatically through /etc/dfs/dfstab. If you use the unshare command to unshare a file system that you shared through the dfstab file, be careful. Remember that the file system is shared again when you exit and reenter run level 3. You must remove the entry for this file system from the dfstab file if the change is to continue. When you unshare an NFS file system, access from clients with existing mounts is inhibited. The file system might still be mounted on the client, but the files are not accessible. Note - For information about how NFS version 4 functions when a file system is unshared and then reshared, refer to Unsharing and Resharing a File System in NFS Version 4. The following is an example of unsharing a specific file system: # unshare /usr/src shareall CommandThis command allows for multiple file systems to be shared. When used with no options, the command shares all entries in /etc/dfs/dfstab. You can include a file name to specify the name of a file that lists share command lines. If you do not include a file name, /etc/dfs/dfstab is checked. If you use a “-” to replace the file name, you can type share commands from standard input. The following is an example of sharing all file systems that are listed in a local file: # shareall /etc/dfs/special_dfstab unshareall CommandThis command makes all currently shared resources unavailable. The -F FSType option selects a list of file-system types that are defined in /etc/dfs/fstypes. This flag enables you to choose only certain types of file systems to be unshared. The default file-system type is defined in /etc/dfs/fstypes. To choose specific file systems, use the unshare command. The following is an example of unsharing all NFS-type file systems: # unshareall -F nfs showmount CommandThis command displays one of the following:
Note - The showmount command only shows NFS version 2 and version 3 exports. This command does not show NFS version 4 exports. The command syntax is as follows: showmount [ -ade ] [ hostname ]
If hostname is not specified, the local host is queried. The following command lists all clients and the local directories that the clients have mounted: # showmount -a bee lilac:/export/share/man lilac:/usr/src rose:/usr/src tulip:/export/share/man The following command lists the directories that have been mounted: # showmount -d bee /export/share/man /usr/src The following command lists file systems that have been shared: # showmount -e bee /usr/src (everyone) /export/share/man eng setmnt CommandThis command creates an /etc/mnttab table. The mount and umount commands consult the table. Generally, you do not have to run this command manually, as this command runs automatically when a system is booted. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|