[Bugs] [Bug 1698861] Renaming a directory when 2 bricks of multiple disperse subvols are down leaves both old and new dirs on the bricks.

bugzilla at redhat.com bugzilla at redhat.com
Tue May 7 06:06:45 UTC 2019


https://bugzilla.redhat.com/show_bug.cgi?id=1698861

Ashish Pandey <aspandey at redhat.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |ASSIGNED
                 CC|                            |aspandey at redhat.com



--- Comment #1 from Ashish Pandey <aspandey at redhat.com> ---
Steps -

1 - Create 4+2 volume and mount it on /mnt/vol

Volume Name: vol
Type: Disperse
Volume ID: 742b8e08-1f16-4bad-aa94-5e36dd10fe91
Status: Started
Snapshot Count: 0
Number of Bricks: 1 x (4 + 2) = 6
Transport-type: tcp
Bricks:
Brick1: apandey:/home/apandey/bricks/gluster/vol-1
Brick2: apandey:/home/apandey/bricks/gluster/vol-2
Brick3: apandey:/home/apandey/bricks/gluster/vol-3
Brick4: apandey:/home/apandey/bricks/gluster/vol-4
Brick5: apandey:/home/apandey/bricks/gluster/vol-5
Brick6: apandey:/home/apandey/bricks/gluster/vol-6
Options Reconfigured:
transport.address-family: inet
nfs.disable: on
Status of volume: vol
Gluster process

2 - mkdir /mnt/vol/dir/old -p
3 -for i in {1..200}; do touch dir/old/file-$i ; done


[root at apandey glusterfs]# gluster v status
Status of volume: vol
Gluster process                             TCP Port  RDMA Port  Online  Pid
------------------------------------------------------------------------------
Brick apandey:/home/apandey/bricks/gluster/
vol-1                                       49152     0          Y       13401
Brick apandey:/home/apandey/bricks/gluster/
vol-2                                       49153     0          Y       11682
Brick apandey:/home/apandey/bricks/gluster/
vol-3                                       49154     0          Y       11702
Brick apandey:/home/apandey/bricks/gluster/
vol-4                                       49155     0          Y       11722
Brick apandey:/home/apandey/bricks/gluster/
vol-5                                       49156     0          Y       11742
Brick apandey:/home/apandey/bricks/gluster/
vol-6                                       49157     0          Y       11762
Self-heal Daemon on localhost               N/A       N/A        Y       13427

Task Status of Volume vol
------------------------------------------------------------------------------
There are no active volume tasks



4 - Kill brick 1

[root at apandey glusterfs]# kill 13401
[root at apandey glusterfs]# gluster v status
Status of volume: vol
Gluster process                             TCP Port  RDMA Port  Online  Pid
------------------------------------------------------------------------------
Brick apandey:/home/apandey/bricks/gluster/
vol-1                                       N/A       N/A        N       N/A  
Brick apandey:/home/apandey/bricks/gluster/
vol-2                                       49153     0          Y       11682
Brick apandey:/home/apandey/bricks/gluster/
vol-3                                       49154     0          Y       11702
Brick apandey:/home/apandey/bricks/gluster/
vol-4                                       49155     0          Y       11722
Brick apandey:/home/apandey/bricks/gluster/
vol-5                                       49156     0          Y       11742
Brick apandey:/home/apandey/bricks/gluster/
vol-6                                       49157     0          Y       11762
Self-heal Daemon on localhost               N/A       N/A        Y       13427

Task Status of Volume vol
------------------------------------------------------------------------------
There are no active volume tasks

5 - mv dir/old/ dir/new
6 - [root at apandey vol]# ll  dir/new | wc -l
201

7 - gluster v start vol force
8 -ll  dir/new | wc -l
1

9 - ll  dir/old | wc -l
1




10- 
[root at apandey glusterfs]# getfattr -m. -d -e hex 
/home/apandey/bricks/gluster/vol-*/dir/old
getfattr: Removing leading '/' from absolute path names
# file: home/apandey/bricks/gluster/vol-1/dir/old
trusted.ec.dirty=0x00000000000000010000000000000001
trusted.ec.version=0x00000000000000c800000000000000c8
trusted.gfid=0x098b8bf8e0ba406283f26334a0b83e23
trusted.glusterfs.dht=0x000000000000000000000000ffffffff

# file: home/apandey/bricks/gluster/vol-2/dir/old
trusted.ec.dirty=0x00000000000000000000000000000000
trusted.gfid=0x098b8bf8e0ba406283f26334a0b83e23

# file: home/apandey/bricks/gluster/vol-3/dir/old
trusted.ec.dirty=0x00000000000000000000000000000000
trusted.gfid=0x098b8bf8e0ba406283f26334a0b83e23

# file: home/apandey/bricks/gluster/vol-4/dir/old
trusted.ec.dirty=0x00000000000000000000000000000000
trusted.gfid=0x098b8bf8e0ba406283f26334a0b83e23

# file: home/apandey/bricks/gluster/vol-5/dir/old
trusted.ec.dirty=0x00000000000000000000000000000000
trusted.gfid=0x098b8bf8e0ba406283f26334a0b83e23

# file: home/apandey/bricks/gluster/vol-6/dir/old
trusted.ec.dirty=0x00000000000000000000000000000000
trusted.gfid=0x098b8bf8e0ba406283f26334a0b83e23



11- 
[root at apandey glusterfs]# getfattr -m. -d -e hex 
/home/apandey/bricks/gluster/vol-*/dir/new
getfattr: Removing leading '/' from absolute path names
# file: home/apandey/bricks/gluster/vol-1/dir/new
trusted.gfid=0x098b8bf8e0ba406283f26334a0b83e23

# file: home/apandey/bricks/gluster/vol-2/dir/new
trusted.ec.version=0x00000000000000c800000000000000c8
trusted.gfid=0x098b8bf8e0ba406283f26334a0b83e23
trusted.glusterfs.dht=0x000000000000000000000000ffffffff

# file: home/apandey/bricks/gluster/vol-3/dir/new
trusted.ec.version=0x00000000000000c800000000000000c8
trusted.gfid=0x098b8bf8e0ba406283f26334a0b83e23
trusted.glusterfs.dht=0x000000000000000000000000ffffffff

# file: home/apandey/bricks/gluster/vol-4/dir/new
trusted.ec.version=0x00000000000000c800000000000000c8
trusted.gfid=0x098b8bf8e0ba406283f26334a0b83e23
trusted.glusterfs.dht=0x000000000000000000000000ffffffff

# file: home/apandey/bricks/gluster/vol-5/dir/new
trusted.ec.version=0x00000000000000c800000000000000c8
trusted.gfid=0x098b8bf8e0ba406283f26334a0b83e23
trusted.glusterfs.dht=0x000000000000000000000000ffffffff

# file: home/apandey/bricks/gluster/vol-6/dir/new
trusted.ec.version=0x00000000000000c800000000000000c8
trusted.gfid=0x098b8bf8e0ba406283f26334a0b83e23
trusted.glusterfs.dht=0x000000000000000000000000ffffffff



12 - [root at apandey glusterfs]# gluster v heal vol info
Brick apandey:/home/apandey/bricks/gluster/vol-1
Status: Connected
Number of entries: 0

Brick apandey:/home/apandey/bricks/gluster/vol-2
Status: Connected
Number of entries: 0

Brick apandey:/home/apandey/bricks/gluster/vol-3
Status: Connected
Number of entries: 0

Brick apandey:/home/apandey/bricks/gluster/vol-4
Status: Connected
Number of entries: 0

Brick apandey:/home/apandey/bricks/gluster/vol-5
Status: Connected
Number of entries: 0

Brick apandey:/home/apandey/bricks/gluster/vol-6
Status: Connected
Number of entries: 0



13 - As we can see that the
trusted.glusterfs.dht=0x000000000000000000000000ffffffff is missing for "old"
directory on all the 5 bricks, I set this xattr manually.
setfattr -n trusted.glusterfs.dht -v 0x000000000000000000000000ffffffff
/home/apandey/bricks/gluster/vol-{2..6}/dir/old


14 - I copied the data from new dir to old dir on respective bricks - 


15 - for i in {2..6} ; do yes | cp -rf
/home/apandey/bricks/gluster/vol-$i/dir/new/*
/home/apandey/bricks/gluster/vol-$i/dir/old/; done

16 - After this files were visible on both the old and new dir
[root at apandey vol]# ll dir/new | wc -l
201
[root at apandey vol]# ll dir/old | wc -l
201
[root at apandey vol]# 

17 - Although this will have both the directories, if we have all the data back
and all the bricks are UP, we can safely move the data in new directory.


This is working for the issue which we created using our set of steps. I am not
sure if this case is exactly similar to what user is experiencing or not.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
You are the assignee for the bug.


More information about the Bugs mailing list