GlusterFS 11 : 分散構成2025/11/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] にマウント済み ) |
|
[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: 7ba18e01-2177-44aa-96a9-9dcbafe771b0 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: c7246a92-4905-4dd3-a02d-0d78c0d9afcd 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 |
|
|