Bug 982919

Summary: DHT : files are stored on directory which doesn't have hash range(hash layout)
Product: [Community] GlusterFS Reporter: shishir gowda <sgowda>
Component: distributeAssignee: Nagaprasad Sathyanarayana <nsathyan>
Status: CLOSED CURRENTRELEASE QA Contact:
Severity: high Docs Contact:
Priority: medium    
Version: mainlineCC: gluster-bugs, nsathyan, racpatel, rhs-bugs, smohan, vbellur
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: glusterfs-3.4.3 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: 981949 Environment:
Last Closed: 2014-04-17 13:13:23 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 981949    
Bug Blocks:    

Comment 1 Anand Avati 2013-07-10 06:48:50 UTC
REVIEW: http://review.gluster.org/5299 (cluster/dht: Ignore subvols with error in min-free-disk/inodes) posted (#3) for review on master by Shishir Gowda (sgowda)

Comment 2 Anand Avati 2013-07-10 08:57:14 UTC
COMMIT: http://review.gluster.org/5299 committed in master by Vijay Bellur (vbellur) 
------
commit 63ed610617458ac4fd85cb83471df2222380f28a
Author: shishir gowda <sgowda>
Date:   Mon Jul 8 18:48:55 2013 +0530

    cluster/dht: Ignore subvols with error in min-free-disk/inodes
    
    Currently when selecting a alternative subvolume when hashed
    subvol has exceeded min-free-disk/inodes, we do not check if
    layouts have errors (including decommissioning). This leads
    to data being written to those subvolumes, and in case of
    decommissioning, will lead to data loss.
    
    Change-Id: Ie0c6cf4a29d7c53d8a6d8a8c1bd595cf58a0012a
    BUG: 982919
    Signed-off-by: shishir gowda <sgowda>
    Reviewed-on: http://review.gluster.org/5299
    Tested-by: Gluster Build System <jenkins.com>
    Reviewed-by: Vijay Bellur <vbellur>

Comment 3 Anand Avati 2013-09-10 09:53:20 UTC
REVIEW: http://review.gluster.org/5888 (cluster/dht: Ignore subvols with error in min-free-disk/inodes) posted (#1) for review on release-3.4 by Amar Tumballi (amarts)

Comment 4 Anand Avati 2013-09-10 16:06:02 UTC
COMMIT: http://review.gluster.org/5888 committed in release-3.4 by Vijay Bellur (vbellur) 
------
commit 9d4ea7a870668d9af9bbd415ff9ad3aace59e170
Author: Amar Tumballi <amarts>
Date:   Tue Sep 10 15:21:45 2013 +0530

    cluster/dht: Ignore subvols with error in min-free-disk/inodes
    
    Currently when selecting a alternative subvolume when hashed
    subvol has exceeded min-free-disk/inodes, we do not check if
    layouts have errors (including decommissioning). This leads
    to data being written to those subvolumes, and in case of
    decommissioning, will lead to data loss.
    
    BUG: 982919
    
    > Original-Author: shishir gowda <sgowda>
    > Reviewed-on: http://review.gluster.org/5299
    
    Change-Id: If301a86cf3ca5fad6529bd2e61382f9901663ba0
    Signed-off-by: Amar Tumballi <amarts>
    Reviewed-on: http://review.gluster.org/5888
    Tested-by: Gluster Build System <jenkins.com>
    Reviewed-by: Vijay Bellur <vbellur>

Comment 5 Anand Avati 2013-09-17 05:50:31 UTC
REVIEW: http://review.gluster.org/5948 (cluster/distribute: Rebalance should also verify free inodes) posted (#1) for review on master by Harshavardhana (harsha)

Comment 6 Anand Avati 2013-09-17 05:56:15 UTC
REVIEW: http://review.gluster.org/5948 (cluster/distribute: Rebalance should also verify free inodes) posted (#2) for review on master by Harshavardhana (harsha)

Comment 7 Anand Avati 2013-09-17 20:21:49 UTC
REVIEW: http://review.gluster.org/5948 (cluster/distribute: Rebalance should also verify free inodes) posted (#3) for review on master by Harshavardhana (harsha)

Comment 8 Anand Avati 2013-09-17 23:38:07 UTC
COMMIT: http://review.gluster.org/5948 committed in master by Anand Avati (avati) 
------
commit 215fea41a96479312a5ab8783c13b30ab9fe00fa
Author: Harshavardhana <harsha>
Date:   Mon Sep 16 22:36:10 2013 -0700

    cluster/distribute: Rebalance should also verify free inodes
    
    Currently during `MIGRATE_DATA` we never verified about the total
    inode usage among new and old bricks. Such checks are available for
    disk space usage but it is also needed for inodes during data
    migration. Such a check leads to uniform outcome of file distribution
    upon rebalance.
    
    Patch provides:
    
    - Check dst_inodes < src_inodes, a friendly `warning` message to
      indicate we have to ignore such an attempt
    - Rename __dht_check_free_space() --> __dht_check_free_space_and_inodes()
    
    Change-Id: I7bc4dd8b507883f0fb836300e99f0bb083493f5f
    BUG: 982919
    Signed-off-by: Harshavardhana <harsha>
    Reviewed-on: http://review.gluster.org/5948
    Tested-by: Gluster Build System <jenkins.com>
    Reviewed-by: Anand Avati <avati>

Comment 9 Anand Avati 2013-09-18 02:26:07 UTC
REVIEW: http://review.gluster.org/5961 (cluster/distribute: Rebalance should provide for proper disk space distribution) posted (#1) for review on master by Harshavardhana (harsha)

Comment 10 Anand Avati 2013-09-18 06:38:31 UTC
REVIEW: http://review.gluster.org/5961 (distribute: Rebalance should provide even disk space distribution) posted (#2) for review on master by Harshavardhana (harsha)

Comment 11 Anand Avati 2013-09-19 16:26:12 UTC
COMMIT: http://review.gluster.org/5961 committed in master by Anand Avati (avati) 
------
commit 66747c96e6446da3da1c75ee7641fd75d1ed768c
Author: Harshavardhana <harsha>
Date:   Tue Sep 17 19:16:50 2013 -0700

    distribute: Rebalance should provide even disk space distribution
    
    Earlier disk space check had an issue which didn't
    provide the needed functionality to avoid migration
    when the destination had lesser available space,
    scenario we need to avoid is stated below :
    
    During rebalance `migrate-data` - Destination subvol experiences
    a `reduction` in 'blocks' of free space, at the same time source
    subvol gains certain 'blocks' of free space. A valid check is
    necessary here to avoid errorneous move to destination where
    the space could be scantily available.
    
    This patch provides a proper fix in place by subtracting
    necessary file blocks from destination and adding those blocks
    to source.
    
    Change-Id: I9c7840716a4256ef614ffc0fbfd9f2b456ac28c8
    BUG: 982919
    Signed-off-by: Harshavardhana <harsha>
    Reviewed-on: http://review.gluster.org/5961
    Tested-by: Gluster Build System <jenkins.com>
    Reviewed-by: Shishir Gowda <sgowda>
    Reviewed-by: Anand Avati <avati>

Comment 12 Anand Avati 2013-12-08 08:07:10 UTC
REVIEW: http://review.gluster.org/6460 (cluster/distribute: Rebalance should also verify free inodes) posted (#1) for review on release-3.4 by Shishir Gowda (gowda.shishir)

Comment 13 Anand Avati 2013-12-08 08:20:39 UTC
REVIEW: http://review.gluster.org/6461 (distribute: Rebalance should provide even disk space distribution) posted (#1) for review on release-3.4 by Shishir Gowda (gowda.shishir)

Comment 16 Anand Avati 2013-12-10 12:15:36 UTC
COMMIT: http://review.gluster.org/6461 committed in release-3.4 by Vijay Bellur (vbellur) 
------
commit a2826303ed16d5a347b9f5091674d09e9d766549
Author: shishir gowda <gowda.shishir>
Date:   Sun Dec 8 13:49:02 2013 +0530

    distribute: Rebalance should provide even disk space distribution
    
    Earlier disk space check had an issue which didn't
    provide the needed functionality to avoid migration
    when the destination had lesser available space,
    scenario we need to avoid is stated below :
    
    During rebalance `migrate-data` - Destination subvol experiences
    a `reduction` in 'blocks' of free space, at the same time source
    subvol gains certain 'blocks' of free space. A valid check is
    necessary here to avoid errorneous move to destination where
    the space could be scantily available.
    
    This patch provides a proper fix in place by subtracting
    necessary file blocks from destination and adding those blocks
    to source.
    
    backporting fix http://review.gluster.org/5961
    
    BUG: 982919
    Original-author: Harshavardhana <harsha>
    Signed-off-by: shishir gowda <gowda.shishir>
    
    Change-Id: If5808eaa89e66d7bcaeee7268fe3fe5b1b56f51d
    Signed-off-by: shishir gowda <gowda.shishir>
    Reviewed-on: http://review.gluster.org/6461
    Reviewed-by: Harshavardhana <harsha>
    Reviewed-by: Vijay Bellur <vbellur>
    Tested-by: Gluster Build System <jenkins.com>

Comment 17 Niels de Vos 2014-04-17 13:13:23 UTC
This bug is getting closed because a release has been made available that should address the reported issue. In case the problem is still not fixed with glusterfs-3.4.3, please reopen this bug report.

glusterfs-3.4.3 has been announced on the Gluster Developers mailinglist [1], packages for several distributions should already be or become available in the near future. Keep an eye on the Gluster Users mailinglist [2] and the update infrastructure for your distribution.

The fix for this bug likely to be included in all future GlusterFS releases i.e. release > 3.4.3. In the same line the recent release i.e. glusterfs-3.5.0 [3] likely to have the fix. You can verify this by reading the comments in this bug report and checking for comments mentioning "committed in release-3.5".

[1] http://thread.gmane.org/gmane.comp.file-systems.gluster.devel/5978
[2] http://news.gmane.org/gmane.comp.file-systems.gluster.user
[3] http://thread.gmane.org/gmane.comp.file-systems.gluster.devel/6137