NFS: Difference between revisions
From Leo's Notes
This page was last edited on 30 November 2018, at 18:59.
| Line 45: | Line 45: | ||
# firewall-cmd --reload | # firewall-cmd --reload | ||
}} | }} | ||
=== NFSv4 ID Mapping === | |||
* See: http://dfusion.com.au/wiki/tiki-index.php?page=Why+NFSv4+UID+mapping+breaks+with+AUTH_UNIX | |||
=== Troubleshooting === | === Troubleshooting === | ||
Revision as of 18:59, 30 November 2018
FreeBSD
To set a FreeBSD machine up as a NFS server, add the following lines to /etc/rc.conf
mountd_enable="YES"
nfs_server_enable="YES"
rpcbind_enable="YES"
rpc_lockd_enable="YES"
rpc_statd_enable="YES"
mountd_flags="-r"
Since /storage is a single mount, you will need to define the same directories exactly the same for all the different permissions you want to define in /etc/exports. For example:
/storage/downloads /storage/backups/esxi -ro -network 10.1.1.0 -mask 255.255.255.0
/storage/downloads /storage/backups/esxi -maproot=root -network 10.1.1.2 -mask 255.255.255.255
It would be invalid if the second line had only /storage/downloads as it will cause the first entry to be ignored by the parser.
To apply your changes, restart mountd.
service mountd restart
showmount should show both exports:
showmount -e
Exports list on localhost:
/storage/downloads 10.1.1.0 10.1.1.2
/storage/backups/esxi 10.1.1.0 10.1.1.2
Linux
Firewall
# firewall-cmd --permanent --add-service=nfs
# firewall-cmd --permanent --add-service=mountd
# firewall-cmd --permanent --add-service=rpc-bind
# firewall-cmd --reload
NFSv4 ID Mapping
Troubleshooting
rpc.nfsd: writing fd to kernel failed: errno 111 (Connection refused)
You need to start rpc.bind
/etc/init.d/rpcbind start
| ||||||