boss44 发表于 2015-9-9 14:32:39

GlusterFS配置管理(五)

  本节介绍如何配置您的存储环境GlusterFS卷,使用下列常见的场景:


[*]分布式(Distributed) - 分布在整个集群的文件。
[*]分布式复制(Distributed Replicated) - 复制数据跨越两个或两个以上的节点在集群。
[*]分布式Stripes(Distributed Striped) - 跨集群中多个节点的Stripes 文件。
  确认挂载前已经启动相应卷。
  
  一、分布式(Distributed)配置   
  分布式卷分发整个集群的文件。你可以使用分布式的规模在一个小时期的停机时间是可以接受的,在磁盘交换档案的情况下环境的存储卷。
  注:在分布式卷的磁盘出现故障,造成严重损失的数据,因为目录的内容是随机传遍集群。
  配置一个分布式的卷:
  1、创建一个由卷组成的值得信赖的存储池。
  2、使用下列命令创建一个卷:



$gluster volume create NEW-VOLNAME NEW-BRICK...
  
  例如,使用4台服务器创建一个分布式卷:



$gluster volume create test-volume transport tcp server1:/exp1 server2:/exp2 server3:/exp3 server4:/exp4
Creation of volume distribute has been successful
  
  你可以使用下面命令查看卷的信息:



$gluster volume info
Volume Name: test-volume
Type: None
Status: Created
Number of Bricks: 4
Bricks:
Brick1: server1:/exp1
Brick2: server2:/exp2
Brick3: server3:/exp3
Brick4: server4:/exp4
  
  在InfiniBand基础上用4台存储服务器创建一个分布式卷:



$gluster volume create test-volume transport rdma server1:/exp1 server2:/exp2 server3:/exp3 server4:/exp4
Creation of volume distribute has been successful
  
  3、 设置其他需要参数: You may wish to set additional options at this point, such as auth.allow or auth.reject, for example: 您可以对auth.allow或auth.reject设置附加选项:



$gluster volume set test-volume auth.allow 10.*
  
  4、使用下面命令启动卷:



$gluster volume start VOLNAME
  
  例如:



$gluster volume start test-volume
Starting volume test-volume has been successful
  
  5.、可选显示卷的信息,再次确认该卷已经开始使用以下命令:



$gluster volume info
Volume Name: test-volume
Type: None
Status: Started
Number of Bricks: 4
Bricks:
Brick1: server1:/exp1
Brick2: server2:/exp2
Brick3: server3:/exp3
Brick4: server4:/exp4
页: [1]
查看完整版本: GlusterFS配置管理(五)