Bug 866908
Summary: | [RHEV-RHS] "gluster volume heal <vol_name> info" command outputs entries which are in ".glusterfs" and ".landfill" directory | ||
---|---|---|---|
Product: | [Red Hat Storage] Red Hat Gluster Storage | Reporter: | spandura |
Component: | glusterfs | Assignee: | Pranith Kumar K <pkarampu> |
Status: | CLOSED WONTFIX | QA Contact: | spandura |
Severity: | unspecified | Docs Contact: | |
Priority: | medium | ||
Version: | 2.0 | CC: | grajaiya, rhs-bugs, sdharane, shaines, vbellur, vinaraya |
Target Milestone: | --- | ||
Target Release: | --- | ||
Hardware: | Unspecified | ||
OS: | Unspecified | ||
Whiteboard: | |||
Fixed In Version: | Doc Type: | Known Issue | |
Doc Text: |
Cause:
Whenever a brick is restarted and self-heal has to remove a directory 'dir' it sets a flag indicating in rmdir fop that it is 'rm -rf'. The 'dir' is moved to '.glusterfs/landfill' by posix because of the flags in rmdir fop, Janitor thread removes it asynchronously. gfid-handles exists for 'dir' and files under 'dir' until the janitor thread deletes them from landfill. Janitor thread is run every 10 minutes. Self-heald depends on gfid-handle presence to determine that a file exists in the filesystem. Because of this behaviour, stale entries show up in the output of 'gluster volume heal <volname> info'. The issue is transient, after 10 minutes the stale entries won't show up in the output.
Consequence:
Workaround (if any):
Wait for 10 minutes. The entries will be removed from the landfill directory. Volume heal <volname> will not show these stale entries.
Result:
|
Story Points: | --- |
Clone Of: | Environment: | ||
Last Closed: | 2012-12-13 06:08:20 UTC | Type: | Bug |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: |
Description
spandura
2012-10-16 09:52:17 UTC
Steps to recreate the issue: 1) Create a replicate volume with eager-lock enabled. 2) create a directory 'dir' and cd into it 3) start an infinite dd. 'dd of=a if=/dev/urandom' <--> Actually any command which can lead to index file in both the bricks for a noticeable time. When eager-lock is enabled, the chances of this happening increases. 4) kill one of the bricks 5) stop the dd using ctrl+c 6) rm -rf the directory 'dir' 7) do gluster volume start <volname> force 8) gluster volume heal <volname> info will show the stale file gfid entry on the brick which just came up. [root@pranithk-laptop r2]# gluster volume heal r2 info Gathering Heal info on volume r2 has been successful Brick pranithk-laptop:/gfs/r2_0 Number of entries: 1 <gfid:466cadc3-880f-45a7-a17d-4b4f183bdb3f> Brick pranithk-laptop:/gfs/r2_1 Number of entries: 0 [root@pranithk-laptop r2]# ls /gfs/r2_0/.glusterfs/landfill/ d785558b-9dfc-4750-9687-6704fe71cbef [root@pranithk-laptop r2]# ls /gfs/r2_0/.glusterfs/landfill/d785558b-9dfc-4750-9687-6704fe71cbef/ a [root@pranithk-laptop r2]# ls /gfs/r2_0/.glusterfs/landfill/d785558b-9dfc-4750-9687-6704fe71cbef/a ^C [root@pranithk-laptop r2]# getfattr -d -m . -e hex /gfs/r2_0/.glusterfs/landfill/d785558b-9dfc-4750-9687-6704fe71cbef/a getfattr: Removing leading '/' from absolute path names # file: gfs/r2_0/.glusterfs/landfill/d785558b-9dfc-4750-9687-6704fe71cbef/a trusted.afr.r2-client-0=0x000000010000000000000000 trusted.afr.r2-client-1=0x000000010000000000000000 trusted.gfid=0x466cadc3880f45a7a17d4b4f183bdb3f Reason for the issue: When the brick is restarted again, self-heal has to remove the directory 'dir' which is moved to landfill by posix because of the flags indicated by self-heal in rmdir fop. Janitor thread is run every 10 minutes, until then the stale entry shows up in the output of 'gluster volume heal <volname> info' Because the gfid-handle exists until the janitor thread deletes the stale entries in landfill. |