2.6. Creating Storage Cluster

2.6.1. Syntax

usage: vinfra cluster create [-h] [-f {json,table,value,yaml}] [-c COLUMN]
                             [--wait] [--timeout <seconds>]
                             [--tier-encryption {0,1,2,3}]
                             [--disk <disk>:<role>[:<key1=value1,key2=value2...>]]
                             --node <node>
                             <cluster-name>

Create a storage cluster

positional arguments:
  <cluster-name>        Storage cluster name

optional arguments:
  -h, --help            show this help message and exit
  --tier-encryption {0,1,2,3}
                        Enable encryption for storage cluster tiers.
                        Encryption is disabled by default. This option can be
                        used multiple times.
  --disk <disk>:<role>[:<key1=value1,key2=value2...>]
                        Disk configuration in the format:
                        disk: disk device ID or name;
                        role: disk role ('cs', 'mds', 'journal', 'mds-
                        journal', 'mds-system', 'cs-system', 'system');
                        Comma-separated key=value pairs with keys (optional):
                        tier: disk tier (0, 1, 2 or 3);
                        journal-tier: journal (cache) disk tier (0, 1, 2 or
                        3);
                        journal-type: journal (cache) disk type ('no_cache',
                        'inner_cache' or 'external_cache');
                        journal-disk: journal (cache) disk ID or device name;
                        journal-size: journal (cache) disk size, in bytes;
                        bind-address: bind IP address for the metadata
                        service;
                        e.g., sda:cs:tier=0,journal-type=inner_cache
                        (this option can be used multiple times).
  --node <node>         Node ID or hostname
...

2.6.2. Sample Output

This command creates a task to create the storage cluster stor1 on the node with the ID 94d58604-6f30-4339-8578-adb7903b7277. As disk roles are not explicitly specified, they are assigned automatically: mds-system to the system disk, and cs to all other disks.

# vinfra cluster create stor1 --node 94d58604-6f30-4339-8578-adb7903b7277
+---------+--------------------------------------+
| Field   | Value                                |
+---------+--------------------------------------+
| task_id | d9ca8e1d-8ac8-4459-898b-2d803efd7bc6 |
+---------+--------------------------------------+

Task outcome:

# vinfra task show d9ca8e1d-8ac8-4459-898b-2d803efd7bc6
+---------+----------------------------------------+
| Field   | Value                                  |
+---------+----------------------------------------+
| args    | - stor1                                |
|         | - 94d58604-6f30-4339-8578-adb7903b7277 |
|         | - null                                 |
|         | - null                                 |
| kwargs  | {}                                     |
| name    | backend.tasks.cluster.CreateNewCluster |
| result  | cluster_id: 1                          |
| state   | success                                |
| task_id | d9ca8e1d-8ac8-4459-898b-2d803efd7bc6   |
+---------+----------------------------------------+