Bug 834729 - gluster volume remove-brick defaults to force commit, and causes data loss
Summary: gluster volume remove-brick defaults to force commit, and causes data loss
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: GlusterFS
Classification: Community
Component: cli
Version: 3.3.0
Hardware: x86_64
OS: Linux
low
low
Target Milestone: ---
Assignee: Kaushal
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks: 1046284 1077682
TreeView+ depends on / blocked
 
Reported: 2012-06-22 23:25 UTC by optix2002
Modified: 2014-03-18 12:16 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
: 1046284 (view as bug list)
Environment:
Last Closed: 2012-07-11 05:18:33 UTC
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Embargoed:


Attachments (Terms of Use)

Description optix2002 2012-06-22 23:25:52 UTC
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 15:54:01 UTC
Hi,

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 05:18:33 UTC
as explained in comment #1


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