(1) brick:The brick is the storage filesystem that has been assigned to a volume.
(2) subvolume:A brick after being processed by at least one translator.
(3) volume:The final share after it passes through all the translators.
(4) translator:A translator connects to one or more subvolumes, does something with them, and offers a subvolume connection.
(理解不夠深刻,翻譯不夠準確,直接上原文,哈哈)
2. 不同的volume
distributed volumes: 分佈式卷,文件在不同的brick上存儲
replicated volumes: 複製卷,文件冗餘存儲在所有brick上(複製個數與brick個數相等)
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的存儲路徑