8.5. Creating Distributed Replicated Volumes

Important

Creating distributed-replicated volume with rep_count > 2 is under technology preview. Technology Preview features are not fully supported under Red Hat subscription level agreements (SLAs), may not be functionally complete, and are not intended for production use. However, these features provide early access to upcoming product innovations, enabling customers to test functionality and provide feedback during the development process. As Red Hat considers making future iterations of Technology Preview features generally available, we will provide commercially reasonable efforts to resolve any reported issues that customers experience when using these features.
Distributes files across replicated bricks in the volume. You can use distributed replicated volumes in environments where the requirement is to scale storage and high-reliability is critical. Distributed replicated volumes also offer improved read performance in most environments.

Note

The number of bricks should be a multiple of the replica count for a distributed replicated volume. Also, the order in which bricks are specified has a great effect on data protection. Each replica_count consecutive bricks in the list you give will form a replica set, with all replica sets combined into a distribute set. To make sure that replica-set members are not placed on the same node, list the first brick on every server, then the second brick on every server in the same order, and so on.
Illustration of a Distributed Replicated Volume

Figure 8.3. Illustration of a Distributed Replicated Volume


To create a distributed replicated volume
  1. Create a trusted storage pool as described earlier in Section 7.1, “Adding Servers to Trusted Storage Pool”.
  2. Create the distributed replicated volume:
    # gluster volume create NEW-VOLNAME [replica COUNT] [transport tcp | rdma | tcp,rdma] NEW-BRICK...
    For example, four node distributed (replicated) volume with a two-way mirror:
    # gluster volume create test-volume replica 2 transport tcp server1:/exp1 server2:/exp2 server3:/exp3 server4:/exp4
    Creation of test-volume has been successful
    Please start the volume to access data.
    For example, to create a six node distributed (replicated) volume with a two-way mirror:
    # gluster volume create test-volume replica 2 transport tcp server1:/exp1 server2:/exp2 server3:/exp3 server4:/exp4 server5:/exp5 server6:/exp6
    Creation of test-volume has been successful
    Please start the volume to access data.
    The order in which the bricks are specified determines the mirroring of bricks with each other. For example, first n bricks, where n is the replica count. Hence, the first two bricks specified will mirror each other, and the third and fourth bricks will mirror each other.
    If the transport type is not specified, tcp is used as the default. You can also set additional options if required, such as auth.allow or auth.reject. For more information, see Section 10.1, “Tuning Volume Options”

    Note

    Make sure you start your volumes before you try to mount them or else client operations after the mount will hang, see Section 8.10, “Starting Volumes ” for details.