Bug 1228247 - [Backup]: File movement across directories does not get captured in the output file in a X3 volume
Summary: [Backup]: File movement across directories does not get captured in the outpu...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Gluster Storage
Classification: Red Hat Storage
Component: glusterfind
Version: rhgs-3.1
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: ---
: RHGS 3.1.0
Assignee: Milind Changire
QA Contact: Sweta Anandpara
URL:
Whiteboard:
Depends On:
Blocks: 1202842 1223636 1233062 1236270 1236282
TreeView+ depends on / blocked
 
Reported: 2015-06-04 13:26 UTC by Sweta Anandpara
Modified: 2016-09-17 15:20 UTC (History)
8 users (show)

Fixed In Version: glusterfs-3.7.1-8
Doc Type: Bug Fix
Doc Text:
Clone Of:
: 1236270 (view as bug list)
Environment:
Last Closed: 2015-07-29 04:57:06 UTC
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2015:1495 0 normal SHIPPED_LIVE Important: Red Hat Gluster Storage 3.1 update 2015-07-29 08:26:26 UTC

Description Sweta Anandpara 2015-06-04 13:26:57 UTC
Description of problem:
When a file is moved from its original location to another directory, with the same name or with a different name, the change does not get captured in the output file. File rename at the same location does not get recorded as well. 

Do note that this issue is seen intermittently in a replica 3 volume.

However on a replica 2 volume, every file movement (across directories) gets recorded as a MODIFY entry and a rename (also) gets recorded as a MODIFY entry (bug 1227691)

Version-Release number of selected component (if applicable):
glusterfs-3.7.0-3.el6rhs.x86_64

How reproducible: Always


Steps to Reproduce:
1. Create a replica 3 volume 'cross3' and a glusterfind session
2. Mount the volume over nfs/fuse and create 2 files 'test1' and 'test2' and a directory 'dir1'
3. Execute glusterfind pre and verify that 3 NEW entries are seen in the output file
4. Move the file 'test1' to dir1/test1 and run glusterfind pre and post
5. Output file shows a MODIFY entry for dir1/test1
6. Rename the file 'test2' to 'newtest2' and run glusterfind pre and post
7. Output file remains empty, without logging in any change
8. Move the file 'dir1/test1' to its original location, this time with a change in name. Run glusterfind pre and post
9. Output file again remains empty. 


Additional info:

############     CLIENT        #####################

[root@dhcp43-71 ~]# 
[root@dhcp43-71 ~]# 
[root@dhcp43-71 ~]# mkdir /mnt/cross3
[root@dhcp43-71 ~]# mount -t glusterfs 10.70.43.140:/cross3vol /mnt/cross3
[root@dhcp43-71 ~]# cd /mnt/cross3/
[root@dhcp43-71 cross3]# ls -a
.  ..  .trashcan
[root@dhcp43-71 cross3]# echo "what a beautiful day" > test1
[root@dhcp43-71 cross3]# mkdir dir1
[root@dhcp43-71 cross3]# echo "what a beautiful day" > test2
[root@dhcp43-71 cross3]# 
[root@dhcp43-71 cross3]# ls -a
.  ..  dir1  test1  test2  .trashcan
[root@dhcp43-71 cross3]# 
[root@dhcp43-71 cross3]# 
[root@dhcp43-71 cross3]# mv test1 dir1/test1
[root@dhcp43-71 cross3]# 
[root@dhcp43-71 cross3]# 
[root@dhcp43-71 cross3]# mv test2 newtest2
[root@dhcp43-71 cross3]# ls -a
.  ..  dir1  newtest2  .trashcan
[root@dhcp43-71 cross3]# 
[root@dhcp43-71 cross3]# 
[root@dhcp43-71 cross3]# 
[root@dhcp43-71 cross3]# mv dir1/test1 newtest1
[root@dhcp43-71 cross3]# ls -a
.  ..  dir1  newtest1  newtest2  .trashcan
[root@dhcp43-71 cross3]# 



###############       SERVER          ##################

[root@dhcp43-140 ~]# gluster v info cross3vol
 
Volume Name: cross3vol
Type: Distributed-Replicate
Volume ID: 565b18a9-914f-48a4-9467-9354ce018cdc
Status: Created
Number of Bricks: 2 x 3 = 6
Transport-type: tcp
Bricks:
Brick1: 10.70.42.75:/rhs/thinbrick1/cross3
Brick2: 10.70.43.140:/rhs/thinbrick1/cross3
Brick3: 10.70.42.75:/rhs/thinbrick2/cross3
Brick4: 10.70.42.75:/rhs/thinbrick3/cross3
Brick5: 10.70.43.140:/rhs/thinbrick2/cross3
Brick6: 10.70.42.75:/rhs/thinbrick4/cross3
Options Reconfigured:
performance.readdir-ahead: on
[root@dhcp43-140 ~]# 
[root@dhcp43-140 ~]# gluster v start cross3vol
volume start: cross3vol: success
[root@dhcp43-140 ~]# 
[root@dhcp43-140 ~]# 
[root@dhcp43-140 ~]# gluster v status cross3vol
Status of volume: cross3vol
Gluster process                             TCP Port  RDMA Port  Online  Pid
------------------------------------------------------------------------------
Brick 10.70.42.75:/rhs/thinbrick1/cross3    49180     0          Y       10944
Brick 10.70.43.140:/rhs/thinbrick1/cross3   49186     0          Y       30051
Brick 10.70.42.75:/rhs/thinbrick2/cross3    49181     0          Y       10962
Brick 10.70.42.75:/rhs/thinbrick3/cross3    49182     0          Y       10980
Brick 10.70.43.140:/rhs/thinbrick2/cross3   49187     0          Y       30069
Brick 10.70.42.75:/rhs/thinbrick4/cross3    49183     0          Y       10998
NFS Server on localhost                     2049      0          Y       30088
Self-heal Daemon on localhost               N/A       N/A        Y       30097
NFS Server on 10.70.42.75                   2049      0          Y       11018
Self-heal Daemon on 10.70.42.75             N/A       N/A        Y       11028
 
Task Status of Volume cross3vol
------------------------------------------------------------------------------
There are no active volume tasks
 
[root@dhcp43-140 ~]# 
[root@dhcp43-140 ~]# 
[root@dhcp43-140 ~]# glusterfind list
SESSION                   VOLUME                    SESSION TIME             
---------------------------------------------------------------------------
testvol_sess              testvol                   2015-06-04 23:38:02      
testvol_session_46        testvol                   Session Corrupted        
cross32                   cross3vol                 2015-06-04 22:46:01      
cross33                   cross3vol                 2015-06-04 22:46:09      
cross31                   cross3vol                 2015-06-04 23:48:39      
[root@dhcp43-140 ~]# glusterfind create sessc cross3vol
[root@dhcp43-140 ~]# # after creating 2 files and a dir
[root@dhcp43-140 ~]# glusterfind pre sessc cross3vol outc.txt
Generated output file /root/outc.txt
[root@dhcp43-140 ~]# ls -l /root/outc.txt 
-rw-r--r--. 1 root root 32 Jun  5 00:14 /root/outc.txt
[root@dhcp43-140 ~]# cat /root/outc.txt 
NEW test1 
NEW dir1 
NEW test2 
[root@dhcp43-140 ~]# 
[root@dhcp43-140 ~]# glusterfind post sessc cross3vol
[root@dhcp43-140 ~]# 
[root@dhcp43-140 ~]# 
[root@dhcp43-140 ~]# # after moving a file to another directory , retaining teh same name
[root@dhcp43-140 ~]# glusterfind pre sessc cross3vol outc.txt
Generated output file /root/outc.txt
[root@dhcp43-140 ~]# cat /root/outc.txt 
MODIFY dir1%2Ftest1 
[root@dhcp43-140 ~]# glusterfind post sessc cross3vol
[root@dhcp43-140 ~]# # after renaming a fiel
[root@dhcp43-140 ~]# glusterfind pre sessc cross3vol outc.txt
Generated output file /root/outc.txt
[root@dhcp43-140 ~]# cat /root/outc.txt 
[root@dhcp43-140 ~]# glusterfind pre sessc cross3vol outc.txt --regenerate-outfile
Generated output file /root/outc.txt
[root@dhcp43-140 ~]# cat /root/outc.txt 
[root@dhcp43-140 ~]# # after moving back the file from anotehr directory, this time with a new name
[root@dhcp43-140 ~]# glusterfind pre sessc cross3vol outc.txt --regenerate-outfile
Generated output file /root/outc.txt
[root@dhcp43-140 ~]# cat /root/outc.txt 
[root@dhcp43-140 ~]#

Comment 2 Saravanakumar 2015-06-22 10:14:14 UTC
Hi,
Could you try with latest build (3.7.1-3) ?
This bug is closely related to bug#1226889 and fix is already in.

I have checked this in master and unable to hit the issue.
Please check and let us know.

Comment 4 Sweta Anandpara 2015-06-23 07:45:02 UTC
If I have to take an educated guess as to what must be happening here:

We have put in the intelligence in the code , where IF a file is renamed, THEN for all the operations that have happened on that path, substitute the old path with the new path - and that gives the correct picture - for all the operations (modify /delete)

BUT when we do the above mentioned check, we HAVE to skip THE one 'rename' op that is actually changing the path from old to new. Failure to do so, results in RENAME entry logging new path itself. 

Present behaviour: RENAME <newpath> <newpath>

Expected: RENAME <oldpath> <newpath>

Comment 6 Saravanakumar 2015-06-23 14:00:55 UTC
(In reply to Sweta Anandpara from comment #4)
> If I have to take an educated guess as to what must be happening here:
> 
> We have put in the intelligence in the code , where IF a file is renamed,
> THEN for all the operations that have happened on that path, substitute the
> old path with the new path - and that gives the correct picture - for all
> the operations (modify /delete)
> 
> BUT when we do the above mentioned check, we HAVE to skip THE one 'rename'
> op that is actually changing the path from old to new. Failure to do so,
> results in RENAME entry logging new path itself. 
> 
> Present behaviour: RENAME <newpath> <newpath>
> 
> Expected: RENAME <oldpath> <newpath>

Thanks! I can recreate this issue. 
Issue occurs when MODIFY is carried out immediately followed by RENAME.

So, we end up like:
MODIFY <NEW_PATH/NEW_FILE_NAME>
RENAME <NEW_PATH/NEW_FILE_NAME> <NEW_PATH/NEW_FILE_NAME>

I will update further.

Comment 7 Saravanakumar 2015-06-26 06:45:22 UTC
   I am showing different sequence possible for Modify + Rename along with possible solution.

-------------------------------------------------------------------------------
Case 1:
(At Backend) :
Modify OLD
Rename OLD NEW

           ==> Currently recorded as (bug!)
                            MODIFY NEW    (We don't have NEW entry )
                            RENAME NEW NEW. ( ? )
Solution:
=====
         ==> Record it as
                        (MODIFY OLD) recorded and this is deleted later. 
                           RENAME OLD NEW
                           MODIFY NEW.

How this works ?
Whenever Rename happens, just delete all modify entry recorded in the past
with "source file", and ADD a modify entry for the "destination" file.
    (Here Delete "MODIFY OLD", which is recorded earlier).

(Although it is recorded as MODIFY NEW , it will actually get the changes happened in OLD file only )
-------------------------------------------------------------------------------
Case 2:
(At Backend)
Rename OLD NEW
Modify NEW

           ==> Currently recorded as: (bug!)
                        RENAME OLD NEW.
                        ( it is missing MODIFY NEW)**
Solution:
=====
         ==> Record it as
                    RENAME OLD NEW
                    MODIFY NEW.

How this works ?
just record rename and modify as it is. DO NOT delete any entry (like this)**.
-------------------------------------------------------------------------------
Case 3:
(At Backend)
Modify OLD
Rename OLD NEW
Modify NEW

        ==> recorded as (Bug!)
                   MODIFY NEW.
                   RENAME NEW NEW

Solution:
======
         ==> Record it as
                   (MODIFY OLD) recorded and this is deleted later. 
                   RENAME OLD NEW
                   MODIFY NEW
                   MODIFY NEW++

How this works ?
Whenever Rename happens, just ignore all modify entry recorded in the past
with "source file", and ADD a modify entry for "destination" file

Although we have duplicate entries for MODIFY(++) here, not so BIG harm here.(maybe we can look into this later).
=================================

Case 4:
Another not very related issue observed:
(at Backend)
Rename file123 file456
Rename file456 file123

              ==> Recorded as (bug!)
                        RENAME file123 file123  //  source and destination is same!

Solution:
======
NOTHING recorded. (unless a modify happens).

Although the above solution looks good, we run into more issues once MODIFY starts coming in between here.
Refer below.
-------------------------------------------------------------------------------
Case 5:
(at Backend)
modify file123
Rename file123 file456
Rename file456 file123

Solution?? :
         ==> Record it as
                   MODIFY file123

How this works ?
So, actually it hits these operations in this sequence:
modify file123
         ==> Record it as
                   MODIFY file123 (Recorded and deleted later)

mv file123 file456
          ==> Record it as
                    RENAME file123 file456 (Recorded and deleted later)
                    MODIFY file456  ( as discussed in Case(1) and we delete "MODIFY file123" entry )

and then:
mv file456 file123
          ==> Record it as :
                   (Delete the previous rename entry here)
                   MODIFY file123 (as discussed in Case(1) and we delete "MODIFY file456" entry recorded in previous step).

and it ended
-------------------------------------------------------------------------------
Case 6:

(at Backend)
Rename file123 file456
modify file456
Rename file456 file123

Solution :
         ==> Record it as
                   MODIFY file123

How this works ?
Refer Case 5.
-------------------------------------------------------------------------------
Case 7:
(at Backend)
Rename file123 file456
Rename file456 file123
modify file123

Solution :
         ==> Record it as
                   MODIFY file123

How this works ?
Refer Case 5
-------------------------------------------------------------------------------

This case works fine:
rename file123 file456
Rename file456 fiel789

CORRECTLY recorded as:
    ==>RENAME file123 file789.

MODIFY (if any)in between these renames should be similar to Case 5,6,7.
-------------------------------------------------------------------------------

I will first address logging "rename NEW NEW" to be recorded as "rename OLD NEW".

Comment 8 Kotresh HR 2015-06-27 09:44:20 UTC
Upstream Patch (master):
http://review.gluster.org/#/c/11443

Upstream Patch (3.7):
http://review.gluster.org/#/c/11444

Downstream Patch:
https://code.engineering.redhat.com/gerrit/#/c/51753/

Comment 11 Kotresh HR 2015-07-06 07:09:25 UTC
Downstream Patch: The earlier one is Abandoned

https://code.engineering.redhat.com/gerrit/#/c/52285/

Comment 12 Sweta Anandpara 2015-07-09 13:41:37 UTC
Tested and verified this on the build glusterfs-3.7.1-8.el6rhs.x86_64

Multiple modify's and renames of files across directories, with the same or different names across same/different locations, does log a correct entry in the output file. 

Moving this to fixed in 3.1 everglades. Detailed logs are pasted below:

SERVER
=========

[root@dhcp43-140 ~]# 
[root@dhcp43-140 ~]# gluster v list
testvol
[root@dhcp43-140 ~]# 
[root@dhcp43-140 ~]# 
[root@dhcp43-140 ~]# rpm -qa | grep gluster
glusterfs-libs-3.7.1-8.el6rhs.x86_64
glusterfs-fuse-3.7.1-8.el6rhs.x86_64
glusterfs-3.7.1-8.el6rhs.x86_64
glusterfs-api-3.7.1-8.el6rhs.x86_64
glusterfs-cli-3.7.1-8.el6rhs.x86_64
glusterfs-geo-replication-3.7.1-8.el6rhs.x86_64
glusterfs-client-xlators-3.7.1-8.el6rhs.x86_64
glusterfs-server-3.7.1-8.el6rhs.x86_64
[root@dhcp43-140 ~]# 
[root@dhcp43-140 ~]# 
[root@dhcp43-140 ~]# gluster v create ozone replica 2 10.70.43.140:/rhs/thinbrick1/ozone 10.70.42.75:/rhs/thinbrick1/ozone 10.70.43.140:/rhs/thinbrick2/ozone 10.70.42.75:/rhs/thinbrick2/ozone
volume create: ozone: success: please start the volume to access data
[root@dhcp43-140 ~]# 
[root@dhcp43-140 ~]# 
[root@dhcp43-140 ~]# gluster v info ozone
 
Volume Name: ozone
Type: Distributed-Replicate
Volume ID: aa2e4386-ab12-4d17-8cf6-894e29e94563
Status: Created
Number of Bricks: 2 x 2 = 4
Transport-type: tcp
Bricks:
Brick1: 10.70.43.140:/rhs/thinbrick1/ozone
Brick2: 10.70.42.75:/rhs/thinbrick1/ozone
Brick3: 10.70.43.140:/rhs/thinbrick2/ozone
Brick4: 10.70.42.75:/rhs/thinbrick2/ozone
Options Reconfigured:
performance.readdir-ahead: on
[root@dhcp43-140 ~]# 
[root@dhcp43-140 ~]# 
[root@dhcp43-140 ~]# gluster v start ozone



volume start: ozone: success
[root@dhcp43-140 ~]# 
[root@dhcp43-140 ~]# 
[root@dhcp43-140 ~]# 
[root@dhcp43-140 ~]# gluster v info ozone
 
Volume Name: ozone
Type: Distributed-Replicate
Volume ID: aa2e4386-ab12-4d17-8cf6-894e29e94563
Status: Started
Number of Bricks: 2 x 2 = 4
Transport-type: tcp
Bricks:
Brick1: 10.70.43.140:/rhs/thinbrick1/ozone
Brick2: 10.70.42.75:/rhs/thinbrick1/ozone
Brick3: 10.70.43.140:/rhs/thinbrick2/ozone
Brick4: 10.70.42.75:/rhs/thinbrick2/ozone
Options Reconfigured:
performance.readdir-ahead: on
[root@dhcp43-140 ~]# glusterfind list
SESSION                   VOLUME                    SESSION TIME             
---------------------------------------------------------------------------
testvol_session_53        testvol                   2015-07-07 00:00:23      
[root@dhcp43-140 ~]# 
[root@dhcp43-140 ~]# 
[root@dhcp43-140 ~]# glusterfind create so1 ozone
Session so1 created with volume ozone
[root@dhcp43-140 ~]# glusterfind create so12ozone
usage: glusterfind create [-h] [--debug] [--force] [--reset-session-time]
                          session volume
glusterfind create: error: too few arguments
[root@dhcp43-140 ~]#  
[root@dhcp43-140 ~]# glusterfind create so12 ozone
Session so12 created with volume ozone
[root@dhcp43-140 ~]# 
[root@dhcp43-140 ~]# 
[root@dhcp43-140 ~]# glusterfind delete so12 ozone
root.42.75's password: root.42.75's password: 


root.42.75's password: 
Session so12 with volume ozone deleted
[root@dhcp43-140 ~]# glusterfind list
SESSION                   VOLUME                    SESSION TIME             
---------------------------------------------------------------------------
testvol_session_53        testvol                   2015-07-07 00:00:23      
so1                       ozone                     2015-07-09 21:30:24      
[root@dhcp43-140 ~]# glusterfind create so2 ozone
Session so2 created with volume ozone
[root@dhcp43-140 ~]# glusterfind create so3 ozone
Session so3 created with volume ozone
[root@dhcp43-140 ~]# 
[root@dhcp43-140 ~]# 
[root@dhcp43-140 ~]# glusterfind list
SESSION                   VOLUME                    SESSION TIME             
---------------------------------------------------------------------------
so2                       ozone                     2015-07-09 21:31:31      
testvol_session_53        testvol                   2015-07-07 00:00:23      
so1                       ozone                     2015-07-09 21:30:24      
so3                       ozone                     2015-07-09 21:32:37      
[root@dhcp43-140 ~]# 
[root@dhcp43-140 ~]# 
[root@dhcp43-140 ~]# glusterfind pre so1 ozone /tmp/out1
Generated output file /tmp/out1
[root@dhcp43-140 ~]# cat /tmp/out1
MODIFY .trashcan%2F 
NEW test1 
NEW test2 
NEW test3 
NEW dir1 
NEW dir1%2F%2Fdir2 
NEW dir1%2Fdir2%2F%2Fdir3 
NEW dir1%2Fdir2%2Fdir3%2F%2Fdir4 
NEW d1 
NEW d1%2F%2Fd2 
NEW d1%2Fd2%2F%2Fd3 
[root@dhcp43-140 ~]# glusterfind post so1 ozone
Session so1 with volume ozone updated
[root@dhcp43-140 ~]# glusterfind pre so1 ozone /tmp/out1
Generated output file /tmp/out1
[root@dhcp43-140 ~]# cat /tmp/out1
NEW dir1%2Fdir2%2Fdir3%2F%2Fd3a 
[root@dhcp43-140 ~]# glusterfind post so1 ozone
Session so1 with volume ozone updated
[root@dhcp43-140 ~]# glusterfind pre so1 ozone /tmp/out1
Generated output file /tmp/out1
[root@dhcp43-140 ~]# cat /tmp/out1
RENAME dir1%2Fdir2%2Fdir3%2F%2Fd3a d3a
MODIFY d3a 
[root@dhcp43-140 ~]# 
[root@dhcp43-140 ~]# 
[root@dhcp43-140 ~]# 
[root@dhcp43-140 ~]# 
[root@dhcp43-140 ~]# glusterfind post so1 ozone
Session so1 with volume ozone updated
[root@dhcp43-140 ~]# glusterfind pre so1 ozone /tmp/out1
Generated output file /tmp/out1
[root@dhcp43-140 ~]# cat /tmp/out1
MODIFY .trashcan%2Finternal_op%2F 
RENAME test1 dir1%2Fdir2%2F%2Ftest1
MODIFY dir1%2Fdir2%2Ftest1 
[root@dhcp43-140 ~]# 
[root@dhcp43-140 ~]# 
[root@dhcp43-140 ~]# 
[root@dhcp43-140 ~]# 
[root@dhcp43-140 ~]# 
[root@dhcp43-140 ~]# 
[root@dhcp43-140 ~]# glusterfind post so1 ozone
Session so1 with volume ozone updated
[root@dhcp43-140 ~]# 
[root@dhcp43-140 ~]# 
[root@dhcp43-140 ~]# glusterfind pre so2 ozone /tmp/out2
Generated output file /tmp/out2
[root@dhcp43-140 ~]# glusterfind pre so1 ozone /tmp/out1
Generated output file /tmp/out1
[root@dhcp43-140 ~]# 
[root@dhcp43-140 ~]# cat /tmp/out1
RENAME test2 dir1%2Fdir2%2Fdir3%2Fdir4%2F%2Ftest22
MODIFY dir1%2Fdir2%2Fdir3%2Fdir4%2Ftest22 
[root@dhcp43-140 ~]# 
[root@dhcp43-140 ~]# cat /tmp/out2 
MODIFY .trashcan%2F 
NEW dir1%2Fdir2%2F%2Ftest1 
NEW dir1%2Fdir2%2Fdir3%2Fdir4%2F%2Ftest22 
NEW test3 
NEW dir1 
NEW dir1%2F%2Fdir2 
NEW dir1%2Fdir2%2F%2Fdir3 
NEW dir1%2Fdir2%2Fdir3%2F%2Fdir4 
NEW d1 
NEW d1%2F%2Fd2 
NEW d1%2Fd2%2F%2Fd3 
NEW d3a 
MODIFY .trashcan%2Finternal_op%2F 
[root@dhcp43-140 ~]# 
[root@dhcp43-140 ~]# 
[root@dhcp43-140 ~]# 
[root@dhcp43-140 ~]# 
[root@dhcp43-140 ~]# 
[root@dhcp43-140 ~]# 
[root@dhcp43-140 ~]# 
[root@dhcp43-140 ~]# 
[root@dhcp43-140 ~]# 
[root@dhcp43-140 ~]# 
[root@dhcp43-140 ~]# 
[root@dhcp43-140 ~]# 
[root@dhcp43-140 ~]# glusterfind post so1 ozone
Session so1 with volume ozone updated
[root@dhcp43-140 ~]# glusterfind post so2 ozone
Session so2 with volume ozone updated
[root@dhcp43-140 ~]# glusterfind pre so1 ozone /tmp/out1
Generated output file /tmp/out1
[root@dhcp43-140 ~]# cat /tmp/out1
NEW dir1%2Fdir2%2F%2Ftest22_link 
NEW test3_ln 
[root@dhcp43-140 ~]# 
[root@dhcp43-140 ~]# 
[root@dhcp43-140 ~]# 
[root@dhcp43-140 ~]# 
[root@dhcp43-140 ~]# 
[root@dhcp43-140 ~]# 
[root@dhcp43-140 ~]# 
[root@dhcp43-140 ~]# 
[root@dhcp43-140 ~]# 
[root@dhcp43-140 ~]# glusterfind post so2 ozone
Pre script is not run
[root@dhcp43-140 ~]# glusterfind post so1 ozone
Session so1 with volume ozone updated
[root@dhcp43-140 ~]# glusterfind pre so1 ozone /tmp/out1
Generated output file /tmp/out1
[root@dhcp43-140 ~]# cat /tmp/out1
RENAME test3_ln d1%2Fd2%2Fd3%2F%2Ftest3_link2
[root@dhcp43-140 ~]# 
[root@dhcp43-140 ~]# 
[root@dhcp43-140 ~]# 
[root@dhcp43-140 ~]# 
[root@dhcp43-140 ~]# 
[root@dhcp43-140 ~]# 
[root@dhcp43-140 ~]# 
[root@dhcp43-140 ~]# 
[root@dhcp43-140 ~]# glusterfind post so1 ozone
Session so1 with volume ozone updated
[root@dhcp43-140 ~]# glusterfind pre so1 ozone /tmp/out1
Generated output file /tmp/out1
[root@dhcp43-140 ~]# cat /tmp/out1
RENAME dir1%2Fdir2%2F%2Ftest22_link test22_link
RENAME dir1%2Fdir2%2Fdir3%2Fdir4%2Ftest22 test22_link
MODIFY dir1%2Fdir2%2Fdir3%2Fdir4%2Ftest22 
MODIFY test22_link 
[root@dhcp43-140 ~]# 


CLIENT
========

[root@dhcp43-71 ~]# 
[root@dhcp43-71 ~]# mount | grep testvol
10.70.43.93:testvol on /mnt/glusterfs type fuse.glusterfs (rw,default_permissions,allow_other,max_read=131072)
[root@dhcp43-71 ~]# 
[root@dhcp43-71 ~]# 
[root@dhcp43-71 ~]# mount | grep oz
10.70.42.30:/ozone on /mnt/ozone type fuse.glusterfs (rw,default_permissions,allow_other,max_read=131072)
10.70.43.93:/ozone on /mnt/oz type fuse.glusterfs (rw,default_permissions,allow_other,max_read=131072)
[root@dhcp43-71 ~]# umount /mnt/ozone
[root@dhcp43-71 ~]# mount -t glusterfs 10.70.43.140:/ozone /mnt/ozone
[root@dhcp43-71 ~]# cd /mnt/ozone
[root@dhcp43-71 ozone]# ls -a
.  ..  .trashcan
[root@dhcp43-71 ozone]# 
[root@dhcp43-71 ozone]# 
[root@dhcp43-71 ozone]# echo "what a beautiful day" > test1
[root@dhcp43-71 ozone]# echo "hello world" > test2
[root@dhcp43-71 ozone]# touch test3
[root@dhcp43-71 ozone]# 
[root@dhcp43-71 ozone]# mkdir -p dir1/dir2/dir3/dir4
[root@dhcp43-71 ozone]#
[root@dhcp43-71 ozone]# 
[root@dhcp43-71 ozone]# ls -a
.  ..  dir1  test1  test2  test3  .trashcan
[root@dhcp43-71 ozone]# mkdir -p d1/d2/d3
[root@dhcp43-71 ozone]# touch d1/dia
[root@dhcp43-71 ozone]# rm d1/dia
rm: remove regular empty file `d1/dia'? y
[root@dhcp43-71 ozone]# 
[root@dhcp43-71 ozone]# 
[root@dhcp43-71 ozone]# echo "whatever" > d1/d2/d3/d3a
[root@dhcp43-71 ozone]# mv d1/d2/d3/d3a dir1/dir2/dir3/
[root@dhcp43-71 ozone]# ls d1/d2/d3/
[root@dhcp43-71 ozone]# ls dir1/dir2/dir3/
d3a  dir4
[root@dhcp43-71 ozone]# 
[root@dhcp43-71 ozone]# 
[root@dhcp43-71 ozone]# 
[root@dhcp43-71 ozone]# 
[root@dhcp43-71 ozone]# 
[root@dhcp43-71 ozone]# 
[root@dhcp43-71 ozone]# 
[root@dhcp43-71 ozone]# 
[root@dhcp43-71 ozone]# 
[root@dhcp43-71 ozone]# 
[root@dhcp43-71 ozone]# 
[root@dhcp43-71 ozone]# 
[root@dhcp43-71 ozone]# 
[root@dhcp43-71 ozone]# 
[root@dhcp43-71 ozone]# 
[root@dhcp43-71 ozone]# 
[root@dhcp43-71 ozone]# 
[root@dhcp43-71 ozone]# 
[root@dhcp43-71 ozone]# 
[root@dhcp43-71 ozone]# echo 'whatever again' >> dir1/dir2/dir3/d3a 
[root@dhcp43-71 ozone]# mv dir1/dir2/dir3/d3a .
[root@dhcp43-71 ozone]# ls -a
.  ..  d1  d3a  dir1  test1  test2  test3  .trashcan
[root@dhcp43-71 ozone]# 
[root@dhcp43-71 ozone]# 
[root@dhcp43-71 ozone]# 
[root@dhcp43-71 ozone]# 
[root@dhcp43-71 ozone]# 
[root@dhcp43-71 ozone]# 
[root@dhcp43-71 ozone]# 
[root@dhcp43-71 ozone]# 
[root@dhcp43-71 ozone]# 
[root@dhcp43-71 ozone]# 
[root@dhcp43-71 ozone]# 
[root@dhcp43-71 ozone]# 
[root@dhcp43-71 ozone]# 
[root@dhcp43-71 ozone]# 
[root@dhcp43-71 ozone]# 
[root@dhcp43-71 ozone]# 
[root@dhcp43-71 ozone]# find
.
./.trashcan
./.trashcan/internal_op
./test1
./test2
./dir1
./dir1/dir2
./dir1/dir2/dir3
./dir1/dir2/dir3/dir4
./d1
./d1/d2
./d1/d2/d3
./d3a
./test3
[root@dhcp43-71 ozone]# 
[root@dhcp43-71 ozone]# cat test1
what a beautiful day
[root@dhcp43-71 ozone]# echo ".. and it is raining" >> test1 
[root@dhcp43-71 ozone]# mv test1 dir1/dir2/
[root@dhcp43-71 ozone]# mv dir1/dir2/test1 dir1/dir2/dir3/dir4/
[root@dhcp43-71 ozone]# echo ".. even more" >> dir1/dir2/dir3/dir4/test1 
[root@dhcp43-71 ozone]# mv dir1/dir2/dir3/dir4/test1 dir1/dir2/
[root@dhcp43-71 ozone]# 
[root@dhcp43-71 ozone]# 
[root@dhcp43-71 ozone]# 
[root@dhcp43-71 ozone]# 
[root@dhcp43-71 ozone]# 
[root@dhcp43-71 ozone]# 
[root@dhcp43-71 ozone]# 
[root@dhcp43-71 ozone]# 
[root@dhcp43-71 ozone]# 
[root@dhcp43-71 ozone]# 
[root@dhcp43-71 ozone]# 
[root@dhcp43-71 ozone]# 
[root@dhcp43-71 ozone]# 
[root@dhcp43-71 ozone]# ls -lrt
total 3
-rw-r--r--. 1 root root 12 Jul  9 21:43 test2
-rw-r--r--. 1 root root  0 Jul  9 21:43 test3
drwxr-xr-x. 3 root root 34 Jul  9 21:43 dir1
drwxr-xr-x. 3 root root 30 Jul 10 00:16 d1
-rw-r--r--. 1 root root 24 Jul 10 00:20 d3a
[root@dhcp43-71 ozone]# 
[root@dhcp43-71 ozone]# 
[root@dhcp43-71 ozone]# mv test2 test2new
[root@dhcp43-71 ozone]# mv test2new d1/d2/
[root@dhcp43-71 ozone]# cat d1/d2/test2new 
hello world
[root@dhcp43-71 ozone]# echo ".." >> d1/d2/test2new 
[root@dhcp43-71 ozone]# 
[root@dhcp43-71 ozone]# echo "here I come.. " >> d1/d2/test2new 
[root@dhcp43-71 ozone]# 
[root@dhcp43-71 ozone]# mv d1/d2/test2new d1/d2/test22
[root@dhcp43-71 ozone]# mv d1/d2/test22 dir1/dir2/dir3/dir4/
[root@dhcp43-71 ozone]# 
[root@dhcp43-71 ozone]# 
[root@dhcp43-71 ozone]# 
[root@dhcp43-71 ozone]# 
[root@dhcp43-71 ozone]# 
[root@dhcp43-71 ozone]# 
[root@dhcp43-71 ozone]# l s-lrt
-bash: l: command not found
[root@dhcp43-71 ozone]# ls -lrt
total 3
-rw-r--r--. 1 root root  0 Jul  9 21:43 test3
drwxr-xr-x. 3 root root 34 Jul  9 21:43 dir1
drwxr-xr-x. 3 root root 30 Jul 10 00:16 d1
-rw-r--r--. 1 root root 24 Jul 10 00:20 d3a
[root@dhcp43-71 ozone]# 
[root@dhcp43-71 ozone]# 
[root@dhcp43-71 ozone]# 
[root@dhcp43-71 ozone]# 
[root@dhcp43-71 ozone]# 
[root@dhcp43-71 ozone]# 
[root@dhcp43-71 ozone]# 
[root@dhcp43-71 ozone]# 
[root@dhcp43-71 ozone]# 
[root@dhcp43-71 ozone]# 
[root@dhcp43-71 ozone]# 
[root@dhcp43-71 ozone]# 
[root@dhcp43-71 ozone]# 
[root@dhcp43-71 ozone]# ln dir1/dir2/dir3/dir4/test22 dir1/dir2/test22_link
[root@dhcp43-71 ozone]# ls dir1/dir2/test22_link
dir1/dir2/test22_link
[root@dhcp43-71 ozone]# ll dir1/dir2/test22_link
-rw-r--r--. 2 root root 30 Jul 10 00:26 dir1/dir2/test22_link
[root@dhcp43-71 ozone]# 
[root@dhcp43-71 ozone]# cat dir1/dir2/test22_link 
hello world
..
here I come.. 
[root@dhcp43-71 ozone]# 
[root@dhcp43-71 ozone]# link test3 test3_link
[root@dhcp43-71 ozone]# 
[root@dhcp43-71 ozone]# mv test3_link test3_ln
[root@dhcp43-71 ozone]# l s-lrt
-bash: l: command not found
[root@dhcp43-71 ozone]# ls -lrt
total 3
-rw-r--r--. 2 root root  0 Jul  9 21:43 test3_ln
-rw-r--r--. 2 root root  0 Jul  9 21:43 test3
drwxr-xr-x. 3 root root 34 Jul  9 21:43 dir1
drwxr-xr-x. 3 root root 30 Jul 10 00:16 d1
-rw-r--r--. 1 root root 24 Jul 10 00:20 d3a
[root@dhcp43-71 ozone]# 
[root@dhcp43-71 ozone]# mv test3_ln d1/d2/d3/test3_link
[root@dhcp43-71 ozone]# 
[root@dhcp43-71 ozone]# mv d1/d2/d3/test3_link d1/d2/d3/test3_link2
[root@dhcp43-71 ozone]# 
[root@dhcp43-71 ozone]# ls d1/d2/d3/
test3_link2
[root@dhcp43-71 ozone]# 
[root@dhcp43-71 ozone]# 
[root@dhcp43-71 ozone]# 
[root@dhcp43-71 ozone]# 
[root@dhcp43-71 ozone]# 
[root@dhcp43-71 ozone]# 
[root@dhcp43-71 ozone]# 
[root@dhcp43-71 ozone]# 
[root@dhcp43-71 ozone]# 
[root@dhcp43-71 ozone]# 
[root@dhcp43-71 ozone]# 
[root@dhcp43-71 ozone]# 
[root@dhcp43-71 ozone]# cat dir1/dir2/
dir3/        test1        test22_link  
[root@dhcp43-71 ozone]# cat dir1/dir2/test22_link 
hello world
..
here I come.. 
[root@dhcp43-71 ozone]# 
[root@dhcp43-71 ozone]# echo "still coming" >> dir1/dir2/test22_link 
[root@dhcp43-71 ozone]# 
[root@dhcp43-71 ozone]# mv dir1/dir2/test22_link .
[root@dhcp43-71 ozone]# 
[root@dhcp43-71 ozone]# ls -lrt
total 3
-rw-r--r--. 2 root root  0 Jul  9 21:43 test3
drwxr-xr-x. 3 root root 34 Jul  9 21:43 dir1
drwxr-xr-x. 3 root root 30 Jul 10 00:16 d1
-rw-r--r--. 1 root root 24 Jul 10 00:20 d3a
-rw-r--r--. 2 root root 43 Jul 10 00:35 test22_link
[root@dhcp43-71 ozone]#

Comment 13 Sweta Anandpara 2015-07-09 13:49:57 UTC
The issue wrt modify/rename of hardlink (seen above in the logs) is being tracked by bug 1233147

Comment 14 errata-xmlrpc 2015-07-29 04:57:06 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://rhn.redhat.com/errata/RHSA-2015-1495.html


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