這是本文件的舊版!


NFS

Server

/etc/exports

/usr/home/nfs/public -maproot=root 10.130.48.166
/usr/home/nfs/private -maproot=root -ro 10.130.48.166

if exports is edited, use service mountd reload to reload

if zfs is used, edit exports at /etc/zfs/exports the exported path needs to be zfs dataset.

zfs create zroot/usr/home/nfs
zfs create zroot/usr/home/nfs/public
zfs create zroot/usr/home/nfs/private

service config

add following to rc.conf

rpcbind_enable="YES"
nfs_server_enable="YES"
mountd_enable="YES"
mountd_flags="-r"

start service

start nfs server

service nfsd start

Client

nfs_client_enable="YES"

start service

start nfs client

service nfsclient start