码迷,mamicode.com
首页 > 其他好文 > 详细

【GlusterFS学习之二】:GlusterFS的Self-Heal特性

时间:2015-04-11 16:23:08      阅读:186      评论:0      收藏:0      [点我收藏+]

标签:分布式存储   分布式文件系统   glusterfs   linux   

上一篇介绍了GlusterFS的安装部署过程,本章介绍一下GlusterFS的一个重要的特性,Self-heal,也就是自修复性。


1.What is the meaning by Self-heal on replicated volumes?

This feature is available for replicated volumes. Suppose, we have a replicated volume [minimum replica count 2]. Assume that due to some failures one or more brick among the replica bricks go down for a while and user happen to delete a file from the mount point which will get affected only on the online brick.

When the offline brick comes online at a later time, it is necessary to have that file removed from this brick also i.e. a synchronization between the replica bricks called as healing must be done. Same is the case with creation/modification of files on offline bricks. GlusterFS has an inbuilt self-heal daemon to take care of these situations whenever the bricks become online.

2.自修复在GlusterFS上的表现

在上一节的基础上我们已经进行了volume的创建,然后将客户端进行了挂载操作,形成了一个稳定的系统。

在客户端创建文件:

技术分享

在server端的两个重复块验证:

server1:

技术分享

server2:

技术分享

现在将server端的glusterfs守护通过pid的值kill掉,pid从volume的状态信息获取:

技术分享

注意:观察server端的自修复守护进程的表现

现在kill掉server1端的守护进程:

技术分享

现在server1的块已经下线了。

现在从挂载点/mnt将文件aaa删除,检查brick块的内容。

client端操作:

技术分享

server1(offline):

技术分享

server2(online):

技术分享

可以看到aaa文件仍然在server1的brick中。

现在将server1的brick重新设置上线:

技术分享

现在server1 brick在线了。

然后检查块内的内容:

server1 brick:

技术分享

server2 brick:

技术分享

可以看到server1 brick中原有的文件aaa已经被自修复进行删除掉了。

注意:在大文件的情况下,有可能需要一段时间来进行自修复操作。


Author:忆之独秀

Email:leaguenew@qq.com

注明出处:http://blog.csdn.net/lavorange/article/details/44994993



【GlusterFS学习之二】:GlusterFS的Self-Heal特性

标签:分布式存储   分布式文件系统   glusterfs   linux   

原文地址:http://blog.csdn.net/lavorange/article/details/44994993

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!