Description of problem: Start the replace-brick between two-bricks say brick1 and brick2. Now I can get the proper status of the migration by specifying the wrong dest-brick (brick3). I can also commit the wrong dest-brick (brick3) and it gets reflected in the volume info and volume status. The volume was 2*2*2 dist-stripe-replicate. Version-Release number of selected component (if applicable): glusterfs-3.3.0qa34 How reproducible: Often Steps to Reproduce: 1. Create and start a 2*2*2 distributed-striped-replicated volume. 2. Create some data on the mountpoint, like untarring the linux kernel 3. Now start replace-brick between host1:brick1 and host2:brick2 4. Run replace-brick status for host1:brick1 and host2:brick3, it will succeed and will give proper status. ( I was running replace brick status between brick1 and brick3 in a while loop. It was giving me proper results) 5. Now run replace-brick commit between host1:brick1 and host2_brick3 Actual results: Even the commit will succeed and will get reflected in volume info and volume status. Also since a new brick is committed it won't have any data in it. If the same issue is present in pure distribute volume, then it would lead to data loss. Expected results: replace-brick status and commit should error our and throw a message if the dest brick is different. Additional info: I have archived all the logs.
patch sent, reviewed @ http://review.gluster.com/3184
CHANGE: http://review.gluster.com/3184 (glusterd: Fail replace-brick subcmds on bricks other src/dst.) merged in master by Vijay Bellur (vijay)
With glusterfs-3.3.0qa41, Issue is resolved. [root@QA-30 ~]# gluster v rep hosdu 172.17.251.69:/data/bricks/hosdu_brick1 172.17.251.68:/data/bricks/hosdu_brick3 start replace-brick started successfully [root@QA-30 ~]# gluster v rep hosdu 172.17.251.69:/data/bricks/hosdu_brick1 172.17.251.68:/data/bricks/hosdu_brick3 status Number of files migrated = 518 Current file= /kernel-source/linux-3.3/Documentation/block/writeback_cache_control.txt [root@QA-30 ~]# gluster v rep hosdu 172.17.251.69:/data/bricks/hosdu_brick1 172.17.251.68:/data/bricks/hosdu_brick3 status Number of files migrated = 40451 Migration complete [root@QA-30 ~]# gluster v rep hosdu 172.17.251.69:/data/bricks/hosdu_brick1 172.17.251.69:/data/bricks/hosdu_brick3 commit Incorrect source or destination brick [root@QA-30 ~]# gluster v rep hosdu 172.17.251.69:/data/bricks/hosdu_brick1 172.17.251.68:/data/bricks/hosdu_brick4 commit Incorrect source or destination brick [root@QA-30 ~]# gluster v rep hosdu 172.17.251.69:/data/bricks/hosdu_brick1 172.17.251.68:/data/bricks/hosdu_brick4 status Incorrect source or destination brick [root@QA-30 ~]# [root@QA-30 ~]# gluster v rep hosdu 172.17.251.69:/data/bricks/hosdu_brick2 172.17.251.68:/data/bricks/hosdu_brick3 status brick: 172.17.251.69:/data/bricks/hosdu_brick2 does not exist in volume: hosdu [root@QA-30 ~]# gluster v rep hosdu 172.17.251.69:/data/bricks/hosdu_brick1 172.17.251.68:/data/bricks/hosdu_brick3 status Number of files migrated = 40451 Migration complete [root@QA-30 ~]# gluster v rep hosdu 172.17.251.69:/data/bricks/hosdu_brick1 172.17.251.68:/data/bricks/hosdu_brick3 commit replace-brick commit successful [root@QA-30 ~]#