Joe Julian
2016-Nov-09 00:23 UTC
[Gluster-users] Automation of single server addition to replica
Replicas are defined in the order bricks are listed in the volume create command. So gluster volume create myvol replica 2 server1:/data/brick1 server2:/data/brick1 server3:/data/brick1 server4:/data/brick1 will replicate between server1 and server2 and replicate between server3 and server4. See also https://joejulian.name/blog/how-to-expand-glusterfs-replicated-clusters-by-one-server/ On 11/08/2016 03:28 PM, Lopez, Dan-Joe wrote:> > Hello All, > > I?d like to automate a gluster replica cluster in a > way that allows me to later add single servers on the fly. I can?t > seem to understand from the docs how I might achieve this. It seems > logical that a replica cluster needs to have at least 2 servers > initially, but thereafter, I see no reason that I shouldn?t be able to > add a single server to the cluster. From what I have read, it seems > that the number of servers I add in the future needs to match the > number of servers that I started with. > > e.g. replica 1 doesn?t really make sense, and isn?t allowed, but if I > start with replica n; I must always add n servers at a time to the > volume, I can?t just add one server to have an n+1 replica? > > If anyone could point me in the right direction here, I?d really > appreciate it. > > Dan-Joe Lopez > > > > _______________________________________________ > 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/20161108/507a1010/attachment.html>
Gandalf Corvotempesta
2016-Nov-09 06:53 UTC
[Gluster-users] Automation of single server addition to replica
Il 09 nov 2016 1:23 AM, "Joe Julian" <joe at julianfamily.org> ha scritto:> > Replicas are defined in the order bricks are listed in the volume createcommand. So gluster volume create myvol replica 2 server1:/data/brick1 server2:/data/brick1 server3:/data/brick1 server4:/data/brick1 will replicate between server1 and server2 and replicate between server3 and server4.> > See alsohttps://joejulian.name/blog/how-to-expand-glusterfs-replicated-clusters-by-one-server/>i really hope this could be automated in newer gluster versions There is almost no sense to make a replica on the same server so gluster should automatically move bricks to preserve data consistency when adding servers. Ceph does this by moving objects around and you don't have to add servers in a multiple of replica the rebalance command could be used to rebalance newly added bricks by preserving replicas in a proper state -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://www.gluster.org/pipermail/gluster-users/attachments/20161109/0f2198c1/attachment.html>