Procedure
Run the following command on any node in the cluster to view all iSCSI LUN snapshots under the specified target:
zbs-iscsi snapshot list <target_name> [--lun_id <LUN_ID>]
The --lun_id <LUN_ID> parameter is optional and allows you to view all snapshots for a specified LUN.
Run the following command on any node in the cluster to view the snapshot of iSCSI LUN with the specified name:
zbs-iscsi snapshot show <target_name> <lun_id> <snapshot_name>
Run the following command on any node in the cluster to view the snapshot of iSCSI LUN with the specified ID:
zbs-iscsi snapshot show_by_id <snapshot_id>
Output example
ID Snap Name Size Perf Unique Size Perf Shared Size Cap Unique Size Cap Shared Size Logical Used Size Diff Size Volume Id Creation Time Description
------------------------------------ ----------- -------- ------------------ ------------------ ----------------- ----------------- ------------------- ----------- ------------------------------------ ----------------------------- -------------
310d7ba5-361f-42e7-bdc4-aba0d12806f6 sp1 4.00 GiB 0.00 B 0.00 B 0.00 B 0.00 B 0.00 B 0.00 B b85164e6-dee3-47e0-8867-e8f3f7cb26e7 2024-06-18 11:45:46.442463351Procedure
Run the following command on any node in the cluster:
zbs-iscsi snapshot create <target_name> <lun_id> <name>
Output example
----------------- ------------------------------------
ID 310d7ba5-361f-42e7-bdc4-aba0d12806f6
Snap Name sp1
Size 4.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
Diff Size 0.00 B
Volume Id b85164e6-dee3-47e0-8867-e8f3f7cb26e7
Creation Time 2024-06-18 11:45:46.442463351
Description
----------------- ------------------------------------Rolls back a specified LUN to a snapshot. The snapshot can belong to another LUN instead of the original LUN. After rollback, the LUN data is fully replaced by the snapshot data.
Procedure
Run the following command on any node in the cluster to roll back the iSCSI LUN from the snapshot with the specified name:
zbs-iscsi snapshot rollback <target_name> <lun_id> <snapshot_name>
Run the following command on any node in the cluster to roll back the iSCSI LUN from the snapshot with the specified ID:
zbs-iscsi snapshot rollback_by_id <target_name> <lun_id> <snapshot_id>
Output note
If the command succeeds, no output is displayed.
Update an iSCSI LUN snapshot's name, description, and data distribution setting.
Procedure
Run the following command on any node in the cluster to update the LUN snapshot with the specified name:
zbs-iscsi snapshot update [--new_name <NEW_NAME>] [--new_desc <NEW_DESC>] [--new_alloc_even <NEW_ALLOC_EVEN>] <target_name> <lun_id> <snapshot_name>
Run the following command on any node in the cluster to update the LUN snapshot with the specified ID:
zbs-iscsi snapshot update_by_id [--new_name <NEW_NAME>] [--new_desc <NEW_DESC>] [--new_alloc_even <NEW_ALLOC_EVEN>] <snapshot_id>
| Parameter | Description |
|---|---|
--new_name <NEW_NAME> | Updates the name of the corresponding snapshot. |
--new_desc <NEW_DESC> | Updates the description of the corresponding snapshot. |
--new_alloc_even <NEW_ALLOC_EVEN> | Whether to evenly distribute snapshot replicas. Valid values: true or false. |
Output example
----------------- ------------------------------------
ID 310d7ba5-361f-42e7-bdc4-aba0d12806f6
Snap Name snapshot1
Size 4.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
Diff Size 0.00 B
Volume Id b85164e6-dee3-47e0-8867-e8f3f7cb26e7
Creation Time 2024-06-18 11:45:46.442463351
Description
----------------- -----------------------------------Procedure
Run the following command on any node in the cluster to delete the snapshot with the specified name:
zbs-iscsi snapshot delete <target_name> <lun_id> <name>
Run the following command on any node in the cluster to delete the snapshot with the specified ID:
zbs-iscsi snapshot delete_by_id <snapshot_id>
Output note
If the command succeeds, no output is displayed.