【转载】GlusterFS六大卷模式說明

本文转载自翱翔的水滴《GlusterFS六大卷模式說明》 node

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 dom

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.) tcp

GlusterFS六大卷模式說明 - 翱翔的水滴 - 翱翔的水滴

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

Create the distributed volume: 分布式

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

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.)

GlusterFS六大卷模式說明 - 翱翔的水滴 - 翱翔的水滴

(如圖,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.)

GlusterFS六大卷模式說明 - 翱翔的水滴 - 翱翔的水滴

(如圖,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.

例如:

GlusterFS六大卷模式說明 - 翱翔的水滴 - 翱翔的水滴

GlusterFS六大卷模式說明 - 翱翔的水滴 - 翱翔的水滴

GlusterFS六大卷模式說明 - 翱翔的水滴 - 翱翔的水滴

GlusterFS六大卷模式說明 - 翱翔的水滴 - 翱翔的水滴

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

   分布式条带卷条带文件在集群中的两个或两个以上的节点。为了达到最佳效果,你应该使用分布式条带卷的要求是扩展存储和高访问很是大的文件的并发环境是相当重要的。(簡介:分布式的条带卷,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.)

GlusterFS六大卷模式說明 - 翱翔的水滴 - 翱翔的水滴

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.)

GlusterFS六大卷模式說明 - 翱翔的水滴 - 翱翔的水滴

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.)

GlusterFS六大卷模式說明 - 翱翔的水滴 - 翱翔的水滴

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.

例如:

GlusterFS六大卷模式說明 - 翱翔的水滴 - 翱翔的水滴

GlusterFS六大卷模式說明 - 翱翔的水滴 - 翱翔的水滴

例如:

GlusterFS六大卷模式說明 - 翱翔的水滴 - 翱翔的水滴

GlusterFS六大卷模式說明 - 翱翔的水滴 - 翱翔的水滴

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

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

(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.)

GlusterFS六大卷模式說明 - 翱翔的水滴 - 翱翔的水滴

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/szy8706@yeah/blog/static/62713185201351510303223/

相关文章
相关标签/搜索