6.8. Creating Dispersed Volumes
Dispersed volumes are based on erasure coding. Erasure coding (EC) is a method of data protection in which data is broken into fragments, expanded and encoded with redundant data pieces and stored across a set of different locations. This allows the recovery of the data stored on one or more bricks in case of failure. The number of bricks that can fail without losing data is configured by setting the redundancy count.
Dispersed volume requires less storage space when compared to a replicated volume. It is equivalent to a replicated pool of size two, but requires 1.5 TB instead of 2 TB to store 1 TB of data when the redundancy level is set to 2. In a dispersed volume, each brick stores some portions of data and parity or redundancy. The dispersed volume sustains the loss of data based on the redundancy level.
Figure 6.7. Illustration of a Dispersed Volume
The data protection offered by erasure coding can be represented in simple form by the following equation:
n = k + m. Here
nis the total number of bricks, we would require any
kbricks out of
nbricks for recovery. In other words, we can tolerate failure up to any
mbricks. With this release, the following configurations are supported:
- 6 bricks with redundancy level 2 (4 +2)
- 11 bricks with redundancy level 3 (8 +3)
- 12 bricks with redundancy level 4 (8 + 4)
gluster volume createto create different types of volumes, and
gluster volume infoto verify successful volume creation.
- Create a trusted storage pool as described in Section 5.1, “Adding Servers to the Trusted Storage Pool”.
- Understand how to start and stop volumes, as described in Section 6.10, “Starting Volumes”.
Red Hat recommends you to review the Dispersed Volume configuration recommendations explained in Section 6.8, “Creating Dispersed Volumes” before creating the Dispersed volume.
To Create a dispersed volume
- Run the
gluster volume createcommand to create the dispersed volume.The syntax is
# gluster volume create NEW-VOLNAME [disperse-data COUNT] [redundancy COUNT] [transport tcp | rdma | tcp,rdma] NEW-BRICK...The number of bricks required to create a disperse volume is the sum of
countoption specifies the number of bricks that is part of the dispersed volume, excluding the count of the redundant bricks. For example, if the total number of bricks is 6 and
redundancy-countis specified as 2, then the disperse-data count is 4 (6 - 2 = 4). If the
disperse-data countoption is not specified, and only the
redundancy countoption is specified, then the
disperse-data countis computed automatically by deducting the redundancy count from the specified total number of bricks.Redundancy determines how many bricks can be lost without interrupting the operation of the volume. If
redundancy countis not specified, based on the configuration it is computed automatically to the optimal value and a warning message is displayed.The default value for transport is
tcp. Other options can be passed such as
auth.reject. See Section 6.3, “About Encrypted Disk” for a full list of parameters.
Example 6.8. Dispersed Volume with Six Storage Servers
# gluster volume create test-volume disperse-data 4 redundancy 2 transport tcp server1:/exp1/brick server2:/exp2/brick server3:/exp3/brick server4:/exp4/brick server5:/exp5/brick server6:/exp6/brick Creation of test-volume has been successful Please start the volume to access data.
# gluster volume start VOLNAMEto start the volume.
# gluster volume start test-volume Starting test-volume has been successful
gluster volume infocommand to optionally display the volume information.