Go to main content

man pages section 8: System Administration Commands

Exit Print View

Updated: Thursday, June 13, 2019
 
 

unshare_nfs(8)

Name

unshare_nfs - make local NFS file systems unavailable for mounting by remote systems

Synopsis

unshare [-F nfs] pathname

Description

The unshare command makes local file systems unavailable for mounting by remote systems. The shared file system must correspond to a line with NFS as the FSType in the file /etc/dfs/sharetab.

Options

The following options are supported:

–F

This option may be omitted if NFS is the first file system type listed in the file /etc/dfs/fstypes.

Files

/etc/dfs/fstypes

/etc/dfs/sharetab

Attributes

See attributes(7) for descriptions of the following attributes:

ATTRIBUTE TYPE
ATTRIBUTE VALUE
Availability
system/file-system/nfs

See Also

attributes(7), nfsd(8), share(8)

Notes

If the file system being unshared is a symbolic link to a valid pathname, the canonical path (the path which the symbolic link follows) will be unshared.

For example, if /export/foo is a symbolic link to /export/bar (/export/foo -> /export/bar), the following unshare command will result in /export/bar as the unshared pathname (and not /export/foo ):


example#  unshare -F nfs /export/foo

For file systems that are accessed by NFS Version 4 clients, once the unshare is complete, all NFS Version 4 state (open files and file locks) are released and unrecoverable by the clients. If the intent is to share the file system after some administrative action, the NFS daemon (nfsd ) should first be stopped and then the file system unshared. After the administrative action is complete, the file system would then be shared and the NFS daemon restarted. See nfsd(8)