LoginSignup
15
16

More than 5 years have passed since last update.

AWSのマウントでハマった時のメモ

Posted at

エラー&対策をマウントについて調べながら。

/etc/fstab設定

fstabにデバイス名、マウントポイント、ファイルシステム、オプションを設定

vi /etc/fstab
server1:/hoge /hoge nfs rw,hard,intr 0 0

・fstabの設定
http://unixlife.jp/linux/system/fstab.html

mountコマンド

fstabに記述したマウントを設定。が、エラー。。

[hoge@hoge]$ mount -a
mount.nfs: rpc.statd is not running but is required for remote locking.
mount.nfs: Either use '-o nolock' to keep locks local, or start statd.
mount.nfs: an incorrect mount option was specified

mount.nfs: rpc.statd is not running but is required for remote locking.

rpc.statd が動いてない、リモートをロックするために必要。

mount.nfs: Either use '-o nolock' to keep locks local, or start statd.

ローカルロックを保つために'-o nolock'を使うか、statdを開始して。

mount.nfs: an incorrect mount option was specified

誤ったマウントオプションが指定された。

・mount ファイルシステムをマウントする
http://codezine.jp/unixdic/w/mount

調査

■rpc

Remote Procedure Call の略称
ネットワークによって接続された他のコンピュータ上でプログラムを呼び出し、実行させるための手法のことである。

■statd

NFS 上でロック・サービスのためのクラッシュ機能およびリカバリー機能を提供します。
・statd デーモン
http://publib.boulder.ibm.com/infocenter/aix/v7r1/index.jsp?topic=%2Fcom.ibm.aix.cmds%2Fdoc%2Faixcmds5%2Fstatd.htm

■'-o nolock'

マウント時にロックをしない。
→リモートをロックしない?固定しない?

・ファイルサーバの構築(nfs)
参考項目:マウント時のエラーについて
http://kajuhome.com/nfs.shtml

rpcプロセスが動いてない予感!

と思ったら書いてあった。

クライアント側でポートマッピングサービス「portmap」または「rpcbind」を起動する必要があります。

ということで、起動。

[hoge@hoge]$ service rpcbind status
rpcbind は停止しています
[hoge@hoge]$ service rpcbind start
rpcbind を起動中:    

/etc/exports

server1 の/etc/exports が設定していないのに気がつく。

vi /etc/exports
/hoge hoge_server_ip/255.255.255.255(rw,async)

共有するディレクトリと、そのアクセス許可を設定。

再度マウント!

[hoge@hoge]$ mount -a
mount.nfs: requested NFS version or transport protocol is not supported

requested NFS version or transport protocol is not supported

要求されたNFSバージョンやトランスポートプロトコルがサポートされてない。

明示的に指定してやる必要がありそう。

[hoge@hoge]$ mount -t nfs -o proto=tcp,rw,hard,intr server1:/hoge /hoge

できた!
mountproto=tcp じゃなくて proto=tcp にするのがハマる。

・NFSを使用した、ボリュームの手動マウント
http://dai_yamashita.bitbucket.org/glusterfs_ja/Manually_Mounting_Volumes_Using_NFS.html

[hoge@hoge]$ df -h

確認して完了!

その他参考

・NFSトラブルシュート
http://extstrg.asabiya.net/pukiwiki/index.php?NFS%A5%C8%A5%E9%A5%D6%A5%EB%A5%B7%A5%E5%A1%BC%A5%C8

・GlusterFS
http://gluster.org/community/documentation/index.php/Gluster_3.2:_Manually_Mounting_Volumes_Using_NFS

15
16
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
15
16