gluster volume

一、gluster Basic establishment
Brick:
A filesystem mountpoint
A *unit of storage used as a Glusterfs building block
Translator:
Logic between the bits and the Global Namespace
Layered to provide Glusterfs functionality
Volume:
bricks combined and passed though translators
Node/Peer
server running the gluster daemon and sharing volumes

二、Types of Volumes
(1)分佈式卷:Distributed Glusterfs Volume
gluster volume
file只能存儲在brick1或brick2中,但不能同時存儲在兩者中(一個文件來了是存在brick1還是brick2當中?用戶不用操心,使用的是gluster的彈性hash計算出來的),不支持數據冗餘,brick故障將導致數據完全丟失,只能依靠底層來保護數據(比如raid)

# gluster volume create NEW-VOLNAME [transport [tcp | rdma | tcp,rdma]] NEW-BRICK...
#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

顯示磁盤信息

#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

(2)複製卷:Replicated Glusterfs Volume
gluster volume
數據存放多份,這個很好理解,就不說了,emmmmm.....

# gluster volume create NEW-VOLNAME [replica COUNT] [transport [tcp | rdma | tcp,rdma]] NEW-BRICK...
#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

(3)分佈式複製卷:Distributed Replicated Glusterfs Volume
gluster volume
結合Distributed 和 Replicated,比如設置 Distributed 2 Replicated 2,那麼你存文件的時候就會存在Distributed 1的brick和Distributed 2的brick當中,但是存在那個上面是使用的gluster的彈性哈希,然後 Replicated 2 就是在複製一份,這兩份Replicatied就是兩個Distributed 進行復制

# gluster volume create NEW-VOLNAME [replica COUNT] [transport [tcp | rdma | tcp,rdma]] NEW-BRICK...

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

(4)條帶卷:Striped Glusterfs Volume
gluster volume
許多客戶端經常同時訪問該塊,這將導致單塊brick的負載過大,從而降低性能。在條帶化模式中,數據將分成不同的條帶後存儲在brick當中。因此,大文件將被分成較小的塊(等於卷中的塊數)存放起來,每個塊存儲在一個brick當中。,但不提供數據冗餘。

# gluster volume create NEW-VOLNAME [stripe COUNT] [transport [tcp | dma | tcp,rdma]] NEW-BRICK...
#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

(5)分佈式條帶卷:Distributed Striped Glusterfs Volume
gluster volume
一個文件存如到Distributed卷中,而每個Distributed又有多個 Striped卷,也就是一個文件存進來是存在Striped當中(分成多塊存入,有幾個Striped就分幾塊),而存放在哪個Distributed是根據彈性hash

#gluster volume create NEW-VOLNAME [stripe COUNT] [transport [tcp | rdma | tcp,rdma]] NEW-BRICK...
#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.
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章