Qualified export attribute instances of nfs, etc.
Example:
Nfs server: 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 Compact 16 (rw)
/ read 172.16.100.3 Compact 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
two。 Re-export without restarting the service
S#S#vim / etc/exports
/ data 172.16.100.3 Compact 16 (rw)
# / read 172.16.100.3 Universe 16 (ro)
S#exprotnfs-rav re-export
C#showmount-e 172.16.100.1
3. Qualify export attributes
The authentication of 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, you will find that the main group of b.openstack is 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 Compact 16 (rw,all_squash,anonuid=510,nanogid=510) qualified export attributes
# / read 172.16.100.3 Universe 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. Client boot mount:
C#vim / etc/fstab
172.16.100.1:/data / sqld/mdata nfs defaults,_netdev 00
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