Bug 1020270 - Rebalancing volume
Summary: Rebalancing volume
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: GlusterFS
Classification: Community
Component: replicate
Version: 3.1.2
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Pranith Kumar K
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-10-17 11:11 UTC by jordi
Modified: 2014-01-03 12:20 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-01-03 12:20:09 UTC
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Embargoed:


Attachments (Terms of Use)

Description jordi 2013-10-17 11:11:17 UTC
Hi!
I've a doubt about the Rebalancing system in Gluster.
The structure of my Volume is:
Server1
    Brick0
    Brick2

Server2
    Brick1
    Brick3


I've create 16 files in the mount folder and I expected to have 8 files in each brick, and two replicas (files of Brick0= files of Brick1, and, files of Brick2= files of Brick3).

But in practice, gluster puts 6 files in one brick and 9 on the other brick.

I've executed the command to rebalance and migrate files. 

Is this behavior correct?

Can I configure that one brick has more files than other?


root@NCSL008:/home# ls -la brick1
total 1732276
drwxr-xr-x  3 root root      4096 Oct 17 12:34 .
drwxr-xr-x  5 root root      4096 Oct 17 11:41 ..
-rw-r--r--  2 root root 220514438 Oct 17 12:29 big_buck_bunny_480p_surround-fix2.avi
-rw-r--r--  2 root root 220514438 Oct 17 12:30 big_buck_bunny_480p_surround-fix3.avi
-rw-r--r--  2 root root 220514438 Oct 17 12:31 big_buck_bunny_480p_surround-fix5.avi
-rw-r--r--  2 root root 220514438 Oct 17 12:34 big_buck_bunny_480p_surround-fix9.avi
-rw-r--r--  2 root root 445866736 Oct 17 11:59 ED_1025.avi
-rw-r--r--  2 root root 445866736 Oct 17 12:00 ED_1026.avi
drw------- 11 root root      4096 Oct 17 12:34 .glusterfs
root@NCSL008:/home# ls -la brick3
total 2378332
drwxr-xr-x  3 root root      4096 Oct 17 12:34 .
drwxr-xr-x  5 root root      4096 Oct 17 11:41 ..
-rw-r--r--  2 root root 220514438 Oct 17 12:34 big_buck_bunny_480p_surround-fix0.avi
-rw-r--r--  2 root root 220514438 Oct 17 12:01 big_buck_bunny_480p_surround-fix1.avi
-rw-r--r--  2 root root 220514438 Oct 17 12:30 big_buck_bunny_480p_surround-fix4.avi
-rw-r--r--  2 root root 220514438 Oct 17 12:31 big_buck_bunny_480p_surround-fix6.avi
-rw-r--r--  2 root root 220514438 Oct 17 12:31 big_buck_bunny_480p_surround-fix7.avi
-rw-r--r--  2 root root 220514438 Oct 17 12:31 big_buck_bunny_480p_surround-fix8.avi
-rw-r--r--  2 root root 220514438 May 31  2008 big_buck_bunny_480p_surround-fix.avi
-rw-r--r--  2 root root 445866736 Oct 17 11:55 ED_1024.avi
-rw-r--r--  2 root root 445866736 Oct 17 12:00 ED_1027.avi
drw------- 13 root root      4096 Oct 17 12:34 .glusterfs




root@NCSL008:/home# gluster volume status test-volume detail
Status of volume: test-volume
------------------------------------------------------------------------------
Brick                : Brick XXXX1:/home/brick0
Port                 : 24009               
Online               : Y                   
Pid                  : 1270                
File System          : ext4                
Device               : /dev/mapper/vg0-root
Mount Options        : rw,errors=remount-ro,user_xattr
Inode Size           : 256                 
Disk Space Free      : 142.5GB             
Total Disk Space     : 153.9GB             
Inode Count          : 10100736            
Free Inodes          : 10014569            
------------------------------------------------------------------------------
Brick                : Brick XXXX2:/home/brick1
Port                 : 24014               
Online               : Y                   
Pid                  : 1010                
File System          : ext4                
Device               : /dev/mapper/vg0-root
Mount Options        : rw,errors=remount-ro
Inode Size           : 256                 
Disk Space Free      : 143.5GB             
Total Disk Space     : 153.9GB             
Inode Count          : 10100736            
Free Inodes          : 10028805            
------------------------------------------------------------------------------
Brick                : Brick XXXX1:/home/brick2
Port                 : 24010               
Online               : Y                   
Pid                  : 1276                
File System          : ext4                
Device               : /dev/mapper/vg0-root
Mount Options        : rw,errors=remount-ro,user_xattr
Inode Size           : 256                 
Disk Space Free      : 142.5GB             
Total Disk Space     : 153.9GB             
Inode Count          : 10100736            
Free Inodes          : 10014569            
------------------------------------------------------------------------------
Brick                : Brick XXXX2:/home/brick3
Port                 : 24015               
Online               : Y                   
Pid                  : 1016                
File System          : ext4                
Device               : /dev/mapper/vg0-root
Mount Options        : rw,errors=remount-ro
Inode Size           : 256                 
Disk Space Free      : 143.5GB             
Total Disk Space     : 153.9GB             
Inode Count          : 10100736            
Free Inodes          : 10028805

Comment 1 Pranith Kumar K 2014-01-03 12:20:09 UTC
Please refer to http://hekafs.org/index.php/2012/03/glusterfs-algorithms-distribution/ for understanding how files are placed in glusterfs. It need not be equally distributed for the names that you chose. it all depends on 'file-names' you choose. Closing this bug as it is not a bug.


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