In replicate module, previously you had to manually trigger a self-heal when a brick goes offline and comes back online, to bring all the replicas in sync. Now the pro-active self-heal daemon runs in the background, diagnoses issues and automatically initiates self-healing every 10 minutes on the files which require healing.
You can view the list of files that need healing, the list of files which are currently/previously healed, list of files which are in split-brain state, and you can manually trigger self-heal on the entire volume or only on the files which need healing.
- Trigger self-heal only on the files which require healing:
# gluster volume healVOLNAMEFor example, to trigger self-heal on files which require healing of test-volume:# gluster volume heal test-volume Heal operation on volume test-volume has been successful
- Trigger self-heal on all the files of a volume:
# gluster volume healVOLNAMEfullFor example, to trigger self-heal on all the files of of test-volume:# gluster volume heal test-volume full Heal operation on volume test-volume has been successful
- View the list of files that need healing:
# gluster volume healVOLNAMEinfoFor example, to view the list of files on test-volume that need healing:# gluster volume heal test-volume info Brick server1:/gfs/test-volume_0 Number of entries: 0 Brick server2:/gfs/test-volume_1 Number of entries: 101 /95.txt /32.txt /66.txt /35.txt /18.txt /26.txt /47.txt /55.txt /85.txt ...
- View the list of files that are self-healed:
# gluster volume healVOLNAMEinfo healedFor example, to view the list of files on test-volume that are self-healed:# gluster volume heal test-volume info healed Heal information on volume test-volume has been successful Brick server1:/gfs/test-volume_0 Number of entries: 0 Brick server2:/gfs/test-volume_1 Number of entries: 51 at path on brick ---------------------------------- 2012-06-13 04:02:05 /dir/file.50 2012-06-13 04:02:05 /dir/file.49 2012-06-13 04:02:05 /dir/file.48 2012-06-13 04:02:05 /dir/file.47 2012-06-13 04:02:05 /dir/file.46 2012-06-13 04:02:05 /dir/file.45 2012-06-13 04:02:05 /dir/file.44 ...
- View the list of files of a particular volume on which the self-heal failed:
# gluster volume healVOLNAMEinfo heal-failedFor example, to view the list of files of test-volume that are not self-healed:# gluster volume heal test-volume info heal-failed Brick server1:/gfs/test-volume_0 Number of entries: 0 Brick server2:/gfs/test-volume_3 Number of entries: 72 at path on brick ---------------------------------- 2012-06-13 04:02:05 /dir/file.90 2012-06-13 04:02:05 /dir/file.95 2012-06-13 04:02:05 /dir/file.71 2012-06-13 04:02:05 /dir/file.67 2012-06-13 04:02:05 /dir/file.86 2012-06-13 04:02:05 /dir/file.55 2012-06-13 04:02:05 /dir/file.44 ... - View the list of files of a particular volume which are in split-brain state:
# gluster volume healVOLNAMEinfo split-brainFor example, to view the list of files of test-volume which are in split-brain state:# gluster volume heal test-volume info split-brain Brick server1:/gfs/test-volume_2 Number of entries: 12 at path on brick ---------------------------------- 2012-06-13 04:02:05 /dir/file.83 2012-06-13 04:02:05 /dir/file.28 2012-06-13 04:02:05 /dir/file.69 Brick server2:/gfs/test-volume_2 Number of entries: 12 at path on brick ---------------------------------- 2012-06-13 04:02:05 /dir/file.83 2012-06-13 04:02:05 /dir/file.28 2012-06-13 04:02:05 /dir/file.69 ...