NFS Limited Export attribute instance, etc.

Source: Internet
Author: User

Instance:

Server for NFS: 172.16.100.1

Client: 172.16.100.3


1. Create a mount point and mount it on the client:

S#vim/etc/exports

/data 172.16.100.3/16 (rw)

/read 172.16.100.3/16 (RO)


C#mount-t NFS 172.16.100.1:/data/sqld/mdata


C#showmount-a 172.16.100.1

C#SHOWMOUNT-E 172.16.100.1

C#showmount-d 172.16.100.1


2. Do not restart the service re-export

S#s#vim/etc/exports

/data 172.16.100.3/16 (rw)

#/read 172.16.100.3/16 (RO)


S#exprotnfs-rav re-export


C#SHOWMOUNT-E 172.16.100.1


3. Qualifying Export Properties

Authorization for NFS is based on the UID and GID of the account.


S#id Hadoop

uid=502 gid=502

S#setfacl-m U:hadoop:rwx/read

S#su-hadoop

S$cd/data

S$touch A.hadoop



C#groupadd-g 502 OpenStack

C#useradd-u 502-g 502 OpenStack


S#exportfs-ra


C#mount-t NFS 172.16.100.1:/data/sqld/mdata

C#ll/sqld/mdata

A.hadoop OpenStack OpenStack


C#su-openstackl

C$cd/sqld/mdata

C$touch B.openstack


S#ll/read


At this point, we find that the genus B.openstack belong to Hadoop.


S#useradd-u 510 Nfstest

S#cd/data

S#touch C.nfstest

S#chown nfstest:nfstest C.nfstest

S#vim/etc/exprots

/data 172.16.100.3/16 (rw,all_squash,anonuid=510,nanogid=510) qualifying export Properties

#/read 172.16.100.3/16 (RO)


S#exportfs-rav


C#umount/sqld/mdata

C#mount-t NFS 172.16.100.1:/data/sqld/mdata

C#ll/sqld/mdata


4. Mount the client:

C#vim/etc/fstab

172.16.100.1:/data/sqld/mdata NFS Defaults,_rnetdev 0 0


5. The server process uses a fixed port:

S#vim/etc/sysconfig/nfs

mountd_port=892

rquotad_prot=875

lockd_tcpport=32083

lockd_udpport=32769


This article is from "Small Private blog" blog, please be sure to keep this source http://ggvylf.blog.51cto.com/784661/1659426

NFS Limited Export attribute instance, etc.

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.