Hi, I'm new to Gluster so a very basic question. Are all volumes distributed by default? Is there a switch to turn this feature on/off? I ask this because in an intro to Gluster I saw "Replicated Volume" and "Distributed Replicated Volume". Is the first type, "Replicated Volume", not distributed? Many thanks, Dave -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.gluster.org/pipermail/gluster-users/attachments/20170208/69f6b3a9/attachment.html>
Distributed is the default, and replicated distributes as long as there are at least twice the number of bricks as your replication level. For example... gluster volume create gv0 server1:/data/brick1/gv0 server2:/data/brick1/gv0 server3:/data/brick1/gv0 ...distributes files across all three servers/bricks. gluster volume create gv0 replica 3 server1:/data/brick1/gv0 server2:/data/brick1/gv0 server3:/data/brick1/gv0 ...creates a volume across the servers/bricks with 3 replicas. As there are only 3 servers/bricks, there is nothing to distribute to. gluster volume create gv0 replica 2 server1:/data/brick1/gv0 server2:/data/brick1/gv0 server3:/data/brick1/gv0 server4:/data/brick1/gv0 ...distributes files across server1 & server2, & replicates server1 to server3 & server2 to server4. (This is purely an example though, as this particular config would then be vulnerable to split-brain). D On 8 February 2017 at 06:12, Dave Fan <dave.fan at shudun.com> wrote:> Hi, > > I'm new to Gluster so a very basic question. Are all volumes distributed > by default? Is there a switch to turn this feature on/off? > > I ask this because in an intro to Gluster I saw "Replicated Volume" and > "Distributed Replicated Volume". Is the first type, "Replicated Volume", > not distributed? > > Many thanks, > Dave > > _______________________________________________ > Gluster-users mailing list > Gluster-users at gluster.org > http://lists.gluster.org/mailman/listinfo/gluster-users >-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.gluster.org/pipermail/gluster-users/attachments/20170208/66b6cba5/attachment.html>
Hi, New to Gluster too. I welcome the more experienced users to correct me if I'm wrong. Based on some quick tests in my environment, it works like this: a) The following creates a replicated (replica count = 2), non-distributed volume gluster volume create replicated_but_not_distributed replica 2 host1:/GlusterFS/replicated_but_not_distributed host2:/GlusterFS/replicated_but_not_distributed [user at whatever]# gluster volume info replicated_but_not_distributed Volume Name: replicated_but_not_distributed Type: Replicate Volume ID: blah-bal-blah-blah-blah Status: Started Snapshot Count: 0 Number of Bricks: 1 x 2 = 2 Transport-type: tcp Bricks: Brick1: host1:/GlusterFS/replicated_but_not_distributed Brick2: host2:/GlusterFS/replicated_but_not_distributed Options Reconfigured: nfs.disable: on performance.readdir-ahead: on transport.address-family: inet b) The following creates a distributed, non-replicated volume. Note that I omitted the "replica" directive: gluster volume create distributed_but_not_replicated host1:/GlusterFS/distributed_but_not_replicated host2:/GlusterFS/distributed_but_not_replicated [user at whatever]# gluster volume info distributed_but_not_replicated Volume Name: distributed_but_not_replicated Type: Distribute Volume ID: blah-bal-blah-blah-blah Status: Started Snapshot Count: 0 Number of Bricks: 2 Transport-type: tcp Bricks: Brick1: host1:/GlusterFS/distributed_but_not_replicated Brick2: host2:/GlusterFS/distributed_but_not_replicated Options Reconfigured: transport.address-family: inet performance.readdir-ahead: on nfs.disable: on c) The following creates a replicated AND distributed volume as shown here (https://access.redhat.com/documentation/en-US/Red_Hat_Storage/2.1/html/Administration_Guide/sect-User_Guide-Setting_Volumes-Distributed_Replicated.html): gluster volume create replicated_and_distributed replica 2 host1:/GlusterFS/replicated_and_distributed host2:/GlusterFS/replicated_and_distributed host3:/GlusterFS/replicated_and_distributed host4:/GlusterFS/replicated_and_distributed I don't have 2 other nodes online at this moment to paste the output of "gluster volume info" for this one. I hope this helps. On 2/8/2017 4:12 AM, Dave Fan wrote:> Hi, > > I'm new to Gluster so a very basic question. Are all volumes distributed > by default? Is there a switch to turn this feature on/off? > > I ask this because in an intro to Gluster I saw "Replicated Volume" and > "Distributed Replicated Volume". Is the first type, "Replicated Volume", > not distributed? > > Many thanks, > Dave > > > _______________________________________________ > Gluster-users mailing list > Gluster-users at gluster.org > http://lists.gluster.org/mailman/listinfo/gluster-users >-------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 473 bytes Desc: OpenPGP digital signature URL: <http://lists.gluster.org/pipermail/gluster-users/attachments/20170208/24ca3b3c/attachment.sig>