NFS導入

近頃 ubuntu で samba だと遅いと感じていたので、NFSだと少しは改善されるのではと希望で導入しました。

1. ubuntu への導入は Electronic Genome Ubuntu + NFSサーバでファイル共有 を参考に2台のマシンに導入

2. ネットワークドライブの Tera Station はなんと、NFS未対応だった。 samba と両対応なのが欲しくなった

3. 玄箱 Hiro's Bar 玄箱をNFSサーバ化する を参考に

自分が行った手順

1. install
sudo apt-get install portmap nfs-common nfs-kernel-server

rpcinfo -p でnfs可動を確認

2. edit

(1) 拒否する指定 /etc/hosts.deny
portmap:ALL
lockd :ALL
mountd :ALL
rquotad:ALL
statd :ALL

(2) 許可する指定 /etc/hosts.allow
ALL :127.0.0.1
portmap:192.168.1.
lockd :192.168.1.
rquotad:192.168.1.
mountd :192.168.1.
statd :192.168.1.

(3) 公開ディレクトリー指定 /etc/exports
/home/hogehoge 192.168.1.0/255.255.255.0(rw,sync)

3.再起動
sudo /etc/init.d/nfs-kernel-server restart

公開ディレクトリー確認 showmount -e localhost

4.クライアント
sudo mount -t nfs 192.168.1.2:/home/hogehoge /media/hogehoge