split-brain種類(lèi)
- data split-brain
- metadata split-brain
- entry split-brain
- glid-mismatch
解決split-brain步驟
- 確定split-brain文件的路徑
gluster volume heal info split-brain - 關(guān)閉正在open 該文件的app
- 確定腦裂的類(lèi)型
getfattr -d -m . -e hex <file-path-on-brick>
或者
getfattr -n replica.split-brain-status <path-to-file>
eg.
getfattr -n replica.split-brain-status file100
file: file100
replica.split-brain-status="data-split-brain:no
metadata-split-brain:yes Choices:test-client-0,test-client-1"
- 確定正確的副本,并恢復(fù)
這里,主要說(shuō)明一下使用cli解決data和metadata的方式
- Select the bigger-file as source
gluster volume heal <volume> split-brain bigger-file <file>- Select one replica as source for a particular file
gluster volume heal <volume> split-brain source-brick <host:brick> <file>- Trying to heal /dir would fail as it is in entry split-brain
gluster volume heal <volume> split-brain source-brick <host:brick>