NFSについて調査するにために構築した時のメモ
NFSサーバ構築
1.nfsサーバインストール
apt-get install nfs-kernel-server
2.「/etc/exports」設定変更
/share_1 *(rw,all_squash,sync,anonuid=1000,anongid=1000,insecure,no_subtree_check) /share_2 *(rw,all_squash,sync,anonuid=1000,anongid=1000,insecure,no_subtree_check)
3.設定読み込み
exportfs -r
4.nfsクライアントからのセキュリティ許可
PORT | 通信 | プロセス |
---|---|---|
111 | TCP/UDP | portmapper |
2049 | TCP/UDP | nfs |
NFSクライアント設定
1.nfsクライアントインストール
apt-get install nfs-common
2.fatab編集
<IP or Host>:/share_1 /mnt_1 nfs rsize=8192,wsize=8192,hard,intr 0 0 <IP or Host>:/share_2 /mnt_2 nfs rsize=8192,wsize=8192,hard,intr 0 0
3.マウント
mount -a
※NFSボリュームアンマウント
umount.nfs4 <IP or Host>:/share_1 umount.nfs4 <IP or Host>:/share_2