Bug 834729 - gluster volume remove-brick defaults to force commit, and causes data loss
gluster volume remove-brick defaults to force commit, and causes data loss
Product: GlusterFS
Classification: Community
Component: cli (Show other bugs)
x86_64 Linux
low Severity low
: ---
: ---
Assigned To: Kaushal
Depends On:
Blocks: 1046284 1077682
  Show dependency treegraph
Reported: 2012-06-22 19:25 EDT by optix2002
Modified: 2014-03-18 08:16 EDT (History)
4 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 1046284 (view as bug list)
Last Closed: 2012-07-11 01:18:33 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description optix2002 2012-06-22 19:25:52 EDT
Description of problem:
Running "gluster volume remove-brick $volume $brick" without any arguments runs force commit, which causes loss of data (though it warns you). You are not told that the default is force commit. Defaulting to start, or not defaulting at all may be more user friendly.

Version-Release number of selected component (if applicable):
glusterfs 3.3.0 built on May 31 2012 11:16:29

How reproducible:

Steps to Reproduce:
1.Have a started redistribute gluster volume with at least 2 bricks and several files.
2.Remove gluster volume without specifying any options: "gluster volume remove-brick $volume $brick".
3.ls the gluster volume, there are less files than you began with.
Actual results:
Gluster runs "volume remove-brick $volume $brick force". Data is lost.

Expected results:
Either print the usage, or default to start instead of force.

Additional info:
Comment 1 Amar Tumballi 2012-06-23 11:54:01 EDT

Actually the behavior is because of backward compatibility with 3.1.x and 3.2.x versions. In those versions there was no 'start' option, and hence it used to remove bricks. We kept the same behavior with 3.3.0 too. That is the reason why you get the question when you just do remove-brick without options, asking if its ok to continue because there can be data loss.

This is not a bug, but the intended behavior considering the backward compatibility.
Comment 2 Amar Tumballi 2012-07-11 01:18:33 EDT
as explained in comment #1

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