Linux NFS Configuration

Source: Internet
Author: User

Server for NFS

First, Ann and start NFS


1. Install NFS


Yum-y Install nfs-utils-*_64 nfs4-acl-tools*.64


2. Start NFS


#启动nfs要先启动rpc服务, after 6.0 rpcbind and Rpcidmap are the default RPC services

#如果没有启动rpc则会报错, resulting in a user Rights mapping error

Rpc.nfsd:unable to set any sockets for NFSD


Service Rpcbind Restart

Service NFS Restart


Start on #设置在运行级别2, 3, 4, 5

Chkconfig NFS On

Second, configure NFS


1. Port configuration file/etc/sysconfig/nfs




2. Related Documents and Orders


#维护nfs共享资源

/usr/sbin/exportfs


#记录客户端登录情况

/var/lib/nfs/*tab


#记录nfs共享目录完整权限设定

/var/lib/nfs/etab


#记录曾经连接到nfs服务器的相关客商信息

/var/lib/nfs/xtab


#查询服务器共享资源

/usr/sbin/showmount


3. configuration file/etc/exports


#共享目录主机/single ip/network segment/single domain name/entire domain name in parentheses for permissions or other parameters

/nfs 192.168.137.0/24 (rw) *.samba.local (RO)


4. Example



(1) Start NFS


Server Rpcbind Restart && Server NFS Restart


(2) Display server shared directory


/usr/sbin/showmount e 127.0.0.1

650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M01/6E/0B/wKioL1VyoLOz4CaqAABimcoA6oY790.jpg "/>

Or:

/usr/sbin/exportfs

650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M01/6E/0F/wKiom1VynxSRZWJtAAA99j1SjLE773.jpg "/>


(3) Mount NFS on Windows


Winodws Server 2008/2012 enables NFS clients in a role

Under the command line:

Mount 192.168.137.100:/nfs *

Or:

Mount 192.168.137.100:/nfs y:

* Indicates the next available drive letter, Y: indicates direct mount as Y disk

650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M02/6E/0B/wKioL1VyoLTD12syAABfiTM83SQ281.jpg "/>

Because the 192.168.137.0/24 network segment has only read permissions, the Write file is rejected:

650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M02/6E/0F/wKiom1VynxWjeqCKAAEcQQTPKsY017.jpg "/>


5. Problems encountered



(1) domain name cannot be resolved in/etc/exportx


When you start NFS, you are prompted to refer to DNS to resolve the domain address

650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M00/6E/0B/wKioL1VyoLSwLJsvAAFDKd3pT5U394.jpg "/>

This article is from the "Love On Action" blog, please be sure to keep this source http://1055745601.blog.51cto.com/5003160/1659186

Linux NFS Configuration

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.