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...
Keywords:
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
unspecified
high
Target Milestone: ---
: ---
Assignee: Raghavendra G
QA Contact: Matt Zywusko
URL:
Whiteboard: dht-gfid-dir,dht-file-access
Depends On: 1092510 1118780 1139172
Blocks:
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:
Environment:
Last Closed: 2015-12-28 06:34:04 UTC


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 :
=========================
3.6.0.24-1.el6rhs.x86_64


How reproducible:
=================
always


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

bricks:-
[root@OVM5 race]# tree /brick*/race/ 
/brick1/race/ 
/brick2/race/ 
└── inprogress 
/brick3/race/ 

1 directory, 0 files 

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

bricks:-
[root@OVM5 race]# tree /brick*/race/ 
/brick1/race/ 
└── rename 
/brick2/race/ 
└── inprogress 
/brick3/race/ 
└── inprogress 

3 directories, 0 files 

4. now take a snapshot

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

mount:-

[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 

./inprogress: 
total 0 

./rename: 
total 0 


on restoring snap on bricks :-

[root@OVM5 race]# tree /var/run/gluster/snaps/d805a68ad7d5419f863eab5d387ff6c1/brick*/race/ 
/var/run/gluster/snaps/d805a68ad7d5419f863eab5d387ff6c1/brick1/race/ 
├── inprogress 
└── rename 
/var/run/gluster/snaps/d805a68ad7d5419f863eab5d387ff6c1/brick2/race/ 
├── inprogress 
└── rename 
/var/run/gluster/snaps/d805a68ad7d5419f863eab5d387ff6c1/brick3/race/ 
├── 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 
trusted.gfid=0x5b3c1a8ca4b84f27912880710a165fb7 
trusted.glusterfs.dht=0x0000000100000000aaaaaaaaffffffff 

# file: var/run/gluster/snaps/d805a68ad7d5419f863eab5d387ff6c1/brick1/race/rename 
trusted.gfid=0x5b3c1a8ca4b84f27912880710a165fb7 
trusted.glusterfs.dht=0x00000001000000000000000055555554 

# file: var/run/gluster/snaps/d805a68ad7d5419f863eab5d387ff6c1/brick2/race/inprogress 
trusted.gfid=0x5b3c1a8ca4b84f27912880710a165fb7 
trusted.glusterfs.dht=0x00000001000000000000000055555554 

# file: var/run/gluster/snaps/d805a68ad7d5419f863eab5d387ff6c1/brick2/race/rename 
trusted.gfid=0x5b3c1a8ca4b84f27912880710a165fb7 
trusted.glusterfs.dht=0x00000001000000000000000055555554 

# file: var/run/gluster/snaps/d805a68ad7d5419f863eab5d387ff6c1/brick3/race/inprogress 
trusted.gfid=0x5b3c1a8ca4b84f27912880710a165fb7 
trusted.glusterfs.dht=0x000000010000000055555555aaaaaaa9 

# file: var/run/gluster/snaps/d805a68ad7d5419f863eab5d387ff6c1/brick3/race/rename 
trusted.gfid=0x5b3c1a8ca4b84f27912880710a165fb7 
trusted.glusterfs.dht=0x000000010000000055555555aaaaaaa9 

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.