NFS Shared storage
NFS is a network File system protocol based on TCP/IP transmission, developed by Sun, that allows clients to access resources in remote hosts as if they were accessing a local directory, using the NFS protocol. In a load-balanced cluster, using NFS is a common practice, and NFS is a protocol that the NAS storage device is bound to support.
3.1 Publishing shared resources using NFS
The implementation of the NFS service relies on the RPC (remote Process call) mechanism, which completes the remote-to-local mapping process. You need to install the Nfs-utils, Rpcbind package to provide NFS service, which is used for NFS shared publishing and access, which is for PRC support.
(1) Installation of Nfs-tuils, Rpcbind
When you manually load the NFS shared service, you should start Rpcbind, and then start the NFS service.
650) this.width=650; "Style=" border-bottom:0px; border-left:0px; padding-left:0px; padding-right:0px; border-top:0px; border-right:0px; padding-top:0px "title=" clip_image002 "border=" 0 "alt=" clip_image002 "src=" http://s3.51cto.com/wyfs02/M02/7F/74/ Wkiom1cfecsw-uu9aaalu_tn_mq713.jpg "" 554 "height="/>
Start the service:
650) this.width=650; "Style=" background-image:none; border-bottom:0px; border-left:0px; margin:0px; padding-left:0px; padding-right:0px; border-top:0px; border-right:0px; padding-top:0px "title=" clip_image004 "border=" 0 "alt=" clip_image004 "src=" http://s3.51cto.com/wyfs02/M01/7F/74/ Wkiom1cfeftbtmnvaaa_rqfiqne260.jpg "" 554 "height=" 117 "/>
Set power on Start:
650) this.width=650; "Style=" background-image:none; border-bottom:0px; border-left:0px; margin:0px; padding-left:0px; padding-right:0px; border-top:0px; border-right:0px; padding-top:0px "title=" clip_image006 "border=" 0 "alt=" clip_image006 "src=" http://s3.51cto.com/wyfs02/M00/7F/74/ Wkiom1cfegcwiq3paabvvz5uiso401.jpg "" 554 "height=" 98 "/>
(2) Setting up a shared directory
The configuration file for NFS is/etc/exports, and the file content is empty by default, which means no shared content. Shared format: "Directory Location client address (permission control)"
650) this.width=650; "Style=" background-image:none; border-bottom:0px; border-left:0px; margin:0px; padding-left:0px; padding-right:0px; border-top:0px; border-right:0px; padding-top:0px "title=" clip_image008 "border=" 0 "alt=" clip_image008 "src=" http://s3.51cto.com/wyfs02/M01/7F/74/ Wkiom1cfegsxfs_baaao-afmmgg007.jpg "" 554 "height="/>
(3) Restart the service
650) this.width=650; "Style=" background-image:none; border-bottom:0px; border-left:0px; margin:0px; padding-left:0px; padding-right:0px; border-top:0px; border-right:0px; padding-top:0px "title=" clip_image010 "border=" 0 "alt=" clip_image010 "src=" http://s3.51cto.com/wyfs02/M02/7F/74/ Wkiom1cfeg6hztquaab9pgaqwue597.jpg "" 554 "height=" 261 "/>
(4) View native NFS shared directory
650) this.width=650; "Style=" background-image:none; border-bottom:0px; border-left:0px; margin:0px; padding-left:0px; padding-right:0px; border-top:0px; border-right:0px; padding-top:0px "title=" clip_image012 "border=" 0 "alt=" clip_image012 "src=" http://s3.51cto.com/wyfs02/M02/7F/72/ Wkiol1cfetyqe_udaaanzt2caey927.jpg "" 553 "height="/>
(5) firewall problems, because the NFS protocol is special, port dynamic, inconvenient to add firewall rules, the solution is as follows:
650) this.width=650; "Style=" background-image:none; border-bottom:0px; border-left:0px; margin:0px; padding-left:0px; padding-right:0px; border-top:0px; border-right:0px; padding-top:0px "title=" clip_image014 "border=" 0 "alt=" clip_image014 "src=" http://s3.51cto.com/wyfs02/M00/7F/74/ Wkiom1cfehfymhdnaaajcqm-8qm914.jpg "" 553 "height="/>
Set firewall rules:
650) this.width=650; "Style=" background-image:none; border-bottom:0px; border-left:0px; margin:0px; padding-left:0px; padding-right:0px; border-top:0px; border-right:0px; padding-top:0px "title=" clip_image016 "border=" 0 "alt=" clip_image016 "src=" http://s3.51cto.com/wyfs02/M00/7F/72/ Wkiol1cfeuyh1y5-aabygclpuj0183.jpg "" 554 "height=" 113 "/>
and use "Service iptables save" to save the rule
NFS Shared storage