Bug 773301

Summary: Adding brick to Replicate volume change type volume to Distributed-Replicate
Product: [Community] GlusterFS Reporter: Aleš Koval <als>
Component: glusterdAssignee: krishnan parthasarathi <kparthas>
Status: CLOSED UPSTREAM QA Contact:
Severity: medium Docs Contact:
Priority: high    
Version: 3.2.5CC: amarts, glusterbugs, gluster-bugs, nsathyan
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-01-25 00:42:08 EST Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Description Aleš Koval 2012-01-11 08:17:50 EST
Description of problem:
Summary says all.

How reproducible:
always

Steps to Reproduce:
1. gluster volume create test replica 2 transport tcp server:/test1 server:/test2
2. gluster volume add-brick test server:/test3 server:/test4
3. gluster volume info test
  
Actual results:

Volume Name: test
Type: Distributed-Replicate
Status: Created
Number of Bricks: 2 x 2 = 4
Transport-type: tcp
Bricks:
Brick1: server:/test1
Brick2: server:/test2
Brick3: server:/test3
Brick4: server:/test4


Expected results:

Volume Name: test
Type: Replicate
Status: Created
Number of Bricks: 4
Transport-type: tcp
Bricks:
Brick1: server:/test1
Brick2: server:/test2
Brick3: server:/test3
Brick4: server:/test4


Additional info:

In documentation at http://download.gluster.com/pub/gluster/glusterfs/3.2/Documentation/AG/html/sect-Administration_Guide-Managing_Volumes-Expanding.html is nothing about changing volume type when adding brick. Also adding one brick to replicate volume as is described in documentation is not possible:

gluster volume add-brick test server:/test3
Incorrect number of bricks supplied 1 for type REPLICATE with count 2
Comment 1 Louis Zuckerman 2012-01-11 08:51:46 EST
This is the correct & expected behavior.  The add-brick command adds distribute subvolumes.  If anything is wrong here, imho, it's the documentation.
Comment 2 Aleš Koval 2012-01-11 09:00:23 EST
I expected this :) So there is no option for expand replicate volume without change it to distributed-replicate. I think this need to be written clearly in documentation.
Comment 3 Amar Tumballi 2012-01-12 01:12:17 EST
This feature is already present in master branch of glusterfs, ie, it will be present in next major release (3.3.0). Feel free to do a git clone and test the feature (or even test one of our 'qa' releases).
Comment 4 Aleš Koval 2012-01-12 01:40:29 EST
Thanks. I confirm version 3.3.0qa19 works well.

# gluster volume create test replica 2 transport tcp server:/test1 server:/test2

# gluster volume info test
 
Volume Name: test5
Type: Replicate
Status: Created
Number of Bricks: 1 x 2 = 2
Transport-type: tcp
Bricks:
Brick1: server:/test1
Brick2: server:/test2

# gluster volume add-brick test replica 3 server:/test3

# gluster volume info test

Volume Name: test
Type: Replicate
Status: Created
Number of Bricks: 1 x 3 = 3
Transport-type: tcp
Bricks:
Brick1: server:/test1
Brick2: server:/test2
Brick3: server:/test3