ぬけラボ

φ(..)メモメモ

GlusterFS 壊れたノードを変更

GlusterFSノードが壊れた際の作業メモ

壊れたマシンのUuidを確認

生きてるマシンで以下のコマンド実行

# gluster peer status
Hostname: hoge
Uuid: hoge-cf46-4a15-be19-fuga
State: Peer in Cluster (Disconnected)

新しいマシンにGlusterFSインストール

# cd /usr/local/src
# wget http://download.gluster.org/pub/gluster/glusterfs/3.3/3.3.1/CentOS/epel-6/x86_64/glusterfs-3.3.1-1.el6.x86_64.rpm
# wget http://download.gluster.org/pub/gluster/glusterfs/3.3/3.3.1/CentOS/epel-6/x86_64/glusterfs-fuse-3.3.1-1.el6.x86_64.rpm
# wget http://download.gluster.org/pub/gluster/glusterfs/3.3/3.3.1/CentOS/epel-6/x86_64/glusterfs-server-3.3.1-1.el6.x86_64.rpm
# rpm -ivh glusterfs*

Uuid変更

新しいマシンのGlusterFS Uuidを壊れたマシンのUuidに変更する

# vim /var/lib/glusterd/glusterd.info
UUID=poyo-b544-4d16-83dc-piyo
↓
UUID=hoge-cf46-4a15-be19-fuga

再起動

# /etc/init.d/glusterd restart

peer追加

どれでもいいのでクラスタを組んでいたpeerを1台追加

# gluster peer probe fuga

再起動

# /etc/init.d/glusterd restart

確認

# gluster peer status
# gluster volume info