GlusterFs教程第8章:GlusterFs快速入门指南-挂载卷设置


设置GlusterFs挂载卷

在所有节点上执行以下命令:

# mkdir -p /data/brick1/gv0

在任意单个节点上执行以下命令:

# gluster volume create gv0 replica 3 server1:/data/brick1/gv0 server2:/data/brick1/gv0 server3:/data/brick1/gv0
volume create: gv0: success: please start the volume to access data

# gluster volume start gv0
volume start: gv0: success

确认该挂载卷是否已经启用成功:

# gluster volume info

如果挂载成功,你可以看到以下内容:

Volume Name: gv0
Type: Replicate
Volume ID: f25cc3d8-631f-41bd-96e1-3e22a4c6f71f
Status: Started
Snapshot Count: 0
Number of Bricks: 1 x 3 = 3
Transport-type: tcp
Bricks:
Brick1: server1:/data/brick1/gv0
Brick2: server2:/data/brick1/gv0
Brick3: server3:/data/brick1/gv0
Options Reconfigured:
transport.address-family: inet

注意:如果显示卷未挂载成功,可以查看 /var/log/glusterfs/glusterd.log 日志文件来进行问题的调试,可接结合所有节点中的此日志文件进行问题排查