During NFS usage, we always use some platform or software and hardware facilities. Today, we will focus on the solaris nfs settings. Let's take a look at the specific content.
Solaris nfs settings 1. Understand nfs server and client functions.
Nfs is a product established by sun to use the TCP/IP protocol and sun's remote call and external data representation specifications. nfs is very convenient and reliable. he has the ability to share files between different operating systems.
Nfs servers can use nfs to allow other remote machines to share their local resources. the nfs client is a machine that accesses the shared resources of the nfs server. in practice, a host can be an nfs server or an nfs client. they can share and access each other.
As long as you can understand the differences between the nfs server and the nfs client, the rest is easy.
Solaris nfs Settings 2. Differences between the nfs server and the nfs client.
2. 1. solaris uses a distributed file system or dfs command to share public resources. public resources can be set manually and automatically.
The nfs server runs two Hou processes: mountd and nfsd.
The files used are:
/Etc/rc3.d/S15nfs. server
/Etc/dfs/dfstab
/Etc/dfs/sharetab
/Etc/rmtab
Run the following command on the nfs server: share unshare all unowned all
The processes running on the nfs client are statd and lockd.
The files used are:
/Etc/vfstab
/Etc/mnttab
Nfs client command: mount umount mountall umountall
2. 2. nfs server settings
The nfs server needs to run two Hou processes: mountd and nfsd. when an nfs client attempts to access a remote nfs server resource. the nfs client uses the mount command to request a connection to the mountd daemon process of the nfs server. when the nfs server responds to the client, a message is returned to the user. the client writes this information to the local/etc/mnttab file. this information is information about the shared files and directories on the server. it is the encoding of resource information, such as the disk device number, node generation number, and node number. this is unique.
Once the user can obtain the request information, the mountd process on the nfs server will add a message to the local/etc/rmtab file of the server. this is to keep track of the files currently loaded on the user machine. this file adds an entry for each loaded resource in the following format:
Remote hostname: local filename name
Note: The old entries in the/etc/rmtab file of the server will be updated every time mountd restarts and the user can send an unmount request.
2. 3. Share settings command.
After understanding the above principles, the following describes the specific operations. The nfs server uses the/usr/sbin/share command to share resources for the client.
Command details:
# Share --- display all resources that can be installed, whether or not they have been installed.
# Share [-F filesystem] [-o options] [-d description] pathname-to-resource
--- Specify the shared file.
*-F file system type specifies the public file system type.
*-O options specifies the type of the client's access to the resource.
*-D description: a brief description of the resources that can be shared. When you run the share command without any parameters, it will be displayed.
* Pathname-to-resource Name shared on the server.