Re: A problem when I renamed a file in a Distributed-Disperse volume.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 





On 07/04/2015 05:31 PM, christ1016@xxxxxxxx wrote:
Hi, everyone.

I am louis, and I found a problem when I rename a file which is in a Distributed-Disperse volume. And I doubt this is a glusterfs bug. The problem can be described like below:

1) There is a Distributed-Disperse volume called yxy in my cluster. The volume info as below:

           Volume Name: yxy
           Type: Distributed-Disperse
           Volume ID: 6e00423e-f8b8-4a76-9ab2-885f67b0eefd
                  Status: Started
                  Number of Bricks: 2 x (2 + 1) = 6
                  Transport-type: tcp
                  Bricks:
                  Brick1: 191.168.45.106:/NAS/nasdevice51
                  Brick2: 191.168.45.106:/NAS/nasdevice52
                  Brick3: 191.168.45.106:/NAS/nasdevice53
                  Brick4: 191.168.45.106:/NAS/nasdevice54
                  Brick5: 191.168.45.106:/NAS/nasdevice55
                  Brick6: 191.168.45.106:/NAS/nasdevice56
       
     2) Mount the Distributed-Disperse volume (yxy) to the dir /cluster/volume4.
     
         mount -t glusterfs 191.168.45.106:/yxy /cluster/volume4
        
     3) Create a ftp share dir called yxy-share in the mount point (/cluster/volume4), and the ftp share dir is assigned to ftp user "louis" with "rw" rights.
        
     
     4) Put a file named testfile.old to ftp share dir(yxy-sahre) of the mountpoint (/cluster/volume4) from the Windows(7) using the ftp access mode.
     
        # cd /cluster/volume4/yxy-share
        # ll -a
        total 1
        drwxrwx--- 2 root  NASGROUP   0 Jul  3 15:19 .
        drwxrwxrwx 4 root  NASGROUP  89 Jul  3 15:09 ..
        -rw-rw---- 1 louis NASGROUP 557 Jul  3 15:19 testfile.old
        
        From the "ll -a" infos, we can see the testfile.old's uid is "louis" and the gid is "NASGROUP".
        
        And we can find the testfile.old in the share dir "yxy-share" of the brick "191.168.45.106:/NAS/nasdevice51" , info as below:
        
        # cd /NAS/nasdevice51/yxy-share
        # ll -a
        total 2
        drwxrwx--- 2 root  NASGROUP  25 Jul  3 15:19 .
        drwxrwxrwx 4 root  NASGROUP  35 Jul  3 15:09 ..
        -rw-rw---- 2 louis NASGROUP 512 Jul  3 15:19 testfile.old
        
        we can see, the "ll -a" infos of the /NAS/nasdevice51/yxyshare are the same as the infos of the mountpoint.
        
     5) Now, we renamed the "testfile.old" to "testfile.new.name" in the share dir of the mountpoint (/cluster/volume4/yxy-share) from the Windows(7) using           the ftp access  mode.
     
        # cd /cluster/volume4/yxy-share
        # ll -a
        total 1
        drwxrwx--- 2 root  NASGROUP   0 Jul  3 15:37 .
        drwxrwxrwx 4 root  NASGROUP  70 Jul  3 15:36 ..
        -rw-rw---- 1 louis NASGROUP 557 Jul  3 15:36 testfile.new.name      -----> the "testfile.old" has been renamed to the "testfile.new.name", but the uid                                                                                                                                                and gid are thesame.
        
        And we can find the same info in the brick 191.168.45.106:/NAS/nasdevice51
        
        # cd /NAS/nasdevice51/yxy-share
        # ll -a
        total 2
        drwxrwx--- 2 root  NASGROUP  25 Jul  3 15:37 .
        drwxrwxrwx 4 root  NASGROUP  35 Jul  3 15:09 ..
        -rw-rw---- 2 louis NASGROUP 512 Jul  3 15:36 testfile.new.name     -----> the "testfile.old" has been renamed to the "testfile.new.name", but the uid                                                                                                                                                 and gid are thesame.
        
        
     6) After renamed the "testfile.old" to "testfile.new.name", the new named file(testfile.new.name) willed be hashed to the other Disperse called "yxy-                 disperse-1",  that is,  the "testfile.new.name" will be hashed to the 3 bricks of the other disperse (yxy-disperse-1), but the hashed file called                           "testfile.new.name" will linkto the file in the bricks of disperse0 (yxy-disperse-0).
        
        # cd /NAS/nasdevice54/yxy-share   or cd /NAS/nasdevice55/yxy-share  or cd /NAS/nasdevice56/yxy-share
        # ll -a
        total 0
        drwxrwx--- 2 root NASGROUP 30 Jul  3 15:45 .
        drwxrwxrwx 4 root NASGROUP 35 Jul  3 15:36 ..
        ---------T 2 root root      0 Jul  3 15:45 testfile.new.name        ----> the uid of the hashed file "testfile.new.name" become the "root" not the "louis", and                                                                                                                               the gid become"root" not the "NASGROUP". Is this a problem???
        
        and the log is printed below:
        

        [2015-06-26 17:53:41.649837] W [MSGID: 0] [ec-common.c:1110:ec_get_size_version_set] 0-ec_test-disperse-1: Failed to get size and version                                                                                                                                                                                   (error 2)


        [2015-06-26 17:53:41.649884] E [MSGID: 109031] [dht-linkfile.c:305:dht_linkfile_setattr_cbk] 0-ec_test-dht: Failed to set attr uid/gid on /yxy-                            share/testfile.old :<gfid:00000000-0000-0000-0000-000000000000>  [No such file or directory]
        
        
        Actually, I take the same operation to the Distribute volume, the uid and gid attrs of hashed file in the other disperse of the Distribute volume are the           same as renamed before, and no "failed" log printed.
        
        So I doubt this may be a bug of the Distribute-Disperse(dht-ec).
Is this consistently re-creatable for you? which build are you using? I tried this test on master branch and I see that the permissions are retained. Could you give volume info output as well?

Pranith
        
        
     I am very appreciate your help, and thanks very much.  
     

     

    Best Regards.  

     
                                                                                                                                                                                                                                      Louis
                                                                                                                                                                                                                                   2015/7/4

_______________________________________________
Gluster-devel mailing list
Gluster-devel@xxxxxxxxxxx
http://www.gluster.org/mailman/listinfo/gluster-devel

_______________________________________________
Gluster-devel mailing list
Gluster-devel@xxxxxxxxxxx
http://www.gluster.org/mailman/listinfo/gluster-devel

[Index of Archives]     [Gluster Users]     [Ceph Users]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux