サイト管理者
なみかわみやこ
以前のリビジョンの文書です
元々はオープンソースで開発がされていた分散ストレージシステムの1つ
現在は、Redhatが取り込んでRed Hat Storage Serverとしてリリースしている。
いつもの通りCentOS/Scientific Linuxな環境に構築をしてみる。
英語は苦手だが、とりあえずQuickStartに目を通してみる。
Step 1 – Have at least two nodes
なんて事が書いてある。
いくら英語が苦手なオイラでも64bit OSじゃないとダメ!!って事はわかるぞ。よーし、64bit OSを用意すりゃ良いんだろ?
って思って64bitで検証してたんだけど
32bitしかインストール出来ないようなダメなサーバーくんをなんとか使えないのだろうか?という心の声が聞こえてきたのでソースファイルがあるならコンパイルしちゃえば良いのかな?とか思ってダウンロードサイトを見に行ってみたら。。。
ダウンロードサイトはここね CentOS Gluster
ん?
あーーーーーーーー
i386があるじゃないか!!いやいや、フォルダだけかも・・・・・・
はい、ちゃんとRPMが存在しました(--;)
なんてこったい。
そんな訳で、glusterfs-epel.repoを編集する
# Place this file in your /etc/yum.repos.d/ directory [glusterfs-epel] name=GlusterFS is a clustered file-system capable of scaling to several petabytes. baseurl=http://download.gluster.org/pub/gluster/glusterfs/3.3/3.3.1/CentOS/epel-6/$basearch/ enabled=1 skip_if_unavailable=1 gpgcheck=0 [glusterfs-swift-epel] name=GlusterFS is a clustered file-system capable of scaling to several petabytes. baseurl=http://download.gluster.org/pub/gluster/glusterfs/3.3/3.3.1/CentOS/epel-6/noarch enabled=1 skip_if_unavailable=1 gpgcheck=0 [glusterfs-source-epel] name=GlusterFS is a clustered file-system capable of scaling to several petabytes. - Source baseurl=http://download.gluster.org/pub/gluster/glusterfs/3.3/3.3.1/CentOS/epel-6/SRPMS enabled=0 skip_if_unavailable=1 gpgcheck=0
バージョンとかは適当に変えちゃってね
リポジトリの登録がちゃんと出来ていればyumでインストール出来てしまうので難しい事は何もない・・・
yum install glusterfs glusterfs-server glusterfs-fuse glusterfs-geo-replication
うむぅ。32bitでも動くじゃないか!
chkconfig glusterd on chkconfig glusterfsd on ついでにスタートしてみる。特にエラーもなく実行されるよ。たぶん・・・ service glusterd start service glusterfsd start
お互いが名前解決できるようにhostsに登録をしておく
vi /etc/hosts
gluster volume create ボリューム名 replica 2 transport tcp サーバー名1:ディレクトリ サーバー2:ディレクトリ
障害が発生したサーバーと同じホスト名・同じIP・同じ設定でGlusterFSを構築します
状況の確認
gluster peer status ダウンしているノードのステータスがDisconnectedになっているはず State: Peer in Cluster (Disconnected)
ボリュームにアサインされているBrickを確認
gluster vol info ボリューム名 Volume Name: ボリューム名 Type: Distributed-Replicate Volume ID: a3221ea9-fe65-4e97-9f20-2960cb81187d Status: Started Number of Bricks: 2 x 2 = 4 Transport-type: tcp Bricks: Brick1: gfs00:/data/brick00 Brick3: gfs00:/data/brick02 落ちてるサーバーに含まれるBrickは表示されない。 あたりまえだけど、本来は1サーバーに複数のBrickを出しても意味は無いw
ボリュームのステータスを確認するには
gluster vol status ボリューム名
復旧したサーバーから既存のノードを指定してpeer probeを実行
service glusterd start gluster peer probe 既存のノード
service glusterd restart service glusterfsd start
再レプリケーションを実行
gluster vol heal ボリューム名 full