quickreference:nfs
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
quickreference:nfs [2024/06/10 20:19] – nfs quick reference guide rodolico | quickreference:nfs [2025/03/09 00:01] (current) – rodolico | ||
---|---|---|---|
Line 2: | Line 2: | ||
===== Some useful commands ===== | ===== Some useful commands ===== | ||
- | ====== NFS Quick Reference ====== | ||
- | ===== Commands ===== | ||
==== Finding mounts we can use ==== | ==== Finding mounts we can use ==== | ||
If you put the server' | If you put the server' | ||
<code bash> | <code bash> | ||
showmount -e serverip | showmount -e serverip | ||
+ | </ | ||
+ | |||
+ | ==== restart nfsd ==== | ||
+ | nfs on FreeBSD is very particular in which order you restart the services. In particular, rpcbind **must** be the first service restarted. To restart the entire system, use the following. Under normal circumstances, | ||
+ | |||
+ | <code bash> | ||
+ | service rpcbind restart | ||
+ | service nfsd restart | ||
+ | service mountd restart | ||
+ | service lockd restart | ||
+ | |||
+ | </ | ||
+ | |||
+ | |||
+ | ===== lockd ===== | ||
+ | |||
+ | ==== lockd not starting ==== | ||
+ | |||
+ | lockd can get messed up (on FreeBSD server). It says it starts, but it doesn' | ||
+ | < | ||
+ | |||
+ | This is because of a corrupt statd file. You can fix the problem, generally, with the following commands taken from [[https:// | ||
+ | <code bash> | ||
+ | service statd stop | ||
+ | service lockd stop | ||
+ | rm / | ||
+ | service statd start | ||
+ | service lockd start | ||
</ | </ | ||
Line 28: | Line 54: | ||
<code bash> | <code bash> | ||
service lockd status | service lockd status | ||
+ | </ | ||
+ | |||
+ | ===== Sample rc.conf ===== | ||
+ | |||
+ | <code autoconf rc.conf.nfs> | ||
+ | ### NFS | ||
+ | |||
+ | # enable rpcbind server | ||
+ | rpcbind_enable=" | ||
+ | |||
+ | # enable nfs server (v3) | ||
+ | nfs_server_enable=" | ||
+ | |||
+ | # uncomment to enable nfsv4 server | ||
+ | # nfsv4_server_enable=" | ||
+ | |||
+ | # enable mountd (required) | ||
+ | mountd_enable=" | ||
+ | |||
+ | # set flags for mountd (man 8 mountd) | ||
+ | # -h binds nfsd to a specific IP, so a machine with | ||
+ | # multiple IP's will only respond if this one is used for the | ||
+ | # request. | ||
+ | # -r allow a file to be mounted | ||
+ | # -p bind mountd to a particular port (helps with firewalls) | ||
+ | mountd_flags=" | ||
+ | |||
+ | # enable lockd | ||
+ | # uncomment the following lines if server side file locks are | ||
+ | # needed. Note you must replicate this on the clients | ||
+ | rpc_lockd_enable=" | ||
+ | rpc_statd_enable=" | ||
+ | |||
+ | # parameters for statd (man 8 rpc.statd) | ||
+ | # -d send debugging to syslog | ||
+ | # -p use static port (helps with firewalls) | ||
+ | # -h IP - bind to IP address | ||
+ | |||
+ | rpc_statd_flags=" | ||
+ | |||
+ | # parameters for lockd (man 8 rpc.lockd) | ||
+ | # -d send debugging to syslog | ||
+ | # -p use static port (helps with firewalls) | ||
+ | # -h IP - bind to IP address | ||
+ | rpc_lockd_flags=" | ||
</ | </ |
quickreference/nfs.1718068777.txt.gz · Last modified: 2024/06/10 20:19 by rodolico