Create Data Volume
This section explains how to create a new data volume in an Exasol database.
Database data in Exasol is stored on data volumes, which are assigned to storage disks. For more information about the different volume types in Exasol, see Volumes Overview. For more information about storage disks, see Storage Requirements.
This procedure is carried out using ConfD.
Prerequisites
There are no prerequisites for this procedure.
Procedure
The following examples use the command-line tool confd_client in a Linux terminal connected to a database node. For more information about how to use this tool, see ConfD.
Create a data volume
To create a data volume, use the ConfD job st_volume_create. Set the following parameters:
Parameter Name | Data Type | Description |
---|---|---|
name
|
string | Name of the new volume |
disk
|
string | Name of the disk to be used for the volume. |
type
|
string | data
|
size
|
string | Volume size with unit in string format. Example: 1 GiB. |
num_master_nodes
|
integer | Number of master nodes in the new volume. |
nodes
|
list | List of node IDs (integers) |
redundancy
|
integer | redundancy level |
owner
|
tuple, list | Owner ID and owner group ID in list or tuple. |
Master Nodes
The parameter num_master_nodes
defines the number of master nodes that the volume will use. The number of master nodes must match the number of active nodes in the cluster. For example: in a cluster that will have 4 active nodes and 1 reserve node (4+1), the number of master nodes is 4.
In the following example, we create a 1 TiB data volume with the name DataVolume1 on the storage disk disk1 with 4 master nodes and redundancy 2. The command returns the volume ID for the new volume (vid: 2
).
confd_client -c st_volume_create -a '{"name": "DataVolume1", "disk": "disk1", "type": "data", "size": "1 TiB", "num_master_nodes": 4, "nodes": [11, 12, 13, 14], "redundancy": 2, "owner": [500,500]}'
vid: 2
The ConfD job st_volume_create does not necessarily use the specified size
but does internal rounding. To check the actual size of the volume after creation to see if it is acceptable, use the ConfD job st_volume_info. If the rounding takes up too much space, contact Support.
Enable optimizations
To enable optimizations for the volume, use the ConfD job st_volume_add_label
Verification
To verify the properties of the new data volume, use the ConfD job st_volume_info with the volume ID. For example: