Skip to content

Commit

Permalink
Merge branch 'draft' of github.com:lofyer/InTheCloud into draft
Browse files Browse the repository at this point in the history
  • Loading branch information
lofyer committed Nov 18, 2015
2 parents 825ebfe + ba64dc2 commit 26efdac
Showing 1 changed file with 27 additions and 0 deletions.
27 changes: 27 additions & 0 deletions source/posts/ch02.rst
Original file line number Diff line number Diff line change
Expand Up @@ -643,6 +643,33 @@ normal、replica、striped卷组合

4. 恢复扩展属性

登录到后台,查看脑裂文件的MD5sum和时间,判断哪个副本是需要保留的。
然后删除不再需要的副本即可。(glusterfs采用硬链接方式,所以需要同时删除.gluster下面的硬连接文件)

首先检查文件的md5值,并且和其他的节点比较,确认是否需要删除此副本。

.. code::
[root@hostd data0]# md5sum 1443f429-7076-4792-9cb7-06b1ee38d828/images/5c881816-6cdc-4d8a-a8c8-4b068a917c2f/80f33212-7adb-4e24-9f01-336898ae1a2c
6c6b704ce1c0f6d22204449c085882e2 1443f429-7076-4792-9cb7-06b1ee38d828/images/5c881816-6cdc-4d8a-a8c8-4b068a917c2f/80f33212-7adb-4e24-9f01-336898ae1a2c
通过ls -i 和find -inum 找到此文件及其硬连接文件。

.. code::
[root@hostd data0]# ls -i 1443f429-7076-4792-9cb7-06b1ee38d828/images/5c881816-6cdc-4d8a-a8c8-4b068a917c2f/80f33212-7adb-4e24-9f01-336898ae1a2c
12976365 1443f429-7076-4792-9cb7-06b1ee38d828/images/5c881816-6cdc-4d8a-a8c8-4b068a917c2f/80f33212-7adb-4e24-9f01-336898ae1a2c
[root@hostd data0]# find -inum 12976365
./1443f429-7076-4792-9cb7-06b1ee38d828/images/5c881816-6cdc-4d8a-a8c8-4b068a917c2f/80f33212-7adb-4e24-9f01-336898ae1a2c
./.glusterfs/01/8d/018db725-c8b8-47ed-a6bb-f6ad4195134f
删除两个文件

.. code::
[root@hostd data0]# find -inum 12976365 |xargs rm -rf
脑裂文件恢复完成,此文件可以在挂载点上读写。

砖块复用
---------

Expand Down

0 comments on commit 26efdac

Please sign in to comment.