Bug 790784 - Add brick unable to self-heal entry,data of files on new brick
Summary: Add brick unable to self-heal entry,data of files on new brick
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: GlusterFS
Classification: Community
Component: replicate
Version: mainline
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: ---
Assignee: Kaushal
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-02-15 11:47 UTC by Shwetha Panduranga
Modified: 2012-02-28 08:08 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2012-02-28 08:08:55 UTC
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:


Attachments (Terms of Use)
Attaching client log (90.69 KB, text/x-log)
2012-02-15 11:47 UTC, Shwetha Panduranga
no flags Details

Description Shwetha Panduranga 2012-02-15 11:47:10 UTC
Created attachment 562196 [details]
Attaching client log

Description:-
*) The volume is created with one brick.
*) Performed file/dir ops from mount point 
*) Added one more brick to make replicate volume
*) performed lookup from mount point. 
*) Lookup didn't self heal the files on new brick. 

Version-Release number of selected component (if applicable):
mainline

How reproducible:
often

Steps to Reproduce:
Server1:-
--------
1.gluster volume create test_vol <brick1>
2.gluster volume start test_vol
3.gluster volume set test_vol self-heal-deamon off

Client:-
--------
3.mount to the volume
4.Create files/directories
  
Server1:-
5.gluster volume add-brick test_vol replica 2 <brick2>

Client:-
--------
6. ls -lR (on mount point)

Actual results:
Doesn't self heal (entry/data) files. Self-heals only directories.

Expected results:
Should self heal both directories and data

Additional info:
With self-heal-deamon on, the entry, data self-heal of files is complete.

Comment 1 Kaushal 2012-02-28 07:51:11 UTC
This should expected with stat-prefetch/md-cache xlator on.

ls -lR does a readdir() on the given directory and then stat() on the different files to get their stats. 

When using stat-prefetch/md-cache, the readdir() call is converted to a readdirp() call, which causes the stats of the files to be returned as well. These stats will be cached by stat-prefetch/md-cache xlator. The converted call will reach the afr xlator, which then detects that self-heal needs to be performed on the given directory, and performs the entry self-heal on the directory. 

But, when ls performs stat() on the files to get their details, the stats will be returned by the stat-prefetch/md-cache xlator using the cached data. Hence, the stat() on the file doesn't reach the afr xlator, which will not know the files are not in sync and will not perform the data self-heal. 

Turning off stat-prefetch/md-cache, will solve this problem of 'ls -lR' not performing data-self-heal.

Comment 2 Kaushal 2012-02-28 08:08:55 UTC
Closing, as this is a known issue. The reasoning and a workaround are given in the comment above.


Note You need to log in before you can comment on or make changes to this bug.