Linux Centosvmware NFS Introduction, NFS server-side installation configuration, NFS configuration options

Source: Internet
Author: User

First, the Introduction of NFS

NFS is an abbreviation for the network File system

NFS was first developed by Sun, 2,3,4 three editions, 2 and 3 were drafted by Sun, and 4.0 began to be involved and led by NetApp, with the latest version of 4.1

NFS data transfer is based on RPC protocol, RPC is a shorthand for remote Procedure call.

The NFS Application scenario is: A,b,c three machines need to ensure that the files are accessed is the same, a shared data out, B and C respectively to mount A shared data directory, so B and C access to the data and a consistent

NFS schematic diagram

Second, NFS server-side installation configuration

Yum install-y nfs-utils rpcbind Host Installation

Sub-machine installation

Yum Install-y nfs-utils

Vim/etc/exports//Add the following:

/home/nfstestdir assigning IP to a secondary machine

192.168.1.106/24 (rw,sync,all_squash,anonuid=1000,anongid=1000)

After you save the configuration file, perform the following preparation actions

Mkdir/home/nfstestdir

chmod 777/home/nfstestdir

Systemctl Start Rpcbind

Systemctl Start NFS

Systemctl Enable Rpcbind

Systemctl Enable NFS Host server boot

Systemctl Disable NFS

Three, NFS configuration options

RW Read/write

RO Read Only

Sync sync mode, memory data is written to disk in real time

Async non-synchronous mode

No_root_squash Client Mounts NFS shared directory, the root user is not constrained and permissions are large

Root_squash with the above option, the root user on the client receives a constraint that is limited to a normal user

All_squash all users on the client are limited to an ordinary user when using the NFS shared directory

Anonuid/anongid is used with the above options to define the UID and GID of the qualified user

Client-side Secondary machine mount

Yum Install-y nfs-utils

SHOWMOUNT-E 192.168.1.101//IP for NFS server host IP

Error, network is not through, firewall caused

Both the host and the client are shutting down the firewall

Systemctl Stop Firewalld

Setenforce 0

Client again showmount-e 192.168.1.101

Host Showmount-e 192.168.1.106

The client mounts the/home/nfstestdir directory to the host/MNT directory

Mount-t NFS 192.168.1.101:/home/nfstestdir/mnt Mount

Df-h can see the server-side shared directory/mnt

Touch/mnt/aminglinux.txt

Ls-l/mnt/aminglinux.txt//You can see that both the owner and the group of the file are 1000

Linux centosvmware NFS Introduction, NFS server-side installation configuration, NFS configuration options

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.