In a distributed volume files are spread across the bricks in the volume. Use distributed volumes where you need to scale storage and redundancy is either not important or is provided by other hardware/software layers.
Warning
Disk/server failure in distributed volumes can result in a serious loss of data because directory contents are spread randomly across the bricks in the volume.
To create a distributed volume
- Create a trusted storage pool as described earlier in Section 7.1, “Adding Servers to Trusted Storage Pool”.
- Create the distributed volume:
# gluster volume createNEW-VOLNAME[transport tcp | rdma | tcp,rdma]NEW-BRICK...For example, to create a distributed volume with two storage servers using tcp:# gluster volume create test-volume server1:/exp1 server2:/exp2 Creation of test-volume has been successful Please start the volume to access data.
(Optional) You can display the volume information:# gluster volume info Volume Name: test-volume Type: Distribute Status: Created Number of Bricks: 2 Transport-type: tcp Bricks: Brick1: server1:/exp1 Brick2: server2:/exp2
For example, to create a distributed volume with four storage servers over InfiniBand:# gluster volume create test-volume transport rdma server1:/exp1 server2:/exp2 server3:/exp3 server4:/exp4 Creation of test-volume has been successful Please start the volume to access data.
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.
