Bug 1118779 - DHT +SNAPSHOT:If Directory creation and rename of that Directory is partially completed(not done on all sub-volumes) and snapshot is taken, on restoring that snapshot two Directory has same gfid and sometimes few files are not accessible/listed on mount
Summary: DHT +SNAPSHOT:If Directory creation and rename of that Directory is partiall...
Status: CLOSED DUPLICATE of bug 1118780
Alias: None
Product: Red Hat Gluster Storage
Classification: Red Hat
Component: distribute
Version: rhgs-3.0
Hardware: x86_64
OS: Linux
Target Milestone: ---
: ---
Assignee: Raghavendra G
QA Contact: Matt Zywusko
Whiteboard: dht-gfid-dir,dht-file-access
Depends On: 1092510 1118780 1139172
TreeView+ depends on / blocked
Reported: 2014-07-11 13:58 UTC by Rachana Patel
Modified: 2018-02-23 09:52 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Last Closed: 2015-12-28 06:34:04 UTC
Target Upstream Version:

Attachments (Terms of Use)

Description Rachana Patel 2014-07-11 13:58:55 UTC
Description of problem:
Create Directory from mountpoint and while creation is in progress (Directory created only on hashed sub-volume), execute rename of that Directory(destination Directory does not exist and both Source and Destination hash to same sub-volume here)

i.e. from one mout point :- mkfir dir1
from another mount point mv dir1 dir2

Take snapshot when both operation is not completed on all up sub-volumes

On restoring that snapshot
- same gfid for two directories at same level
- sometimes few files inside those directories are not listed on mount and not accessible

Version-Release number :

How reproducible:

Steps to Reproduce:
1. create and mount distributed volume. (mount on multiple client)
2. [to reproduce race, we are putting breakpoint at dht_mkdir_hashed_dir_cbk and dht_rename_hashed_dir_cbk]

3. from one mount point execute 

[root@OVM1 race]# mkdir inprogress

[root@OVM5 race]# tree /brick*/race/ 
└── inprogress 

1 directory, 0 files 

from another mount point:-
[root@OVM1 race1]# mv inprogress rename

[root@OVM5 race]# tree /brick*/race/ 
└── rename 
└── inprogress 
└── inprogress 

3 directories, 0 files 

4. now take a snapshot

5. restore that snapshot and verify data on mount and bricks


[root@OVM5 race]# ls -lR 
total 0 
drwxr-xr-x 2 root root 18 Jul 10 16:55 inprogress 
drwxr-xr-x 2 root root 18 Jul 10 16:55 rename 

total 0 

total 0 

on restoring snap on bricks :-

[root@OVM5 race]# tree /var/run/gluster/snaps/d805a68ad7d5419f863eab5d387ff6c1/brick*/race/ 
├── inprogress 
└── rename 
├── inprogress 
└── rename 
├── inprogress 
└── rename 

6 directories, 0 files 

[root@OVM5 race]# getfattr -d -m . -e hex  /var/run/gluster/snaps/d805a68ad7d5419f863eab5d387ff6c1/brick*/race/* 
getfattr: Removing leading '/' from absolute path names 
# file: var/run/gluster/snaps/d805a68ad7d5419f863eab5d387ff6c1/brick1/race/inprogress 

# file: var/run/gluster/snaps/d805a68ad7d5419f863eab5d387ff6c1/brick1/race/rename 

# file: var/run/gluster/snaps/d805a68ad7d5419f863eab5d387ff6c1/brick2/race/inprogress 

# file: var/run/gluster/snaps/d805a68ad7d5419f863eab5d387ff6c1/brick2/race/rename 

# file: var/run/gluster/snaps/d805a68ad7d5419f863eab5d387ff6c1/brick3/race/inprogress 

# file: var/run/gluster/snaps/d805a68ad7d5419f863eab5d387ff6c1/brick3/race/rename 

Actual results:
- same gfid for source and destination directory
- sometimes files inside those directories are not listed on mount and 

Expected results:
- no two directory should have same gfid
- all files inside those Directories should be accessible from mount point

Comment 5 Susant Kumar Palai 2015-12-28 06:34:04 UTC

*** This bug has been marked as a duplicate of bug 1118780 ***

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