Assume I have 4 bricks in a replica (count=2) volume: Volume Name: data-vol Number of Bricks: 2 x 2 = 4 Brick1: 192.168.1.101/brick Brick2: 192.168.1.102/brick Brick3: 192.168.1.103/brick Brick4: 192.168.1.104/brick Something happens to Brick3 and I want to replace it by 192.168.1.105/brick What command should I use to replace 192.168.1.103/brick by 192.168.1.105/brick? Can I use: gluster volume replace-brick data-vol 192.168.1.103/brick 192.168.1.105/brick commit force? Or I have to start _replace-brick_ first then commit it? Thanks, -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://www.gluster.org/pipermail/gluster-users/attachments/20150226/e1ed1f8d/attachment.html>
On 02/27/2015 07:10 AM, Cary Tsai wrote:> > Assume I have 4 bricks in a replica (count=2) volume: > > Volume Name: data-vol > > Number of Bricks: 2 x 2 = 4 > > Brick1: 192.168.1.101/brick <http://192.168.1.101/brick> > > Brick2: 192.168.1.102/brick <http://192.168.1.102/brick> > > Brick3: 192.168.1.103/brick <http://192.168.1.103/brick> > > Brick4: 192.168.1.104/brick <http://192.168.1.104/brick> > > Something happens to Brick3 and I want to replace it by > 192.168.1.105/brick <http://192.168.1.105/brick> > > What command should I use to replace 192.168.1.103/brick > <http://192.168.1.103/brick> by 192.168.1.105/brick > <http://192.168.1.105/brick>? > > Can I use: > > gluster volume replace-brick data-vol 192.168.1.103/brick > <http://192.168.1.103/brick> 192.168.1.105/brick > <http://192.168.1.105/brick> commit force? >This is the correct choice. Since you have replaced a replica brick, you will have to follow up with 'gluster vol heal data-vol full` to restore data from 104/brick to 105/brick.> Or I have to start _replace-brick_ first then commit it? > > Thanks, > > > > _______________________________________________ > Gluster-users mailing list > Gluster-users at gluster.org > http://www.gluster.org/mailman/listinfo/gluster-users-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://www.gluster.org/pipermail/gluster-users/attachments/20150227/cf511788/attachment.html>
Atin Mukherjee
2015-Mar-01 15:24 UTC
[Gluster-users] [Gluster-devel] How do I replace a failed brick
On 02/27/2015 07:10 AM, Cary Tsai wrote:> Assume I have 4 bricks in a replica (count=2) volume: > > Volume Name: data-vol > > Number of Bricks: 2 x 2 = 4 > > Brick1: 192.168.1.101/brick > > Brick2: 192.168.1.102/brick > > Brick3: 192.168.1.103/brick > > Brick4: 192.168.1.104/brick > > Something happens to Brick3 and I want to replace it by 192.168.1.105/brick > > What command should I use to replace 192.168.1.103/brick by > 192.168.1.105/brick? > > Can I use: > > gluster volume replace-brick data-vol 192.168.1.103/brick > 192.168.1.105/brick commit force?With recent releases all replace brick commands except commit force are been deprecated, hence I would suggest to use this one. However you would need to ensure the data movement explicitly. ~Atin> > Or I have to start _replace-brick_ first then commit it? > > Thanks, > > > > _______________________________________________ > Gluster-devel mailing list > Gluster-devel at gluster.org > http://www.gluster.org/mailman/listinfo/gluster-devel >-- ~Atin