Solaris NFS More

xiaoxiao2021-03-06  43

★ What is NFS? NFS is white is the file sharing, and there is no difference between Windows file sharing. Of course, this versatility is strong. With NFS, you can access local resources to access resources on remote computers. The resource can be shared between a computer that supports NFS, and has no relationship with the system structure and operating system type of the hardware system. ★ What is the benefits of NFS? 1, multiplayer multi-computer sharing files. 2. Shared applications can reduce storage overhead. 3. Improve data consistency (no need synchronization) and reliability (storage device reliability is high and easy to back up). 4, widely supported. 5, simplify management. ★ What are the NFS constitute? NFS is the application of the C / S structure, so its composition should include three parts: client implementation, server implementation, and network of connecting clients and servers. There is no special requirement for this network, and the correct route and access control can be, and we focus on the implementation of clients and servers. ★ NFS has several versions? NFS includes four versions of V1, V2, V3, and V4. It is currently widely used in V4 version, and later versions are improved in front of feature, performance, and security. ★ How does NFS use, is it complicated? Very simple, on the server host1, we share the / export / rdbms with #SHARE / EXPORT / RDBMS, on the client host2, we use #mount host1: / export / rdbms / opt / rdbms one The command is hung up in the / opt / rdbms directory. ★ What files are related to NFS on NFS servers? The first is / etc / dfs / dfstab, which resources are configured to be automatically shared when the computer is started (no manual MOUNT). The second is / etc / dfs / shareetab, which is listed in this file is the resource currently shared by the local computer, and is maintained by the system, please do not modify it directly. # CAT / etc / dfs / shareetab / export / sys44_data - NFS RO The third is / etc / dfs / fstype, lists the default file type of the remote file system. Only these three items: NFS NFS Utilities (Listed by the first line) Autofs Autofs Utilities Cachefs Cachefs Utilities The fourth file is / etc / rmtab listing the currently remote client-mounted resources, Maintenance is also made by the system, do not modify it directly (but when the client does not properly uninstall a hook, the administrator will leave a garbage entry periodically check such entry and delete). CAT / etc / rmtab sys42: / export / sys44_data # 41: / usr / share / man # 43: / export / sys44_data Note: The first line of the client name is replaced with "#" indicates that the client will uninstall a hanging Connected, this entry will be deleted when the mountd daemon is started next time. The fifth file is /etc/nfs/nfslog.conf, configure the storage location of the NFS server log file. The sixth file is / etc / default / nfslogd, configuring the NFSLOGD daemon behavior.

★ Speak in detail the format of the / etc / dfs / dfstab file? Every line of the DFSTAB file has a share command, and it is similar to our hand-established sharing. The format is as follows: Share [-f fstype] [-o options] [-d ""] fStype is usually NFS Options is to set the shared method, there are two options for RO (read-only) and RW (read / write), which can set different options for different clients. About Options can be obtained by man share_nfs; is Describe text, help client users understand the purpose of shared folders; is the absolute path of the directory to share. For example: Share -O RO / EXPORT / SYS44_DATA share / export / sys44_data directory in a read-only mode ★ / etc / dfs / dfstab When is executed? In the following three cases, the contents in the DFSTAB will be read and processed: 1, the system performs level 3 (/etc/rc3.d/s15nfs.server); 2, the administrator runs sharenall command; 3, administrator Run the /etc/init.d/nfs.server script using the Start parameter. ★ What are the daemons of NFS Server? What is the role? 1. MountD processes the hook request from the remote system, providing access control. When you receive a client's MOUNT request, it checks the / etc / dfs / shareTab file to determine if the resource is shared, and whether the client has access. 2, NFSD control client file system request. Provide resource read and write services for clients that have successfully hung up local shared resources. 3, Statd and Lockd a crash recovery feature for Lock Manager. 4, LOCKD Records the lock operation on the NFS file. 5, NFSLOGD operation log. Its behavior is defined by / etc / default / nfslogd. ★ How to manage NFS daemons? Method for starting NFS daemon: # / etc / init.d / nfs.server Start stops NFS daemon: # / etc / init.d / nfs.server stop Let's take a look at this: bash-2.05 # ls - I /etc/init.d/nfs.server 4967 /etc/init.d/nfs.server bash-2.05 # find / etc --inum 4967 /etc/init.d/nfs.server /etc/rc0.d/k28nfs .server /etc/rc1.d/k28nfs.server /etc/rc2.d/k28nfs.server /etc/rc3.d/s15nfs.server /etc/rcs.d/k28nfs.server understand? The S15NFS.Server in RC3.D automatically starts the NFS daemon when we enter the level 3, and K28NFS.Server, level 0, 1, 2, and s automatically stop the NFS daemon when entering these levels. That is, only the run level 3 supports NFS. ★ What are the management commands for NFS Server? 1, two effects, we can use it to share local resources, introduced when introducing the content of the / etc / dfs / dfstab file, the Share command without parameters will display the contents of / etc / dfs / shareetab It is also the current shared resources.

Bash-2.05 # Share - / Test RW "Test One" 2, unshare cancels sharing. 3, ShareAll checks the contents of the / etc / dfs / dfstab file to share the currently no shared resources. 4, unshareall cancels all shares. 5, DFSHARES lists the available shared resources in the local or remote computer. Bash-2.05 # DFSHARES Resource Server Access Transport Server 9: / Test Server 9 - - 6, DFMounts Displays the currently mounted server shared resource and the currently connected client. Bash-2.05 # DFMounts Resource Server Pathname Clients - Server9 / Test Client9 ★ How to implement the access control of remote users? First of all, what is the resource of the user MOUNT local sharing on the remote computer? If there is NIS or LDAP, we can implement network-based user identity management, which can adopt unified identity and authorization, but if both the servers in the network work independently, they can only be implemented by the local security of the server. Controlled, in this case, the user is determined to the resource access to two points: First, if the root = clientx option is used when sharing, users from Clientx access the resource as root. Second, if there is no root = clientx option, it will depend on anon = X option. If it does not set it, Anon is default equal to Nobody's UID, and the user is accessed as Nobody. If the x in Anon = X is set to a UID of a user, access it as an identity of the user. If x = 0, then the role of root = clientx is the same. I know these, we can control the access to the local shared resource through local access. ★ What are the documents related to NFS customers? 1, / etc / vfstab Defines the file system that is automatically histed at startup, which is also remotely remote. 2, / etc / mnttab This record is the currently successfully mounted file system, including local and remote, which is created when the system is started by /etc/rcs.d/s70buildmnttab.sh, Don't edit it directly, in fact, the mount command that does not have the parameter is the content of this file, and the time display is much more friendly to see MNTTAB. 3, / etc / dfs / fstype, like the server, record the type of remote distributed file system. #CAT / ETC / DFS / FSTYPES NFS NFS UTILITIES Autofs Autofs Utilities Cachefs Cachefs Utilities ★ What is the daemon of NFS clients? Only two processes used to process files: STATD and LOCKD functions are the same as the server-side process, and work.

★ What method is used to manage client processes? Start the NFS client process: # /etc/init.d/nfs.client Start Stop NFS client process: # /etc/init.d/nfs.client stop Take a look at the following: BASH-2.05 # ls -i NFS.CLIENT 4349 NFS.CLIENT BASH-2.05 # Find / etc --inum 4349 /etc/init.d/nfs.client /etc/rc0.d/k41nfs.client /etc/rc2.d/s73nfs.client No Explain more? ★ What order can I use? Similar to the server, there are Mount / Umount, MountAll / UmountAll and DFSharees / DFMounts six commands. Usage: mount [-f nfs] [-o options] server: pathname mount_point umount command usage: umount server: pathname | mount_point mountall / umountall command Usage: mountall / umountall -r -l [-f nfs] The -R and -L options indicate that only remote mounts are processed or only local mounts. Dfshars and DFMouts have been introduced before. ★ How to use / etc / vfstab automatically mount NFS on the client? Very simple, write the parameters in the mount statement to the vfstab to go, pay attention to the correspondence. 1, Device to Mount, remote sharing resources, such as: sys44: / export / sys44_data 2, Device to fsck, for NFS, here is always "-" 3, Mount Point, local directory, such as: / export / recote_data 4 , FS Type, file system type, write NFS 5, fsck pass, for NFS, is always "-" 6, mount at boot, of course Yes 7, Mount Options, is written behind Mount -O, general Add a BG, Soft is OK. It is said that it is not a must-have, and it is still unsuccessful after trying a certain number of times in the background. ★ Where is the NFS log, what is needed? As mentioned earlier, this is determined by the /etc/nfs/nfslog.conf file.

DefaultDir = DIR_PATH indicates path, default is / var / nfs log = logfile_path Indicates file name, default is NFSLog Fhtable = table_path Indicates that file handle and path correspondence database file, default is FHTABLE BUFFER = Bufferfile_path Indicates the location of the cache Logformat = Basic | specify the level of detail extended log # cat /etc/nfs/nfslog.conf global defaultdir = / var / nfs / log = nfslog fhtable = fhtable buffer = nfslog_workbuffer public defaultdir = / var / nfs / public / log = nfslog fhtable = fhtable Buffer = NFSLOG_WORKBUFFER defines a global configuration (global) and a special configuration (public), which can be used to specify what configuration of the shared log usage with log = tag when sharing. Here is an example: Share -f nfs -o ro, log / export / sys44_data does not write the log options not to be recorded in the log. Let's take a look at / etc / default / nfslogd, which is used to control how the NFSLog daemon works, and there are five options to configure: IDLE_TIME Check the cycle of the buffer and configuration file, default is 300 seconds. Min_processing_size needs to be written to the minimum size of the Buffer file that the buffer file should be reached, and the default is 524,288 bytes. Umask log permission setting, default is 0137. Cycle_frequency cleaning the period of the log, default for 24 hours. Max_logs_preserve The maximum number of log files is default 10. ★ NFS Common Troubleshooting 1, The RPCBind Failure Error Troubleshooting: NFS Mount: Server1 :: RPC: RPCBind Failure RPC: Timed Out NFS Mount: Retrying: / MNTPOINT Reason: First, possibly due to errors in the client's HOSTS file The IP address, hostname, or node name combination; second, the server temporarily stops service because of overload. 2, The Server NOT RESPONDING ERROR Phenomenon: NFS Server Server2 Not Responding, Still Trying Reason: First, the network is not accessed, use the ping command to detect it. Second, the server is turned off. 3, The NFS Client Fails A Reboot Error Phenomenon: Start the client after stop, constantly display the following prompt: setting default interface for multicast: add net 224.0.0.0: Gateway: client_node_name. Cause: Mount option in ETC / VFSTAB The FG is used and the resources on the MOUNT server cannot be successfully successfully successfully changed to BG or comment out until the server can be used. 4, The Service Not Responding Error: NFS Mount: DBSERVER: NFS: Service NOT RESPOND NFS Mount: Retrying: / mntpoint Reason: First, the current level is not a level 3, with who -r view, use init to switch.

转载请注明原文地址:https://www.9cbs.com/read-78709.html

New Post(0)