本文轉載自翱翔的水滴《GlusterFS六大卷模式說明》 node
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
(如圖,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.)
(如圖,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 0~RAID 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/