Fedora 30
Sponsored Link

GlusterFS 6 : 分散構成2019/05/10

 
GlusterFS によるストレージクラスターの設定です。
例として、2台の GlusterFS サーバーで分散構成のボリュームを作成します。
2台のサーバーにファイル単位で分散保管される構成です。
なお、当例ではサーバー2台のシンプルな構成ですが、GlusterFS サーバーのボリュームは 2台以上構成も可能、且つ、ボリュームは複数クライアントからマウント可能です。
                                  |
+----------------------+          |          +----------------------+
| [GlusterFS Server#1] |10.0.0.51 | 10.0.0.52| [GlusterFS Server#2] |
|   node01.srv.world   +----------+----------+   node02.srv.world   |
|                      |                     |                      |
+----------------------+                     +----------------------+

 
前提として、クラスターを構成するノード群では GlusterFS に割り当てる領域は / パーティションとは別であることが推奨です。 ( / 配下の任意のディレクトリでも設定は可能だが、非推奨のため、設定の際に強制オプションの付加が必要 )
[1]
[2] 全ノードで、ボリュームに割り当てるディレクトリを作成しておきます。
( 当例では、全ノードで sdb1 を /glusterfs にマウント済み )
[root@node01 ~]#
mkdir /glusterfs/distributed

[3] いずれかのノードで以下のように設定します。
# 他のノードを探す

[root@node01 ~]#
gluster peer probe node02

peer probe: success.
# 状態を表示

[root@node01 ~]#
gluster peer status

Number of Peers: 1

Hostname: node02
Uuid: 52fa2615-afe2-423c-9af9-6451d3aafbe5
State: Peer in Cluster (Connected)

# ボリュームを作成

[root@node01 ~]#
gluster volume create vol_distributed transport tcp \
node01:/glusterfs/distributed \
node02:/glusterfs/distributed

volume create: vol_distributed: success: please start the volume to access data
# 作成したボリュームを起動

[root@node01 ~]#
gluster volume start vol_distributed

volume start: vol_distributed: success
# ボリューム情報確認

[root@node01 ~]#
gluster volume info


Volume Name: vol_distributed
Type: Distribute
Volume ID: d1b956b2-b53d-437d-8ce7-5d36d338a2a8
Status: Started
Snapshot Count: 0
Number of Bricks: 2
Transport-type: tcp
Bricks:
Brick1: node01:/glusterfs/distributed
Brick2: node02:/glusterfs/distributed
Options Reconfigured:
transport.address-family: inet
nfs.disable: on
[4]
GlusterFS ボリュームをマウントして利用するための クライアント側の設定はこちらを参照ください
関連コンテンツ