内容へ移動
fl8 Wiki
ユーザ用ツール
ログイン
サイト用ツール
検索
ツール
文書の表示
以前のリビジョン
バックリンク
最近の変更
メディアマネージャー
サイトマップ
ログイン
>
最近の変更
メディアマネージャー
サイトマップ
現在位置:
Dokuwiki.fl8.jp
»
01_linux
»
01_net
»
30 NFSサーバ
トレース:
01_linux:01_net:30_nfsサーバ
この文書は読取専用です。文書のソースを閲覧することは可能ですが、変更はできません。もし変更したい場合は管理者に連絡してください。
====== 30 NFSサーバ ====== ====== サーバ側 ====== IP:192.168.30.250 ===== ①インストール ===== <code console> # yum install nfs-utils </code> ===== ②nfs設定ファイル ===== 192.168.30.0/24からのみマウントさせる。 <code console> # vi /etc/exports /export/common 192.168.30.0/24(rw,async,no_root_squash) </code> ==== root_squash ==== root_squashを設定した場合は、uid/gid が 0 のリクエストを annonymous uid/gid にマッピングする。 ※つまりrootでアクセスしないようにして、セキュリティ(誤って削除されないように)を保つ意味です。 このオプションは、 root 以外の uid には適用されない。 ===== ③portmapを起動する ===== <code console> # /etc/rc.d/init.d/portmap start </code> ===== ④nfsを起動する ===== <code console> # /etc/rc.d/init.d/nfs start </code> ===== ⑤iptableを利用している場合 ===== /etc/sysconfig/nfsへ下記を追加 <code> STATD_PORT=32765 STATD_OUTGOING_PORT=32766 MOUNTD_PORT=32767 LOCKD_TCPPORT=32768 LOCKD_UDPPORT=32768 </code> nfsポート(2049)、ポートマッパー(111)、上記のマウントポートなど(32765:32768)を開ける <code console> iptables -A INPUT -p tcp -m tcp -m multiport --dports 111,2049 -j ACCEPT iptables -A INPUT -p tcp -m tcp --dport 32765:32768 -j ACCEPT iptables -A INPUT -p udp -m udp -m multiport --dports 111,2049 -j ACCEPT iptables -A INPUT -p udp -m udp --dport 32765:32768 -j ACCEPT </code> ====== クライアント側 ====== IP:192.168.30.10 <code console> # mount -t nfs 192.168.30.250:/export /mnt </code> ===== エラー1 ===== この場合NFSサーバ側 hosts.allow で開放されてない <code console> # mount -t nfs 192.168.30.250:/export /mnt mount: mount to NFS server '192.168.30.250' failed: RPC Error: Program not registered. </code> ===== エラー2 ===== <code> mount: wrong fs type, bad option, bad superblock on hogehogehoge, missing codepage or helper program, or other error (for several filesystems (e.g. nfs, cifs) you might need a /sbin/mount.<type> helper program) In some cases useful info is found in syslog - try dmesg | tail or so </code> ==== 対応 ==== 必要なモジュールがない。 下記をインストール。 # yum install nfs-utils ===== エラー3 ===== <code> # mount 192.168.11.51:/work /mnt/work mount.nfs: Input/output error </code> ==== 対応 ==== これはクライアント側で、portmapが起動してない時のエラーなのでportmapを起動 # /etc/init.d/portmap start {{tag>NFS}}
01_linux/01_net/30_nfsサーバ.txt
· 最終更新: 2024/08/16 02:08 by
matsui
ページ用ツール
文書の表示
以前のリビジョン
バックリンク
文書の先頭へ