Bug 1139171 - [DHT]: Mount point show stale files i.e files with 'T' bits set after rename of directories and files
Summary: [DHT]: Mount point show stale files i.e files with 'T' bits set after rename ...
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Red Hat Gluster Storage
Classification: Red Hat Storage
Component: posix
Version: rhgs-3.0
Hardware: x86_64
OS: Linux
medium
high
Target Milestone: ---
: ---
Assignee: Pranith Kumar K
QA Contact: Rahul Hinduja
URL:
Whiteboard: dht-rename-file
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-09-08 09:42 UTC by shylesh
Modified: 2018-04-16 18:06 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2018-04-16 18:06:41 UTC
Embargoed:


Attachments (Terms of Use)
logs (7.54 MB, application/octet-stream)
2014-09-08 09:42 UTC, shylesh
no flags Details

Description shylesh 2014-09-08 09:42:18 UTC
Created attachment 935286 [details]
logs

Description of problem:
after renaming the files and directory continuosly ends up with duplicate files on the mount, few 'T'files . Though original file exists its corresponding 'T' file has different gfid.

Version-Release number of selected component (if applicable):
3.6.0.28-1.el6rhs.x86_64

How reproducible:


Steps to Reproduce:
1. created a dist-rep volume of 54 bricks
2. created few files f{1..100}-1 and a directory test-1
3. moved all the files into directory test-1; mv f* test-1/
4. mounted the volume in another place using nfs mount
5. on nfs mount started renaming the files in a continuous loop 
6. started renaming directory as well in a continuous loop 
7. after some time i could see 'T' files and duplicate files on the mount point 


info
=====

[root@localhost test-1]# ls -li f84-*
12460345677274042601 -rw-r--r-- 1 root root 1048576 Sep  8 00:15 f84-490
12460345677274042601 -rw-r--r-- 1 root root 1048576 Sep  8 00:15 f84-490

above files are duplicate files with same gfid

[root@localhost test-1]# ls -li f83-*
11614871103698966625 ---------T 1 root root       0 Sep  8 01:44 f83-460
13014896497008557545 -rw-r--r-- 1 root root 1048576 Sep  8 00:15 f83-474

abover files were supposed to be same but they have different gfid.

[root@localhost test-1]# ssh root.12.17 "getfattr -n trusted.gfid -e hex /rhs/brick3/nexus4/test-1/f83-460"
root.12.17's password:
# file: rhs/brick3/nexus4/test-1/f83-460
trusted.gfid=0x3ecca00e44264603a1304fbb07ed1861

getfattr: Removing leading '/' from absolute path names
[root@localhost test-1]# ssh root.12.66 "getfattr -n trusted.gfid -e hex /rhs/brick3/nexus43/test-1/f83-*"
The authenticity of host '192.168.12.66 (192.168.12.66)' can't be established.
RSA key fingerprint is dc:02:67:53:b1:ab:2e:9b:6e:5a:da:24:c5:c1:fa:92.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added '192.168.12.66' (RSA) to the list of known hosts.
root.12.66's password:
# file: rhs/brick3/nexus43/test-1/f83-474
trusted.gfid=0x2e89a1d9f42c48c1b49e33687cabbde9

getfattr: Removing leading '/' from absolute path names
[root@localhost test-1]# ls -l ./f83-*
---------T 1 root root       0 Sep  8 01:44 ./f83-460 --> this files doesnt have "linkto" xattr.
-rw-r--r-- 1 root root 1048576 Sep  8 00:15 ./f83-474


[2014-09-08 06:32:41.846266] I [dht-common.c:1562:dht_lookup_everywhere_cbk] 0-nexus-dht: attempting deletion of stale linkfile <gfid:0a658a45-bd87-44c8-80b2-de63e11117af>/f83-474 on nexus-replicate-26 (hashed subvol is nexus-replicate-19)
[2014-09-08 06:32:41.847625] I [dht-common.c:892:dht_lookup_unlink_cbk] 0-nexus-dht: lookup_unlink returned with op_ret -> 0 and op-errno -> 0 for <gfid:0a658a45-bd87-44c8-80b2-de63e11117af>/f83-474


attaching the mount logs


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