0. Test environment
GlusterFS 3.6.4/3.6.7/3.6.9
CentOS 6.7/7.1
1. Test case and result one
Suppose A, B replica host, C client, C mount to a.
Create 1 to 99 files in the volume by C first.
Test One:
A delete rm-f 2*,a executes heal full, see if recovery, if not, then on the B heal full,a see if the file is restored. Do not have LS on C during operation.
A on the deletion of Rm-f, only on the C on ls,c see if there is 3*,a on the recovery.
Test Two:
A delete rm-f, and delete the corresponding Gfid file. A execute heal full, see if the recovery, if not, and then perform heal full,a on B to see if the file is restored. Do not have LS on C during operation.
A Delete the rm-f 5*, and delete the corresponding Gfid file. Only on the ls,c on C to see if there is 5*,a on the recovery.
Test Three:
b Delete Rm-f 6*,a execute heal full, see if it recovers, if not, then perform heal full,b on B to see if the file is restored. Do not have LS on C during operation.
b Delete Rm-f 7*, only on the C ls,c to see if there is 7*,b on whether to recover.
Test four:
b Delete the rm-f 8*, and delete the corresponding Gfid file. A execute heal full, see if the recovery, if not, and then perform heal full,b on B to see if the file is restored. Do not have LS on C during operation.
b Delete the rm-f 9*, and delete the corresponding Gfid file. Only on the ls,c on C to see if there is 9*,b on the recovery.
Test results:
Experiment One
You can see it on C.
Experiment Two
You can see 5* on C.
Experiment Three
1. Can restore 6*
2. There is no recovery on B and C cannot see the 7*
Experiment Four
1. Can restore 8*
2. B on 9* not recovered and C cannot see 9*
2. Test case and result two
Add two additional test cases, both of which need to recover snapshots to ensure that the environment is pure and reliable and then executed separately.
Suppose A, B replica host, C client, C mount to a.
Create 1 to 99 files in the volume by C first.
Scenario One:
A delete RM *,a executes heal full to see if it recovers, if not, and then executes Heal full,a on B to see if the file is restored. If no more on the C LS, see if C can see the file.
If not, restart a on the Glusterd service and then perform the above operation to see the results.
Suppose A, B replica host, C client, C mount to a.
Create 1 to 99 files in the volume by C first.
Scenario Two:
Delete RM * on B and delete the corresponding Gfid file. A execute heal full, see if the recovery, if not, and then perform heal full,b on B to see if the file is restored. If no more on the C LS, see if C can see the file.
If not, restart B on the Glusterd service and perform the above operation to see the results.
Test results:
Scene One
You see the file on C, nothing else.
Scene Two
Not even.
3. Test summary- copy file missing repair
When a copy file on a replicated volume is accidentally deleted (and the corresponding Gfid file is deleted), you can
Gluster Volume Heal Volname full
command to fix, if the full parameter is not added, the missing copy is not detected and the copy repair operation is not performed.
When a replica is lost, the client may see the missing file, or it may not see the missing file, depending on the host location being mounted.
When you can still see the missing file:
Although you can see the missing files, the LS or ls-l does not restore the copy at this time, and the copy file will not be repaired until the missing file is modified again.
When you cannot see the missing file:
1) re-mount will repair the lost copy, after repair, the client can see all the files. It is obvious that the online system is not usually able to do so.
2) The background execution Gluster volume heal volname full command can repair the lost copy file while allowing the client to see the missing file again.
Dark File Description
in the case of a replicated volume, assume that there are twoBrickmade ofVolume, when in one of theBrickDelete a file on thefile(do not delete the correspondingGfidfile), it is possible to cause (two copies, delete one copy to cause, but the exact copy is not deterministic, or it may be a copy of the non-mount point) The client does not see the file, at this point:
Client does not see the file brick There are file file
at this point, execute gluster Volume Heal full Self-healing operation, as described above, the client cannot see the file, at which point the file called dark files.
Client Reload Method Repair (sometimes re-mount can be repaired, need to consider worst case).
Server-Side Heal Full cannot be repaired.
How do I recover dark files?
Execute on client ls file file will also be restored automatically.
-
file touch Span style= "background-color:inherit;font-family: ' The song body '; line-height:2.25;" >, write and other operations can be normal, when executed once, the server file will be automatically restored, the premise or must know the file name.
Server-Side utilization CP mechanism to recover.
Client Reload Method Repair (sometimes re-mount can be repaired, need to consider worst case).
It is very bad to have dark files, it is difficult to determine which copies are missing on the line, and the re-mount is not allowed, so try to avoid such situations.
This article is from the "Members Doukua" blog, make sure to keep this source http://dangzhiqiang.blog.51cto.com/7961271/1774821
Glusterfs Copy Volume repair function test analysis--brick file missing