Fedora 37
Sponsored Link

GlusterFS 10 : 分散構成2022/11/21

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

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

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

[root@node01 ~]#
gluster peer probe node02

peer probe: success.
# 状態を表示

[root@node01 ~]#
gluster peer status

Number of Peers: 1

Hostname: node02
Uuid: 9f75c4b9-045d-4e5b-a866-19368a7c0402
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: 2a7f8e33-d439-4d8a-9e9d-d9f2e8ddcd5c
Status: Started
Snapshot Count: 0
Number of Bricks: 2
Transport-type: tcp
Bricks:
Brick1: node01:/glusterfs/distributed
Brick2: node02:/glusterfs/distributed
Options Reconfigured:
storage.fips-mode-rchecksum: on
transport.address-family: inet
nfs.disable: on
[4]
GlusterFS ボリュームをマウントして利用するための クライアント側の設定はこちらを参照ください
関連コンテンツ