serverapps:zfs:nfs
文書の過去の版を表示しています。
目次
NFS
ZFSでのNFS共有
マウント場所作成
# zfs create /zpool0/share
nfsで共有
# 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
rc.conf
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
を実行するとわかります。
NFSマウント
NFS クライアント設定
/etc/rc.conf に以下の行を追加。
nfs_client_enable="YES" # This host is an NFS client (or NO).
NFS クライアント起動
#/etc/rc.d/nfsclient start
マウント場所作成
# md /mount/here
NFS クライアント設定(手動)
# mount -t nfs xxx.yyy.zzz.abc:/zpool0/share /mount/here
NFS クライアント設定(起動時)
/etc/fstab
xxx.yyy.zzz.abc:/zpool0/share /mount/here nfs rw 0 0
serverapps/zfs/nfs.1492147293.txt.gz · 最終更新: 2017/04/14 05:21 by 127.0.0.1