API Doc
Search Docs...
⌘ K
OverviewDeploymentManagementOperationReferenceGlossary

Creating CDP tasks

Creating a single CDP task

Procedure

Run the following command on any node in the cluster:

zbs-cdp job create <volume_id> <remote_volume_id> <remote_zbs_hosts> [options]

Parameter description

ParameterDescription
volume_idRequired. The ID of the local volume.
remote_volume_idRequired. The ID of the remote volume.
remote_zbs_hostsRequired. The list of remote hosts, in the format ip:data_port:meta_port,ip:data_port:meta_port....
--cid <CID>Optional. The local chunk ID. Default: None.
--group <GROUP>Optional. The CDP task group name. Default: None.
--skip_fc_write_zeroOptional. Specifies whether to skip synchronizing zero-filled I/O. Default: True. You can disable this feature using --no_skip_fc_write_zero.
--auto_cleanOptional. Specifies whether to automatically clean up the task after it is completed or canceled. Default: False.
--use_compressOptional. Specifies whether to enable CDP block I/O compression. Default: False.
--tracking_onlyOptional. Specifies whether to enable tracking-only mode after creation. Default: False.
--skip_full_copyOptional. Specifies whether to skip full replication. Default: False.
--sync / --no-syncOptional. Specifies whether to wait synchronously for task creation to complete. Default: True.
--max_read_timeout_ms <MS>Optional. Specifies the maximum read timeout in milliseconds. Default: None.
--max_block_write_timeout_ms <MS>Optional. Specifies the maximum block write timeout in milliseconds. Default: None.
--max_mirror_write_timeout_ms <MS>Optional. Specifies the maximum image write timeout in milliseconds. Default: None.
-v / --version <VER>Required. Specifies the CDP protocol version (v1 or v2).

Output example

zbs-cdp job create be09dd2c-325d-406c-b772-bcb36d3991fd 6c786d90-1857-4423-a655-0f268622aea0 10.10.130.31:10201:10206 --cid 1 -v v2
-------------  ------------------------------------
Version        v2
ID             3d936175-65c6-4cb0-8909-3796511875e4
Group          None
Stage          FULL_COPY
Compress       False
No Full Copy   False
CID            1
Local volume   be09dd2c-325d-406c-b772-bcb36d3991fd
Remote volume  6c786d90-1857-4423-a655-0f268622aea0
Remote Addr    10.10.130.31:10201:10206
CDPJobOption
ERROR          None
-------------  ------------------------------------

Output note

After successful execution, the details of the newly created CDP task are displayed:

ParameterDescription
VersionThe CDP protocol version.
IDThe unique identifier of the task.
GroupThe name of its task group.
StageThe task stage (e.g., FULL_COPY, MIRROR, etc.).
CompressWhether to enable CDP block I/O compression.
No Full CopyWhether to skip full replication.
CIDThe local chunk ID.
Local volumeThe local volume ID.
Remote volumeThe remote volume ID.
Remote AddrThe remote host address.
CDPJobOptionThe task-specific options (such as the timeout configuration).
ERRORThe error message (shows None if there is no error).

Batch creating CDP tasks

Procedure

Run the following command on any node in the cluster:

zbs-cdp job add_by_group <group> <remote_zbs_hosts> --volume_pairs <PAIRS> [options]

Parameter description

ParameterDescription
groupRequired. The name of the CDP task group.
remote_zbs_hostsRequired. The list of remote hosts, in the format ip:data_port:meta_port,ip:data_port:meta_port....
--volume_pairsRequired. Specifies the volume pair mapping list in the format local_volume_id=remote_volume_id. Multiple mappings are supported.
--cid <CID>Optional. The local chunk ID. Default: None.
--skip_fc_write_zeroOptional. Specifies whether to skip synchronizing zero-filled I/O. Default: True. You can disable this feature using --no_skip_fc_write_zero.
--auto_cleanOptional. Specifies whether to automatically clean up the task after it is completed or canceled. Default: False.
--use_compressOptional. Specifies whether to enable CDP block I/O compression. Default: False.
--tracking_onlyOptional. Specifies whether to enable tracking-only mode after creation. Default: False.
--skip_full_copyOptional. Specifies whether to skip full replication. Default: False.
--syncOptional. Specifies whether to wait synchronously for task creation to complete. Default: True.
-v / --version <VER>Optional. Specifies the CDP protocol version (v1 or v2).

Output example

zbs-cdp job add_by_group example 10.10.130.31:10201:10206 --cid 1 -v v2 --volume_pairs 2ea55379-34dc-4b36-a4bd-6027b5d1f8b2=e9fbfd57-8ac2-4908-b44d-e8f0bfe2b89b 3af41af7-db61-425a-91ed-1e366f7404b9=da2f5f67-a3a1-4b24-bc5d-132e337dc1c8
Version    ID                                    Group    Stage    Compress    No Full Copy      CID  Local volume                          Remote volume                         Remote Addr               CDPJobOption    ERROR
---------  ------------------------------------  -------  -------  ----------  --------------  -----  ------------------------------------  ------------------------------------  ------------------------  --------------  -------
v2         c791e4e2-e4d4-4e97-8636-bcc84cc76c85  example  INIT     False       False               1  2ea55379-34dc-4b36-a4bd-6027b5d1f8b2  e9fbfd57-8ac2-4908-b44d-e8f0bfe2b89b  10.10.130.31:10201:10206                  None
v2         322ee53b-ab96-4367-873c-f8b0fbd296f1  example  INIT     False       False               1  3af41af7-db61-425a-91ed-1e366f7404b9  da2f5f67-a3a1-4b24-bc5d-132e337dc1c8  10.10.130.31:10201:10206                  None

Output note

After the batch creation succeeds, the information about all newly created tasks in the group will be displayed in a list. For field descriptions, refer to the output note in Creating a single CDP task.