Pages

Tuesday 21 June 2011

NFS Server Commands


Share :Makes a local directory on an NFS server available for mounting. Without parameters displays the contents of the /etc/dfs/sharetab file.
The share command is used to share NFS resources so that NFS clients can mount and access them. At a minimum, the full pathname of the directory (or mount point of the file system) to be shared is specified as a command-line argument. In addition, three other command-line arguments are supported:

The -d command-line argument is followed by a description of the data being shared.
The -F nfs command-line argument is used to specify the type of file system. If not specified, the default file system type listed in the /etc/dfs/fstypes file (NFS) is assumed
The -o command-line argument is followed by one or more NFS-specific options (separated by commas).

For example:
# share -F nfs -o public,ro /export/home

If the share command is used without any command-line arguments, the currently shared resources will be listed.

The unshare command is used to stop the sharing of NFS resources so that NFS clients can no longer mount and access them. At a minimum, the full pathname of a directory (or mount point of the file system) that is currently shared is specified as a command-line argument.

Only one other command-line argument is supported: the -F nfs command-line argument, which is used to specify the type of file system. If not specified, the default file system type listed in the /etc/dfs/fstypes file (NFS) is assumed.


The following listing shows using the unshare command to stop the sharing of the /export/home file system:
# unshare -F nfs /export/home


No comments:

Post a Comment

Twitter Bird Gadget