文書の過去の版を表示しています。
# zfs create /zpool0/share
# zfs set sharenfs="-network xxx.yyy.zzz.0 -mask 255.255.255.0 -maproot=root" zpool0/share
maproot=root ですが,共有先の root ユーザが NFS で共有されたファイルシステムに書き込む際に root として書き込む事を許可します
# zfs get sharenfs
rpcbind_enable="YES" mountd_enable="YES"
NFS用の各デーモンを起動しますが、依存関係があるため起動順序が重要です。 (rcorder /etc/rc.d/* というコマンドで順番はわかります)
# /etc/rc.d/rpcbind start # /etc/rc.d/mountd start # /etc/rc.d/nfsd start
実際にポートマップがどうなっているのかは、
# rpcinfo -p
を実行するとわかります。
/etc/rc.conf に以下の行を追加。
nfs_client_enable="YES" # This host is an NFS client (or NO).
#/etc/rc.d/nfsclient start
# md /mount/here
# mount -t nfs xxx.yyy.zzz.abc:/zpool0/share /mount/here
/etc/fstab
xxx.yyy.zzz.abc:/zpool0/share /mount/here nfs rw 0 0