Bug 796181

Summary: [glusterfs-3.3.0qa23] - stale directory symlink found in the back-end .glusterfs
Product: [Community] GlusterFS Reporter: M S Vishwanath Bhat <vbhat>
Component: access-controlAssignee: shishir gowda <sgowda>
Status: CLOSED UPSTREAM QA Contact:
Severity: high Docs Contact:
Priority: high    
Version: pre-releaseCC: gluster-bugs, mzywusko, nsathyan, vbellur
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-04-20 07:06:35 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
rabalance logs none

Description M S Vishwanath Bhat 2012-02-22 12:42:22 UTC
Description of problem:
After creating a directory tree and running rm -rf * on mounpoint, I still see broken symlink in .glusterfs in back-end i.e. symlink with destination missing.

Version-Release number of selected component (if applicable):
glusterfs-3.3.0qa23

How reproducible:
1/1

Steps to Reproduce:
1. Create and start a 2*2 distrep volume. 
2. Create a dirctory tree on the mounpoint mkdir -p `perl -e "print 'a/' x 2045"`
2. Run rm -rf * on mountpoint and meanwhile add 4 more bricks to make it 4*2 distributed-replicated volume.
3. Meanwhile run rebalance which says rebalance not started message but completes the rebalance (at least it seems to have completed).
4. When rm -rf completes, check in back-end .glusterfs directory of newly added bricks for stale symlinks.
  
Actual results:
Stale symlink was found in the back-end .glusterfs of newly added bricks. Old bricks doesn't have this stale symlink.

[root@RHEL6 new-arequal]# ls -lh /data/bricks/hosdu_brick5/.glusterfs/01/08/
total 0
lrwxrwxrwx. 1 root root 50 Feb 22 07:05 010887df-3e5f-47e6-bb01-2579893bc9f4 -> ../../8f/94/8f946adb-9ca3-408a-90c7-9bd4b80c7632/a
[root@RHEL6 new-arequal]# ls -lh /data/bricks/hosdu_brick5/.glusterfs/01/0e/
total 0
lrwxrwxrwx. 1 root root 50 Feb 22 06:48 010e76e9-e6bf-4283-8892-3148b45fc37f -> ../../ef/65/ef658391-be08-4865-90cc-2b8606967406/a
[root@RHEL6 new-arequal]# ls -lh /data/bricks/hosdu_brick5/.glusterfs/01/94/
total 0
lrwxrwxrwx. 1 root root 50 Feb 22 06:52 01947547-238a-42a5-b09c-55133a550243 -> ../../02/a4/02a4cfa8-b489-42e2-b7de-d968cfce4841/a


Expected results:
There should be no stale symlink in the back-end .glusterfs directory.

Additional info:
I did run rebalance once more after rm -rf return and this time rebalance completed. But stale symlink was still present in the .glusterfs of newly added bricks.

Comment 1 shishir gowda 2012-04-19 11:39:14 UTC
Can you please check, if this bug is still valid?
I am not able to reproduce the issue.

Comment 2 M S Vishwanath Bhat 2012-04-19 18:27:20 UTC
With the glusterfs-3.3.0qa35, I didn't find the stale gfid's in .glusterfs back-end. But rebalance didn't completed though.

Comment 3 shishir gowda 2012-04-20 05:34:04 UTC
Can you please provide rebalance logs?

Comment 4 M S Vishwanath Bhat 2012-04-20 06:38:45 UTC
Just checked, rebalance completed now. But took long time to complete. And even after completion didn't find the stale gfid's in .glusterfs back-end.

Comment 5 M S Vishwanath Bhat 2012-04-20 06:40:25 UTC
Created attachment 578873 [details]
rabalance logs

Attaching the rebalance log anyway.

Comment 6 M S Vishwanath Bhat 2012-04-20 07:06:35 UTC
Rebalance took bit longer time to complete. And didn't found the stale gfid's in the back-end. So moving it to closed upstream.