A datastore is a collection of volumes. All volumes in a datastore have the same storage policy, such as replication factor and thin provisioning.
Procedure
Run the following command on any node in the cluster to view information about all datastores in the cluster:
zbs-meta pool list
Output example
ID Name Storage Pool Creation Time Resiliency Type Encrypt Method Replica# EC Param Thin Export Description Whitelist Is Prioritized
------------------------------------ ------------------------------------------------------------------ -------------- ----------------------------- ----------------- ------------------ ---------- ---------- ------ -------- ------------------ ----------------------------------- ----------------
b248894b-32ab-4ec5-8239-69cdaecdba46 zbs-iscsi-datastore-bacd3e5a-596d-41b3-aa6b-ad8c879db00b system 2024-12-17 11:44:07.665726649 RT_REPLICA ENCRYPT_PLAIN_TEXT 2 True False 10.17.92.13,10.17.92.12,10.17.92.11 False
cd8e5073-4c33-4022-bc6a-3717054fa30c default system 2024-12-16 16:28:08.277991975 RT_REPLICA ENCRYPT_PLAIN_TEXT 2 True False */* False
d268f50a-77f9-42fc-9b3a-b228d6b1c3ed encrypt_pool system 2024-12-30 14:57:58.159887452 RT_REPLICA ENCRYPT_AES256_CTR 2 True False */* FalseOutput note
| Parameter | Description |
|---|---|
Name | The datastore name. |
Storage Pool | The storage pool to which the datastore belongs. |
Resiliency Type | The datastore resiliency type. |
Replica# | The datastore replication factor. |
Encrypt Method | The datastore encryption method. |
EC Param | The EC parameters for the datastore in EC resiliency type. |
Thin | Whether the datastore is thin-provisioned. |
Export | Whether the datastore is an NFS Export. |
Whitelist | The datastore allowlist. |
Is Prioritized | Whether to use volume pinning. |
Procedure
Run the following command on any node in the cluster to view detailed information about a specific datastore:
View by datastore name:
zbs-meta pool show <pool_name>
View by pool ID:
zbs-meta pool show_by_id <pool_id>
Output example
--------------- ------------------------------------
ID 3fec5d68-0e2d-4ca8-9022-fd6b5a88617f
Name default
Storage Pool system
Creation Time 2024-06-17 14:06:08.359138865
Resiliency Type RT_REPLICA
Encrypt Method ENCRYPT_PLAIN_TEXT
Replica# 2
EC Param
Thin True
Export False
Description
Whitelist */*
Is Prioritized False
--------------- ------------------------------------Output note
| Parameter | Description |
|---|---|
Name | The datastore name. |
Storage Pool | The storage pool to which the datastore belongs. |
Resiliency Type | The datastore resiliency type. |
Replica# | The datastore replication factor. |
Encrypt Method | The datastore encryption method. |
EC Param | The EC parameters for the datastore in EC resiliency type. |
Thin | Whether the datastore is thin-provisioned. |
Export | Whether the datastore is an NFS Export. |
Whitelist | The datastore allowlist. |
Is Prioritized | Whether to use volume pinning. |
Procedure
Run the following command on any node in the cluster to create a datastore with the specified name:
zbs-meta pool create <pool_name> [--resiliency_type <RESILIENCY_TYPE>]
[--replica_num <REPLICA_NUM>] [--ec_algo <EC_ALGO>]
[--encrypt_method <ENCRYPT_METHOD>]
[--ec_k <EC_K>] [--ec_m <EC_M>]
[--thin_provision <THIN_PROVISION>] [--desc <DESC>]
[--storage_pool_id <STORAGE_POOL_ID>]
[--whitelist <WHITELIST>] [--iops <IOPS>]
[--iops_rd <IOPS_RD>] [--iops_wr <IOPS_WR>]
[--iops_max <IOPS_MAX>]
[--iops_rd_max <IOPS_RD_MAX>]
[--iops_wr_max <IOPS_WR_MAX>]
[--iops_max_length <IOPS_MAX_LENGTH>]
[--iops_rd_max_length <IOPS_RD_MAX_LENGTH>]
[--iops_wr_max_length <IOPS_WR_MAX_LENGTH>]
[--iops_io_size <IOPS_IO_SIZE>] [--bps <BPS>]
[--bps_rd <BPS_RD>] [--bps_wr <BPS_WR>]
[--bps_max <BPS_MAX>] [--bps_rd_max <BPS_RD_MAX>]
[--bps_wr_max <BPS_WR_MAX>]
[--bps_max_length <BPS_MAX_LENGTH>]
[--bps_rd_max_length <BPS_RD_MAX_LENGTH>]
[--bps_wr_max_length <BPS_WR_MAX_LENGTH>]
[--prioritized <PRIORITIZED>]| Parameter | Description |
|---|---|
pool_name | The datastore name. |
--resiliency_type <RESILIENCY_TYPE> | Specifies the redundancy mode, either REPLICA (replication) or EC (erasure coding). Default: None. |
--replica_num <REPLICA_NUM> | Specifies the default replication factor for new volumes in the datastore. Valid values: 2 or 3. |
--ec_algo <EC_ALGO> | Specifies the EC algorithm. Required when the redundancy mode is EC. Default: RS. |
--encrypt_method <ENCRYPT_METHOD> | Specifies the data encryption method. The default is no encryption. |
--ec_k <EC_K> | Specifies EC parameter K, valid range [2, 23]. Required when the redundancy mode is EC. Default: None. |
--ec_m <EC_M> | Specifies EC parameter M, valid range [1, 4]. Required when the redundancy mode is EC. Default: None. |
--thin_provision <THIN_PROVISION> | Whether new volumes in the datastore are thin-provisioned. Valid values: True or False. |
--desc <DESC> | Specifies the datastore description. |
--storage_pool_id <STORAGE_POOL_ID> | Specifies the storage pool ID for creating the datastore. |
--whitelist <WHITELIST> | The IP access allowlist. |
--iops <IOPS> | Specifies the total IOPS limit for new volumes in the datastore. |
--iops_rd <IOPS_RD> | Specifies the read IOPS limit. |
--iops_wr <IOPS_WR> | Specifies the write IOPS limit. |
--iops_max <IOPS_MAX> | Specifies the total IOPS burst upper limit. |
--iops_rd_max <IOPS_RD_MAX> | Specifies the read IOPS burst upper limit. |
--iops_wr_max <IOPS_WR_MAX> | Specifies the write IOPS burst upper limit. |
--iops_max_length <IOPS_MAX_LENGTH> | Specifies the duration for total IOPS burst upper limit. The unit: seconds. |
--iops_rd_max_length <IOPS_RD_MAX_LENGTH> | Specifies the duration for read IOPS burst upper limit. The unit: seconds. |
--iops_wr_max_length <IOPS_WR_MAX_LENGTH> | Specifies the duration for write IOPS burst upper limit. The unit: seconds. |
--iops_io_size <IOPS_IO_SIZE> | The assumed average I/O data size when using IOPS throttling. |
--bps <BPS> | Specifies the total bandwidth limit for new volumes in the datastore. The unit: bps. |
--bps_rd <BPS_RD> | Specifies the read bandwidth limit. |
--bps_wr <BPS_WR> | Specifies the write bandwidth limit. |
--bps_max <BPS_MAX> | Specifies the total bandwidth upper limit during I/O bursts. |
--bps_rd_max <BPS_RD_MAX> | Specifies the read bandwidth upper limit during I/O bursts. |
--bps_wr_max <BPS_WR_MAX> | Specifies the write bandwidth upper limit during I/O bursts. |
--bps_max_length <BPS_MAX_LENGTH> | Specifies the maximum duration for I/O at the total bandwidth during I/O bursts. The unit: seconds. |
--bps_rd_max_length <BPS_RD_MAX_LENGTH> | Specifies the maximum duration for I/O at the read bandwidth during I/O bursts. The unit: seconds. |
--bps_wr_max_length <BPS_WR_MAX_LENGTH> | Specifies the maximum duration for I/O at the write bandwidth during I/O bursts. The unit: seconds. |
--prioritized <PRIORITIZED> | Whether to enable volume pinning by default when creating volumes in the datastore. Valid values: True or False. |
Output example
--------------- ------------------------------------
ID 559a383d-e24f-4ba3-b685-bb417174b612
Name pool4
Storage Pool system
Creation Time 2024-06-18 14:19:25.455244549
Resiliency Type RT_REPLICA
Encrypt Method ENCRYPT_PLAIN_TEXT
Replica# 2
EC Param
Thin True
Export False
Description
Whitelist */*
Is Prioritized False
--------------- ------------------------------------Procedure
Run the following command on any node in the cluster to update the datastore name, replication factor, provisioning mode, and IP allowlist. Updating a datastore does not affect existing volumes.
zbs-meta pool update [--new_pool_name <NEW_POOL_NAME>] [--replica_num <REPLICA_NUM>] [--thin_provision {true|false}] [--desc <DESC>] [--whitelist <WHITELIST>] [--encrypt_method <ENCRYPT_METHOD>] <pool_name>
| Parameter | Description |
|---|---|
--new_pool_name |
Optional. Updates the datastore name. |
--replica_num |
Optional. Updates the default replication factor for volumes in the datastore. It does not affect volumes that have already been created. |
--thin_provision {true|false} |
Optional. Updates the default provisioning mode for volumes in the datastore. true or false indicates whether they are thin-provisioned. |
--desc |
Optional. Updates the detailed description of the datastore. |
--whitelist |
Optional. The IP access allowlist. |
--encrypt_method |
Optional. Updates the data encryption method. |
pool_name |
Required. The original datastore name. |
Output note
If the command succeeds, no output is displayed.
Procedure
Run the following command on any node in the cluster to delete the datastore with the specified name:
zbs-meta pool delete <pool_name>
Output note
If the command succeeds, no output is displayed.