1. 基本概念 php
(1) brick:The brick is the storage filesystem that has been assigned to a volume. html
(2) subvolume:A brick after being processed by at least one translator. 分佈式
(3) volume:The final share after it passes through all the translators. ide
(4) translator:A translator connects to one or more subvolumes, does something with them, and offers a subvolume connection. ui
(理解不夠深入,翻譯不夠準確,直接上原文,哈哈) spa
2. 不一樣的volume 翻譯
distributed volumes: 分佈式卷,文件在不一樣的brick上存儲 code
replicated volumes: 複製卷,文件冗餘存儲在全部brick上(複製個數與brick個數相等) htm
striped volumes: 條帶卷,同一個文件分塊存儲在不一樣的brick上 進程
distributed replicated volumes: 分佈式複製卷,volume中的brick組成不一樣的"區域",每一個"區域"內有多個brick(由replica指定),文件存儲在不一樣的"區域"中,可是在"區域"中各brick上冗餘存儲。所以這種volume中,brick的個數必須是複製份數的倍數個(brickNum = n * replicaCount),此外還要注意,brick的順序決定了哪幾個會組成一個"區域"。
distributed striped volumes: 分佈式條帶卷,與分佈式複製卷相似,區別是同一文件分塊存儲在一個"區域"內的不一樣brick上。
3. 可執行程序
glusterfs安裝後,會有gluster,glusterd,glusterfs,glusterfsd這麼幾個可執行程序,其做用分別爲:
gluster:Glusterfs控制檯管理程序(Gluster Console Manager),能夠以命令形式或者交互式形式對glusterfs中的volume,brick,集羣節點等信息進行查看及操做(增,刪,改)。
glusterd:軟連接指向glusterfsd,Glusterfs的管理進程,負責處理來自gluster的命令。
glusterfs:軟連接指向glusterfsd,Glusterfs自帶的客戶端
glusterfsd:Glusterfs服務端程序
注:glusterd,glusterfs,glusterfsd爲最終是運行同一個程序(glusterfsd),程序內部會根據可執行程序名稱加以區別。
static uint8_t gf_get_process_mode (char *exec_name) { char *dup_execname = NULL, *base = NULL; uint8_t ret = 0; dup_execname = gf_strdup (exec_name); base = basename (dup_execname); if (!strncmp (base, "glusterfsd", 10)) { ret = GF_SERVER_PROCESS; } else if (!strncmp (base, "glusterd", 8)) { ret = GF_GLUSTERD_PROCESS; } else { ret = GF_CLIENT_PROCESS; } GF_FREE (dup_execname); return ret; }
4. 其餘
(1) {path} or a prefix of it is already part of volume
有時候在增長volume時(3.3.1版本),出現這個打印,致使沒法新增volume(緣由未知,聽說是BUG)
解決的辦法是:
setfattr -x trusted.glusterfs.volume-id $brick_path
setfattr -x trusted.gfid $brick_path
rm -rf $brick_path/.glusterfs
注:$brick_path爲brick的存儲路徑
參考資料:
http://www.gluster.org/community/documentation/index.php/GlusterFS_Concepts