Bug 1471366 - Posix xlator needs to reserve disk space to prevent the brick from getting full.
Posix xlator needs to reserve disk space to prevent the brick from getting full.
Status: POST
Product: GlusterFS
Classification: Community
Component: posix (Show other bugs)
mainline
Unspecified Unspecified
medium Severity medium
: ---
: ---
Assigned To: Mohit Agrawal
: ZStream
Depends On: 1464350
Blocks: 1173519 1286092 1398595
  Show dependency treegraph
 
Reported: 2017-07-15 07:34 EDT by Mohit Agrawal
Modified: 2017-07-28 03:42 EDT (History)
5 users (show)

See Also:
Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: 1464350
Environment:
Last Closed:
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Mohit Agrawal 2017-07-15 07:34:32 EDT
+++ This bug was initially created as a clone of Bug #1464350 +++

Description of problem:

Once a brick becomes completely (100%) full, the gluster filesystem becomes inconsistent as xattr operations fail and recovery is very difficult.

A rebalance cannot be used to migrate data off the full brick as xattr operations will fail.

DHT uses a min-free-disk option to try to keep some reserve space on all bricks. However, this approach is not fool proof and should ideally be handled by the posix xlator. 

Version-Release number of selected component (if applicable):


How reproducible:


Steps to Reproduce:
1.
2.
3.

Actual results:


Expected results:


Additional info:

--- Additional comment from Red Hat Bugzilla Rules Engine on 2017-06-23 03:48:47 EDT ---

This bug is automatically being proposed for the current release of Red Hat Gluster Storage 3 under active development, by setting the release flag 'rhgs‑3.3.0' to '?'. 

If this bug should be proposed for a different release, please manually change the proposed release flag.

--- Additional comment from Red Hat Bugzilla Rules Engine on 2017-06-28 05:09:20 EDT ---

This BZ having been considered, and subsequently not approved to be fixed at the RHGS 3.3.0 release, is being proposed for the next minor release of RHGS
Comment 1 Worker Ant 2017-07-15 08:35:16 EDT
REVIEW: https://review.gluster.org/17780 (posix: Needs to reserve disk space to prevent the brick from getting full) posted (#1) for review on master by MOHIT AGRAWAL (moagrawa@redhat.com)
Comment 2 Worker Ant 2017-07-15 22:50:02 EDT
REVIEW: https://review.gluster.org/17780 (posix: Needs to reserve disk space to prevent the brick from getting full) posted (#2) for review on master by MOHIT AGRAWAL (moagrawa@redhat.com)
Comment 3 Worker Ant 2017-07-16 04:01:42 EDT
REVIEW: https://review.gluster.org/17780 (posix: Needs to reserve disk space to prevent the brick from getting full) posted (#3) for review on master by MOHIT AGRAWAL (moagrawa@redhat.com)
Comment 4 Worker Ant 2017-07-22 08:52:50 EDT
REVIEW: https://review.gluster.org/17780 (posix: Needs to reserve disk space to prevent the brick from getting full) posted (#4) for review on master by MOHIT AGRAWAL (moagrawa@redhat.com)
Comment 5 Worker Ant 2017-07-22 08:56:27 EDT
REVIEW: https://review.gluster.org/17780 (posix: Needs to reserve disk space to prevent the brick from getting full) posted (#5) for review on master by MOHIT AGRAWAL (moagrawa@redhat.com)
Comment 6 Worker Ant 2017-07-22 09:54:47 EDT
REVIEW: https://review.gluster.org/17780 (posix: Needs to reserve disk space to prevent the brick from getting full) posted (#6) for review on master by MOHIT AGRAWAL (moagrawa@redhat.com)
Comment 7 Worker Ant 2017-07-24 00:59:55 EDT
REVIEW: https://review.gluster.org/17780 (posix: Needs to reserve disk space to prevent the brick from getting full) posted (#7) for review on master by MOHIT AGRAWAL (moagrawa@redhat.com)
Comment 8 Worker Ant 2017-07-25 00:15:13 EDT
REVIEW: https://review.gluster.org/17780 (posix: Needs to reserve disk space to prevent the brick from getting full) posted (#8) for review on master by MOHIT AGRAWAL (moagrawa@redhat.com)
Comment 9 Worker Ant 2017-07-25 01:32:49 EDT
REVIEW: https://review.gluster.org/17780 (posix: Needs to reserve disk space to prevent the brick from getting full) posted (#9) for review on master by MOHIT AGRAWAL (moagrawa@redhat.com)
Comment 10 Worker Ant 2017-07-25 11:36:59 EDT
COMMIT: https://review.gluster.org/17780 committed in master by Jeff Darcy (jeff@pl.atyp.us) 
------
commit eb266ade1e2da5739ed66495755ec2784a5bf74b
Author: Mohit Agrawal <moagrawa@redhat.com>
Date:   Sat Jul 15 17:55:14 2017 +0530

    posix: Needs to reserve disk space to prevent the brick from getting full
    
    Problem: Currently there is no option available at posix xlator to save the
             disk from getting full
    
    Solution: Introduce a new option storage.reserve at posix xlator to
              configure disk threshold.posix xlator spawn a thread to update the
              disk space status in posix private structure and same flag is checked
              by every posix fop before start operation.If flag value is 1 then
              it sets op_errno to ENOSPC and goto out from the fop.
    
    BUG: 1471366
    Change-Id: I98287cd409860f4c754fc69a332e0521bfb1b67e
    Signed-off-by: Mohit Agrawal <moagrawa@redhat.com>
    Reviewed-on: https://review.gluster.org/17780
    Smoke: Gluster Build System <jenkins@build.gluster.org>
    CentOS-regression: Gluster Build System <jenkins@build.gluster.org>
    Reviewed-by: Amar Tumballi <amarts@redhat.com>
    Reviewed-by: Jeff Darcy <jeff@pl.atyp.us>

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