Linux nfs service explain

nfs service introduction

  1. nfs (Network File System) network file system, which enables users to access the server's file system, just visit their native file systems, and multiple
    clients to share access to the file system.
  2. Currently nfs service, the more popular of the two components is nfs: nfsd, nfs-ganesha. The former system comes linux file system kernel mode, which is open source user space file
    system. Because nfs-ganesha runs in user mode advantage, the nfsd running in kernel mode, the memory allocation nfs-ganesha having flexible, more portable, easier expansion.
    The disadvantage is that nfs-ganesha current stability is not as nfsd.

How to build and nfsd nfs-ganesha Service

Machine environment centos7, due both use port 2049, so a server can only run one of them.

  1. Build nfsd services
    A. check whether the rpcbind and nfs-utils installed software
    rpm -qa | grep rpcbind nfs-utils

    B. If the above two software is not installed, need to install both
    yum install -y rpcbind nfs-utils

    C. B start the software installed
    systemctl Start the rpcbind && systemctl enable the rpcbind
    systemctl Start enable NFS NFS && systemctl

    D. nfs configuration file permissions
    configuration rights can directly modify / etc / exports file, you can at /etc/exports.d directory, add * .exports file.
    Contents of the file format is: directory IP / IP network segment (nfs option)
    the contents of each file occupies one line of authority, with the option to use more general term is, rw / ro, sync, no_root_squash , rw for read and write, ro represents only read
    sync, for write data into memory and hard drive to ensure data is not lost when the client time to mount as root, nfs server to be mapped to the root user.

    Load command authority E., exportfs -rav execute this command does not need to restart the nfs service.

    F. clients use the following command to mount, ip address 172.16.0.1 expressed server, vers on behalf of protocol type, and other support 3,4,4.1, / mnt indicates that the server's
    shared directory, / tmp is a local directory
    mount -t nfs 172.16.0.1:/mnt / tmp -o vers = 4

    G. After the success of the mount, use the df command, which acts nfs4 where nfs mounted file system

    can then, cd / tmp, this directory to read and write files and so on, and
    so far all the nfsd service set up is completed.

    H. View nfs log in the system log / var / log / messages can be opened with vim, nfs keyword search.

  2. nfs-ganesha build (continue writing tomorrow ha)

Guess you like

Origin www.cnblogs.com/wanshuafe/p/11802605.html
Recommended