GlusterFS六大卷模式說明

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了GlusterFS六大卷模式說明相关的知识,希望对你有一定的参考价值。

GlusterFS六大卷說明

 

 

 

第一,分佈卷

   在分布式卷文件被随机地分布在整个砖的体积。使用分布式卷,你需要扩展存储,冗余是重要或提供其他硬件/软件层。(簡介:分布式卷,文件通过hash算法随机的分布到由bricks组成的卷上。卷中资源仅在一台服务器上存储,在存储池中非镜像或条带模式。)

(In a distributed volumes files are spread randomly across the bricks in the volume. Use distributed volumes where you need to scale storage and redundancy is either not important or is provided by other hardware/software layers.

Note

Disk/server failure in distributed volumes can result in a serious loss of data because directory contents are spread randomly across the bricks in the volume.)

 

 

(如圖,File1和File2存放於server1,而File3存放於server2。)
 

Create the distributed volume:

# gluster volume create NEW-VOLNAME [transport [tcp | rdma | tcp,rdma]]

NEW-BRICK...

For example, to create a distributed volume with four storage servers using tcp:

# gluster volume create test-volume server1:/exp1 server2:/exp2 server3:/exp3 server4:/exp4

Creation of test-volume has been successful

Please start the volume to access data.

 

(Optional) You can display the volume information:

# gluster volume info

Volume Name: test-volume

Type: Distribute

Status: Created

Number of Bricks: 4

Transport-type: tcp

Bricks:

Brick1: server1:/exp1

Brick2: server2:/exp2

Brick3: server3:/exp3

Brick4: server4:/exp4

 

第二,復制卷

   复制卷创建跨多个砖的体积的文件的副本。您可以使用复制卷在环境中的高可用性和高可靠性是至关重要的。(簡介:复制式卷,类似raid1,replica数必须等于volume中brick所包含的存储服务器数,可用性高。创建一个两两互为备份的卷,存储池中一块硬盘损坏,不会影响到数据的使用,最少需要两台服务器才能创建分布镜像卷。)

 

(Replicated volumes create copies of files across multiple bricks in the volume. You can use replicated volumes in environments where high-availability and high-reliability are critical.

Note

The number of bricks should be equal to of the replica count for a replicated volume. To protect against server and disk failures, it is recommended that the bricks of the volume are from different servers.)

 

 

(如圖,File1同時存儲在server1和server2上。 File2也是如此。相當於server2中的文件是server1中文件的副本。)

 

Create the replicated volume:

# gluster volume create NEW-VOLNAME [replica COUNT] [transport [tcp |

rdma | tcp,rdma]] NEW-BRICK...

For example, to create a replicated volume with two storage servers:

# gluster volume create test-volume replica 2 transport tcp server1:/exp1 server2:/exp2

Creation of test-volume has been successful

Please start the volume to access data.

 

第三,条带卷

   条带卷条纹砖之间的数据的容量。为了达到最佳效果,你应该使用条带卷,只有在高并发环境下,访问非常大的文件。(簡介:条带式卷,类似与raid0,stripe数必须等于volume中brick所包含的存储服务器数,文件被分成数据块,以Round Robin的方式存储在bricks中,并发粒度是数据块,大文件性能好。)

(Striped volumes stripes data across bricks in the volume. For best results, you should use striped volumes only in high concurrency environments accessing very large files.

Note

The number of bricks should be a equal to the stripe count for a striped volume.)

 

 

(如圖,File被分割成6段,1,3,5存放在server1中,2,4,6存放於server2中。)

 

Create the striped volume:

# gluster volume create NEW-VOLNAME [stripe COUNT] [transport [tcp |

rdma | tcp,rdma]] NEW-BRICK...

For example, to create a striped volume across two storage servers:

# gluster volume create test-volume stripe 2 transport tcp server1:/exp1 server2:/exp2

Creation of test-volume has been successful

Please start the volume to access data.

 

例如:

 

 

 

 

 

 

 

 

 

 

 

 

第四,分佈式条带卷(復合型)

   分布式条带卷条带文件在集群中的两个或两个以上的节点。为了达到最佳效果,你应该使用分布式条带卷的要求是扩展存储和高访问非常大的文件的并发环境是至关重要的。(簡介:分布式的条带卷,volume中brick所包含的存储服务器数必须是stripe的倍数(>=2倍),兼顾分布式和条带式的功能。每个文件分布在四台共享服务器上,通常用于大文件访问处理,最少需要 4 台服务器才能创建分布条带卷。)

(Distributed striped volumes stripes files across two or more nodes in the cluster. For best results,you should use distributed striped volumes where the requirement is to scale storage and in high concurrency environments accessing very large files is critical.

Note

The number of bricks should be a multiple of the stripe count for a distributed striped volume.)

 

 

 

 

Create the distributed striped volume:

# gluster volume create NEW-VOLNAME [stripe COUNT] [transport [tcp |

rdma | tcp,rdma]] NEW-BRICK...

For example, to create a distributed striped volume across eight storage servers:

# gluster volume create test-volume stripe 4 transport tcp server1:/exp1 server2:/exp2

 server3:/exp3 server4:/exp4 server5:/exp5 server6:/exp6 server7:/exp7 server8:/exp8

Creation of test-volume has been successful

Please start the volume to access data.

 

第五,分布式復制卷(復合型)

   分配文件在复制砖的体积。您可以使用分布式复制卷要求规模的环境中存储和高可靠性是至关重要的。分布复制卷也提供了更好的读取性能在大多数环境

。(簡介:分布式的复制卷,volume中brick所包含的存储服务器数必须是 replica 的倍数(>=2倍),兼顾分布式和复制式的功能。)

(Distributes files across replicated bricks in the volume. You can use distributed replicated volumes in environments where the requirement is to scale storage and high-reliability is critical. Distributed replicated volumes also offer improved read performance in most environments.

Note

The number of bricks should be a multiple of the replica count for a distributed replicated volume. Also, the order in which bricks are specified has a great effect on data protection. Each replica_count consecutive bricks in the list you give will form a replica set, with all replica sets combined into a volume-wide distribute set. To make sure that replica-set members are not placed on the same node, list the first brick on every server, then the second brick on every server in the same order, and so on.)

 

 

 

 

Create the distributed replicated volume:

# gluster volume create NEW-VOLNAME [replica COUNT] [transport [tcp |

rdma | tcp,rdma]] NEW-BRICK...

For example, four node distributed (replicated) volume with a two-way mirror:

# gluster volume create test-volume replica 2 transport tcp server1:/exp1 server2:/exp2 server3:/exp3 server4:/exp4

Creation of test-volume has been successful

Please start the volume to access data.

For example, to create a six node distributed (replicated) volume with a two-way mirror:

# gluster volume create test-volume replica 2 transport tcp server1:/exp1 server2:/exp2 server3:/exp3 server4:/exp4 server5:/exp5 server6:/exp6

Creation of test-volume has been successful

Please start the volume to access data.

 

第六,   条带復制卷(復合型)

条带復制卷条带数据在复制集群中的砖。为了达到最佳效果,你应该使用条纹复制卷在高并发环境下并行访问非常大的文件和性能是至关重要的。在此版本中,这种类型的卷配置仅支持地图减少工作量。

(Striped replicated volumes stripes data across replicated bricks in the cluster. For best results, you should use striped replicated volumes in highly concurrent environments where there is parallel access of very large files and performance is critical. In this release, configuration of this volume type is supported only for Map Reduce workloads.

Note

The number of bricks should be a multiple of the replicate count and stripe count for a striped replicated volume.)

 

 

 

Create a striped replicated volume :

# gluster volume create NEW-VOLNAME [stripe COUNT] [replica COUNT]

[transport [tcp | rdma | tcp,rdma]] NEW-BRICK...

For example, to create a striped replicated volume across four storage servers:

# gluster volume create test-volume stripe 2 replica 2 transport tcp server1:/exp1

 server2:/exp2 server3:/exp3 server4:/exp4

Creation of test-volume has been successful

Please start the volume to access data.

To create a striped replicated volume across six storage servers:

# gluster volume create test-volume stripe 3 replica 2 transport tcp server1:/exp1

 server2:/exp2 server3:/exp3 server4:/exp4 server5:/exp5 server6:/exp6

Creation of test-volume has been successful

Please start the volume to access data.

例如:

 

 

 

 

 

 

 

例如:

 

 

 

 

 

 

 

 
 

 

第七,分布式条带復制卷(三種混合型)

   分布式条带复制卷分布条带数据在复制砖集群。为了获得最佳效果,你应该使用分布在高并发的条带复制卷环境下并行访问非常大的文件和性能是至关重要的。在此版本中,这种类型的卷配置仅支持地图减少工作量。

(Distributed striped replicated volumes distributes striped data across replicated bricks in the cluster. For best results, you should use distributed striped replicated volumes in highly concurrent environments where parallel access of very large files and performance is critical. In this release,configuration of this volume type is supported only for Map Reduce workloads.

Note

The number of bricks should be a multiples of number of stripe count and replica count for adistributed striped replicated volume.)

 

 

 

Create a distributed striped replicated volume using the following command:

# gluster volume create NEW-VOLNAME [stripe COUNT] [replica COUNT]

[transport [tcp | rdma | tcp,rdma]] NEW-BRICK...

For example, to create a distributed replicated striped volume across eight storage servers:

# gluster volume create test-volume stripe 2 replica 2 transport tcp server1:/exp1

 server2:/exp2 server3:/exp3 server4:/exp4 server5:/exp5 server6:/exp6 server7:/exp7

 server8:/exp8

Creation of test-volume has been successful

Please start the volume to access data.

 

 

 

 

 

 

 

 

 

 

 

 

 

 

RAID技术主要包含RAID 0RAID 7等数个规范,它们的侧重点各不相同,常见的规范有如下几种:

 

RAID 0:RAID 0连续以位或字节为单位分割数据,并行读/写于多个磁盘上,因此具有很高的数据传输率,但它没有数据冗余,因此并不能算是真正的RAID结构。RAID 0只是单纯地提高性能,并没有为数据的可靠性提供保证,而且其中的一个磁盘失效将影响到所有数据。因此,RAID 0不能应用于数据安全性要求高的场合。

RAID 1:它是通过磁盘数据镜像实现数据冗余,在成对的独立磁盘上产生互 为备份的数据。当原始数据繁忙时,可直接从镜像拷贝中读取数据,因此RAID 1可以提高读取性能。RAID 1是磁盘阵列中单位成本最高的,但提供了很高的数据安全性和可用性。当一个磁盘失效时,系统可以自动切换到镜像磁盘上读写,而不需要重组失效的数据。

RAID 0+1: 也被称为RAID 10标准,实际是将RAID 0和RAID 1标准结合的产物,在连续地以位或字节为单位分割数据并且并行读/写多个磁盘的同时,为每一块磁盘作磁盘镜像进行冗余。它的优点是同时拥有RAID 0的超凡速度和RAID 1的数据高可靠性,但是CPU占用率同样也更高,而且磁盘的利用率比较低。

RAID 2:将数据条块化地分布于不同的硬盘上,条块单位为位或字节,并使用称为“加重平均纠错码(海明码)”的编码技术来提供错误检查及恢复。这种编码技术需要多个磁盘存放检查及恢复信息,使得RAID 2技术实施更复杂,因此在商业环境中很少使用。

RAID 3:它同RAID 2非常类似,都是将数据条块化分布于不同的硬盘上,区别在于RAID 3使用简单的奇偶校验,并用单块磁盘存放奇偶校验信息。如果一块磁盘失效,奇偶盘及其他数据盘可以重新产生数据;如果奇偶盘失效则不影响数据使用。RAID 3对于大量的连续数据可提供很好的传输率,但对于随机数据来说,奇偶盘会成为写操作的瓶颈。

RAID 4:RAID 4同样也将数据条块化并分布于不同的磁盘上,但条块单位为块或记录。RAID 4使用一块磁盘作为奇偶校验盘,每次写操作都需要访问奇偶盘,这时奇偶校验盘会成为写操作的瓶颈,因此RAID 4在商业环境中也很少使用。

RAID 5:RAID 5不单独指定的奇偶盘,而是在所有磁盘上交叉地存取数据及奇偶校验信息。在RAID 5上,读/写指针可同时对阵列设备进行操作,提供了更高的数据流量。RAID 5更适合于小数据块和随机读写的数据。

RAID 3与RAID 5相比,最主要的区别在于RAID 3每进行一次数据传输就需涉及到所有的阵列盘;而对于RAID 5来说,大部分数据传输只对一块磁盘操作,并可进行并行操作。在RAID 5中有“写损失”,即每一次写操作将产生四个实际的读/写操作,其中两次读旧的数据及奇偶信息,两次写新的数据及奇偶信息。

RAID 6:与RAID 5相比,RAID 6增加了第二个独立的奇偶校验信息块。两个独立的奇偶系统使用不同的算法,数据的可靠性非常高,即使两块磁盘同时失效也不会影响数据的使用。但RAID 6需要分配给奇偶校验信息更大的磁盘空间,相对于RAID 5有更大的“写损失”,因此“写性能”非常差。较差的性能和复杂的实施方式使得RAID 6很少得到实际应用。

RAID 7:这是一种新的RAID标准,其自身带有智能化实时操作系统和用于存储管理的软件工具,可完全独立于主机运行,不占用主机CPU资源。RAID 7可以看作是一种存储计算机(Storage Computer),它与其他RAID标准有明显区别。除了以上的各种标准,我们可以如RAID 0+1那样结合多种RAID规范来构筑所需的RAID阵列,例如RAID 5+3(RAID 53)就是一种应用较为广泛的阵列形式。用户一般可以通过灵活配置磁盘阵列来获得更加符合其要求的磁盘存储系统。



转载请注明:http://blog.163.com/[email protected]/blog/static/62713185201351510303223/

以上是关于GlusterFS六大卷模式說明的主要内容,如果未能解决你的问题,请参考以下文章

GlusterFS学习2

GlusterFS原创资源

GlusterFS原创资源

glusterfs集群

glusterfs 卷扩容与收缩

详解 GFS分布式文件系统 (条带卷/复制卷/分布式条带卷/分布式复制卷)