GlusterFS : 分散構成2025/12/04 |
|
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 |
| | | |
+----------------------+ +----------------------+
⇑ ⇑
file1, file3 ... file2, file4 ...
|
|
前提として、クラスターを構成するノード群では GlusterFS に割り当てる領域は / パーティションとは別であることが推奨です。 |
|
| [1] | |
| [2] | 全ノードで、ボリュームに割り当てるディレクトリを作成しておきます。 ( 当例では、全ノードで [sdb1] を [/glusterfs] にマウント済み ) |
|
node01:~ # mkdir -p /glusterfs/distributed |
| [3] | いずれかのノードで以下のように設定します。 |
|
# 他のノードを探す node01:~ # gluster peer probe node02 peer probe: success. # 状態を表示 node01:~ # gluster peer status Number of Peers: 1 Hostname: node02 Uuid: e1cbfed0-c8e8-422b-917a-06701ef8c1fb State: Peer in Cluster (Connected) # ボリュームを作成 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 # 作成したボリュームを起動 node01:~ # gluster volume start vol_distributed volume start: vol_distributed: success # ボリューム情報確認 node01:~ # gluster volume info Volume Name: vol_distributed Type: Distribute Volume ID: 39a94595-f6ac-4b6c-9e67-a7b4e0be1bf2 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 ボリュームをマウントして利用するための クライアント側の設定はこちらを参照ください。 |
| Sponsored Link |
|
|