This operation is allowed only when the Protocol Type of the trash volume is ISCSI_Lun.
Procedure
Run the following command on any node in the cluster:
zbs-meta recycle_bin restore_volume_to_lun <trash_volume_id> <--dst_target_id> <--new_lun_name> <--new_lun_id>| Parameter | Description |
|---|---|
| trash_volume_id | The unique identifier of the trash volume. |
| --dst_target_id | The unique identifier of the destination iSCSI target. If not specified, it is restored to the original target. |
| --new_lun_name | The name of the restored LUN. If not specified, the original LUN name is used. |
| --new_lun_id | The ID of the restored LUN. If not specified, the original LUN ID is used. |
Output example
$ zbs-meta recycle_bin restore_volume_to_lun 8104264d-86df-4a63-9ed1-bd18dca36902
--dst_target_id 640e38ec-e419-48b2-954b-693bb28cb1d6 --new_lun_name new-lun-1 --new_lun_id 10
---------------------- ------------------------------------
LUN Id 10
LUN Name new-lun-1
Size 10.00 GiB
Perf Unique Size In Process
Perf Shared Size In Process
Cap Unique Size In Process
Cap Shared Size In Process
Logical Used Size In Process
Volume id 8104264d-86df-4a63-9ed1-bd18dca36902
Resiliency Type RT_REPLICA
Encrypt Method ENCRYPT_PLAIN_TEXT
Encrypt Metadata Id None
Replica Num 2
EC Param
Thin Provision True
Creation Time 2025-07-04 18:01:14.859265353
Description
NAA 33a4dfd6add462401
Allowed Initiators */*
Single Access False
PR Details
Prefer CID Unknown
Read Only Unknown
Secondary ID Unknown
Is Prioritized False
Downgraded PRS 0.00 B
Chunk Instances
Labels []
Use Host False
Allowed Host Ids
Allowed Host Group Ids
---------------------- ------------------------------------Output note
Refer to the output note in Viewing iSCSI LUN information.
This operation is allowed only when the Protocol Type of the trash volume is NVMF_Namespace.
Procedure
Run the following command on any node in the cluster:
zbs-meta recycle_bin restore_volume_to_ns <trash_volume_id> <--dst_subsystem_id> <--new_ns_name>
<--new_ns_id> <--new_ns_group_id> <--new_ns_is_shared>| Parameter | Description |
|---|---|
| trash_volume_id | The unique identifier of the trash volume. |
| --dst_subsystem_id | The ID of the destination subsystem to which the trash volume will be restored. If not specified, it is restored to the original subsystem. |
| --new_ns_name | The name of the new namespace. If not specified, the original namespace name is used. |
| --new_ns_id | The ID of the new namespace. If not specified, the original namespace ID is used. |
| --new_ns_group_id | The ID of the namespace group to which the namespace belongs. This parameter must be specified when the destination subsystem is in balancing mode. If not specified, the original namespace name is used. If not specified, it is restored to its original namespace group. |
| --new_ns_is_shared | Whether the namespace is shared. Valid values are true or false. This parameter must be specified when the destination subsystem is in inheritance mode. If not specified, the original namespace configuration is used. |
Output example
$ zbs-meta recycle_bin restore_volume_to_ns afb7c9f9-2162-4345-8882-6652443416b5 --dst_subsystem_id 3bae6e45-1320-4a6a-83d7-bbb53815f2cb --new_ns_name test-bal-100 --new_ns_id 100 --new_ns_group_id fcc489b7-7848-4059-9e1b-cc2fc87f31fc
---------------------- ------------------------------------
NS Id 100
NS Name test-bal-100
Size 10.00 GiB
Perf Unique Size In Process
Perf Shared Size In Process
Cap Unique Size In Process
Cap Shared Size In Process
Logical Used Size In Process
Is Shared False
Volume id afb7c9f9-2162-4345-8882-6652443416b5
Resiliency Type RT_REPLICA
Encrypt Method ENCRYPT_PLAIN_TEXT
Encrypt Metadata Id Unknown
Replica Num 2
EC Param
Thin Provision True
Group id fcc489b7-7848-4059-9e1b-cc2fc87f31fc
Preferred Access 3
Creation Time 2025-07-07 11:19:08.376997524
Description
NQN Whitelist
Single Access False
Read Only Unknown
Is Prioritized False
Downgraded PRS 0.00 B
Chunk Instances
Use Host False
Allowed Host Ids
Allowed Host Group Ids
---------------------- ------------------------------------This operation is allowed only when the Protocol Type of the trash volume is NFS_File.
Procedure
Run the following command on any node in the cluster:
zbs-meta recycle_bin restore_volume_to_file <trash_volume_id> <--dst_dir_id>| Parameter | Description |
|---|---|
| <trash_volume_id> | The unique identifier of the trash volume. |
| --dst_dir_id | The unique identifier of the destination file directory. If not specified, it is restored to the original file directory. |
Output example
$ zbs-meta recycle_bin restore_volume_to_file 9a72fa62-da0b-4c4e-aa41-ef18f75073f6 --dst_dir_id 90d97c59-8074-4d68
----------------- ------------------------------------
id 9a72fa62-da0b-4c4e
name test-file
pool 90d97c59-8074-4d68-bcc4-42ee7d417358
preallocate False
volume 9a72fa62-da0b-4c4e-aa41-ef18f75073f6
type FILE
Encrypt Method ENCRYPT_PLAIN_TEXT
mode 432
uid 0
gid 0
size 0.00 B
perf unique size In Process
perf shared size In Process
cap unique size In Process
cap shared size In Process
logical used size In Process
prioritized False
downgraded_prs 0.00 B
----------------- ------------------------------------
Procedure
Run the following command on any node in the cluster:
zbs-meta recycle_bin restore_snapshot <trash_snapshot_id> <--dst_pool_id> <--new_snapshot_name>| Parameter | Description |
|---|---|
| trash_snapshot_id | The unique identifier of the trash snapshot. |
| --dst_pool_id | The unique identifier of the destination storage pool. If not specified, it is restored to the original storage pool. |
| --new_snapshot_name | The new snapshot name. If not specified, the original snapshot name is used. |
Output example
$ zbs-meta recycle_bin restore_snapshot 59f1ec4a-0838-430b-9582-bb6f4785c6d5
------------------- ------------------------------------
ID 59f1ec4a-0838-430b-9582-bb6f4785c6d5
Name snap-1
Parent ID
Size 1024.00 MiB
Perf Unique Size In Process
Perf Shared Size In Process
Cap Unique Size In Process
Cap Shared Size In Process
Logical Used Size In Process
Creation Time 2025-07-07 11:31:11.860730949
Status VOLUME_ONLINE
Resiliency Type RT_REPLICA
Encrypt Method ENCRYPT_PLAIN_TEXT
Encrypt Metadata Id None
Replica Num 2
EC Param
Thin Provision True
Read Only False
Description
Alloc Even False
Clone count 0
Prefer CID 0
Access Points []
Is Prioritized False
Downgraded PRS 0.00 B
Chunk Instances
------------------- ------------------------------------Output note
Refer to the output note in Viewing detailed information about a specified volume snapshot.
This operation is allowed only when the Protocol Type of the trash volume is ZBS_Volume.
Procedure
Run the following command on any node in the cluster:
zbs-meta recycle_bin restore_volume <trash_volume_id> <--dst_pool_id> <--new_volume_name>| Parameter | Description |
|---|---|
| trash_volume_id | The unique identifier of the trash volume. |
| --dst_pool_id | The unique identifier of the destination storage pool. If not specified, it is restored to the original storage pool. |
| --new_volume_name | The new volume name. If not specified, the original volume name is used. |
Output example
$ zbs-meta recycle_bin restore_volume f0ec3190-86d7-42b6-a656-1a3c56df0928
------------------- ------------------------------------
ID f0ec3190-86d7-42b6-a656-1a3c56df0928
Name 1
Parent ID 1614ee98-be69-4f54-ad43-c9d233fa473e
Size 1024.00 MiB
Perf Unique Size In Process
Perf Shared Size In Process
Cap Unique Size In Process
Cap Shared Size In Process
Logical Used Size In Process
Creation Time 2025-07-04 18:22:29.387646606
Status VOLUME_ONLINE
Resiliency Type RT_REPLICA
Encrypt Method ENCRYPT_PLAIN_TEXT
Encrypt Metadata Id None
Replica Num 2
EC Param
Thin Provision True
Read Only False
Description
Alloc Even False
Clone count 0
Prefer CID 0
Access Points []
Is Prioritized False
Downgraded PRS 0.00 B
Chunk Instances
------------------- ------------------------------------Output note
Refer to the output note in Viewing extent information about a volume.