Procedure
Run the following command on any node in the cluster:
zbs-meta recycle_bin show_configOutput example
$ zbs-meta recycle_bin show_config
enable_recycle_bin: true
default_vol_expired_hours: 24Output note
| Parameter | Description |
|---|---|
enable_recycle_bin | Whether the recycle bin is enabled. |
default_vol_expired_hours | The default expiration time for volumes in the recycle bin, in hours. |
The storage pool corresponding to the recycle bin is a special protected storage pool within the cluster. It is only used for temporarily storing volumes pending cleanup. You are not allowed to delete this storage pool or perform regular volume-related operations within the pool (create volumes, delete volumes, create snapshots for volumes, clone volumes, etc.).
Procedure
Run the following command on any node in the cluster:
zbs-meta recycle_bin show_poolOutput example
$ zbs-meta recycle_bin show_pool
--------------- ---------------------------------------------------
ID b38fabd3-dd16-439e-8913-59137b3a7f32
Name zbs-trash-pool-072af8cf-2f79-4102-9515-5089ff2fe18a
Storage Pool system
Creation Time 2025-07-02 17:35:26.54852529
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:
zbs-meta recycle_bin show_usageOutput example
$ zbs-meta recycle_bin show_usage
-------------------------- ------
Logical Size 0.00 B
Logical Used Size 0.00 B
Sweep Size Until Today End 0.00 B
Sweep Size In 3 Days 0.00 B
Sweep Size In 7 Days 0.00 B
Sweep Size In 30 Days 0.00 B
Sweep Size After 30 Days 0.00 B
-------------------------- ------Output note
| Parameter | Description |
|---|---|
Logical Size | The logical space used by the recycle bin. |
Logical Used Size | The logical allocated space used by the recycle bin. |
Sweep Size Until Today End | The actual space that can be cleaned up before the end of today. |
Sweep Size In 3 Days | The actual space that can be cleaned up within the next 3 days. |
Sweep Size In 7 Days | The actual space that can be cleaned up within the next 7 days. |
Sweep Size In 30 Days | The actual space that can be cleaned up within the next 30 days. |
Sweep Size After 30 Days | The actual space that can only be cleaned up after 30 days. |
Procedure
Run the following command on any node in the cluster:
zbs-meta recycle_bin show_volume <volume_id_or_snapshot_id> [--show_detail]| Parameter | Description |
|---|---|
--show_detail | Optional. Whether to display the original protocol object, used to query information about the protocol object before deletion. By default, the information is not displayed. |
Output example
$ zbs-meta recycle_bin show_volume 8104264d-86df-4a63-9ed1-bd18dca36902
------------------- ------------------------------------
Volume ID 8104264d-86df-4a63-9ed1-bd18dca36902
Name 8104264d-86df-4a63-9ed1-bd18dca36902
Second Id
Origin Pool Id 640e38ec-e419-48b2-954b-693bb28cb1d6
Deleted Time 2025-07-04 18:01:28.211840745
Expired Time 2025-07-05 18:01:28.0
Protocol Type ISCSI_Lun
Protocol Name 8104264d-86df-4a63-9ed1-bd18dca36902
Protocol Identifier 1
------------------- ------------------------------------Output note
| Parameter | Description |
|---|---|
Volume ID | The unique identifier of the trash volume, consistent with the one before deletion. |
Name | The volume name, consistent with the one before deletion. |
Second Id | The secondary ID of the volume. |
Origin Pool Id | The ID of the original storage pool where the volume resides previously. |
Deleted Time | The time when the volume was deleted and moved to the recycle bin. |
Expired Time | The expiration time for cleaning up the volume. |
Protocol Type | The original type of the volume, such as ISCSI_Lun, NVMF_Namespace, NFS_File, ZBS_Volume, etc. |
Protocol Name | The name of the volume in the original protocol. |
Protocol Identifier | The protocol identifier of the volume (LUN ID, namespace ID, etc.). |
This command supports paginated listing of volumes.
Procedure
Run the following command on any node in the cluster:
zbs-meta recycle_bin list_volumes <--page_num> <--page_pos> <--last_key> [--show_total_num]| Parameter | Description |
|---|---|
--page_num | The number of entries to display per page. |
--page_pos | The current page number (starting from 0). |
--last_key | The last Volume ID returned from the previous page, used for cursor-based pagination (choose either this or page_pos). |
--show_total_num | Optional. Whether to display the total number of entries in the recycle bin. By default, this is not displayed. |
Output example
$ zbs-meta recycle_bin list_volumes --page_num 3 --page_pos 50 --show_total_num
Total Number Of Trash Volumes Is 102
Volume ID Name Second Id Origin Pool Id Deleted Time Expired Time Protocol Type Protocol Name Protocol Identifier
------------------------------------ ------ ----------- ------------------------------------ ----------------------------- --------------------- --------------- --------------- ---------------------
ce3ed82a-1b89-4e1a-a403-41db6a74a175 82 1614ee98-be69-4f54-ad43-c9d233fa473e 2025-07-04 18:00:59.161419823 2025-07-05 18:00:59.0 ZBS_Volume
b51fdba7-5e59-4652-a994-b0a52592d775 63 1614ee98-be69-4f54-ad43-c9d233fa473e 2025-07-04 18:00:48.856953257 2025-07-05 18:00:48.0 ZBS_Volume
27b4b3cc-731b-4002-a43a-0111b7dc5377 84 1614ee98-be69-4f54-ad43-c9d233fa473e 2025-07-04 18:01:00.203668965 2025-07-05 18:01:00.0 ZBS_VolumeOutput note
The total number of volumes in the recycle bin is displayed in the first line.
| Parameter | Description |
|---|---|
Volume ID | The unique identifier of the trash volume, consistent with the one before deletion. |
Name | The volume name, consistent with the one before deletion. |
Second Id | The secondary ID of the volume. |
Origin Pool Id | The ID of the original storage pool where the volume resides previously. |
Deleted Time | The time when the volume was deleted and moved to the recycle bin. |
Expired Time | The expiration time for cleaning up the volume. |
Protocol Type | The original type of the volume, such as ISCSI_Lun, NVMF_Namespace, NFS_File, ZBS_Volume, etc. |
Protocol Name | The name of the volume in the original protocol. |
Protocol Identifier | The protocol identifier of the volume (LUN ID, namespace ID, etc.). |
You can paginate the trash snapshots.
Information:
In the current version, snapshots are not moved to the recycle bin by default. This feature must be enabled manually.
Procedure
Run the following command on any node in the cluster:
zbs-meta recycle_bin list_snapshots <--page_num> <--page_pos> <--last_key> [--show_total_num]| Parameter | Description |
|---|---|
--page_num | The number of entries to display per page. |
--page_pos | The current page number (starting from 0). |
--last_key | The last snapshot_id returned from the previous page, used for cursor-based pagination (choose either this or page_pos). |
--show_total_num | Optional. Whether to display the total number of entries in the recycle bin. By default, this is not displayed. |
Output example
$ zbs-meta recycle_bin list_snapshots
Snapshot ID Name Second Id Origin Pool Id Origin Volume Id Deleted Time Expired Time
------------------------------------ ------ ----------- ------------------------------------ ------------------------------------ ----------------------------- ---------------------
4efbf291-e3e4-4210-aa28-700718e63ef6 1-snap 1614ee98-be69-4f54-ad43-c9d233fa473e f0ec3190-86d7-42b6-a656-1a3c56df0928 2025-07-04 18:22:47.511904702 2025-07-05 18:22:47.0
Output note
| Parameter | Description |
|---|---|
| Snapshot ID | The unique identifier of the snapshot. |
| Name | The snapshot name. |
| Second Id | The secondary ID of the snapshot. |
| Origin Pool Id | The ID of the original storage pool where the volume resides previously. |
| Origin Volume Id | The volume ID to which the snapshot belongs when it is created. |
| Deleted Time | The time when it is deleted and moved to the recycle bin. |
| Expired Time | The expiration time of the snapshot in the recycle bin. |