ClusterStorage-236-3-在节点上配置存储卷volume

0.实验环境图

1.创建分布式存储

在节点servera上操作,创建存储卷(默认为分布式存储),设置允许访问的网段,开启服务端ssl功能,开启客户端ssl功能,设置ssl授权节点,启动存储卷。

[root@servera ~]# gluster volume create testvol servera:/bricks/test/testvol_n1 serverb:/bricks/test/testvol_n2
volume create: testvol: success: please start the volume to access data
[root@servera ~]# gluster volume set testvol auth.allow 172.25.250.*
volume set: success
[root@servera ~]# gluster volume set testvol server.ssl on
volume set: success
[root@servera ~]# gluster volume set testvol client.ssl on
volume set: success
[root@servera ~]# gluster volume set testvol auth.ssl-allow 'servera.lab.example.com,serverb.lab.example.com,serverc.lab.example.com,serverd.lab.example.com,servere.lab.example.com,workstation.lab.example.com'
volume set: success
[root@servera ~]# gluster volume info testvol
 
Volume Name: testvol
Type: Distribute
Volume ID: 528cdf0b-39a1-460d-91bc-b45f6c2ed055
Status: Created
Number of Bricks: 2
Transport-type: tcp
Bricks:
Brick1: servera:/bricks/test/testvol_n1
Brick2: serverb:/bricks/test/testvol_n2
Options Reconfigured:
auth.ssl-allow: servera.lab.example.com,serverb.lab.example.com,serverc.lab.example.com,serverd.lab.example.com,servere.lab.example.com,workstation.lab.example.com
client.ssl: on
server.ssl: on
auth.allow: 172.25.250.*
performance.readdir-ahead: on

[root@servera ~]# gluster volume start testvol
volume start: testvol: success
 

2.复制式存储

在节点servera上操作,创建存储卷(指定replica参数),设置允许访问的网段,开启服务端ssl功能,开启客户端ssl功能,设置ssl授权节点,启动存储卷。

[root@servera ~]# gluster volume create secvol replica 2 serverc:/bricks/sec/secvol_n3 serverd:/bricks/sec/secvol_n4
volume create: secvol: success: please start the volume to access data
[root@servera ~]# gluster volume set secvol auth.allow 172.25.250.*
volume set: success
[root@servera ~]# gluster volume set secvol server.ssl on
volume set: success
[root@servera ~]# gluster volume set secvol client.ssl on
volume set: success
[root@servera ~]# gluster volume set secvol auth.ssl-allow 'servera.lab.example.com,serverb.lab.example.com,serverc.lab.example.com,serverd.lab.example.com,servere.lab.example.com,workstation.lab.example.com'
volume set: success
[root@servera ~]# gluster volume info secvol
 
Volume Name: secvol
Type: Replicate
Volume ID: 573c31d4-984c-42fe-b7ac-47b9bb1e4c4f
Status: Created
Number of Bricks: 1 x 2 = 2
Transport-type: tcp
Bricks:
Brick1: serverc:/bricks/sec/secvol_n3
Brick2: serverd:/bricks/sec/secvol_n4
Options Reconfigured:
auth.ssl-allow: servera.lab.example.com,serverb.lab.example.com,serverc.lab.example.com,serverd.lab.example.com,servere.lab.example.com,workstation.lab.example.com
client.ssl: on
server.ssl: on
auth.allow: 172.25.250.*
performance.readdir-ahead: on
[root@servera ~]# gluster volume start secvol
volume start: secvol: success
 

3.分布复制式

在节点servera上操作,创建存储卷(指定replica参数),设置允许访问的网段,开启服务端ssl功能,开启客户端ssl功能,设置ssl授权节点,启动存储卷。

[root@servera ~]# gluster volume create prodvol replica 2 servera:/bricks/prod/prodvol_n1 serverb:/bricks/prod/prodvol_n2 serverc:/bricks/prod/prodvol_n3 serverd:/bricks/prod/prodvol_n4
volume create: prodvol: success: please start the volume to access data
[root@servera ~]# gluster volume set prodvol auth.allow 172.25.250.*
volume set: success
[root@servera ~]# gluster volume set prodvol server.ssl on
volume set: success
[root@servera ~]# gluster volume set prodvol client.ssl on
volume set: success
[root@servera ~]# gluster volume set prodvol auth.ssl-allow 'servera.lab.example.com,serverb.lab.example.com,serverc.lab.example.com,serverd.lab.example.com,servere.lab.example.com,workstation.lab.example.com'
volume set: success
[root@servera ~]# gluster volume info prodvol
 
Volume Name: prodvol
Type: Distributed-Replicate
Volume ID: a97102d2-a002-4f0b-8c2c-ecf4904fa79d
Status: Created
Number of Bricks: 2 x 2 = 4
Transport-type: tcp
Bricks:
Brick1: servera:/bricks/prod/prodvol_n1
Brick2: serverb:/bricks/prod/prodvol_n2
Brick3: serverc:/bricks/prod/prodvol_n3
Brick4: serverd:/bricks/prod/prodvol_n4
Options Reconfigured:
auth.ssl-allow: servera.lab.example.com,serverb.lab.example.com,serverc.lab.example.com,serverd.lab.example.com,servere.lab.example.com,workstation.lab.example.com
client.ssl: on
server.ssl: on
auth.allow: 172.25.250.*
performance.readdir-ahead: on
[root@servera ~]# gluster volume start prodvol
volume start: prodvol: success
 

猜你喜欢

转载自blog.csdn.net/ligan1115/article/details/88397477