dellemc.powerflex.replication_pair 模块 – 管理 Dell PowerFlex 上的复制对

注意

此模块是 dellemc.powerflex 集合(版本 2.5.0)的一部分。

如果您正在使用 ansible 包,您可能已经安装了此集合。它不包含在 ansible-core 中。要检查是否已安装,请运行 ansible-galaxy collection list

要安装它,请使用:ansible-galaxy collection install dellemc.powerflex。您需要其他要求才能使用此模块,请参阅要求了解详细信息。

要在 playbook 中使用它,请指定:dellemc.powerflex.replication_pair

dellemc.powerflex 1.6.0 中的新增功能

概要

  • 在 PowerFlex 存储系统上管理复制对包括获取详细信息、创建、暂停、恢复初始复制和删除复制对。

要求

执行此模块的主机需要满足以下要求。

  • Dell PowerFlex 存储系统版本 3.6 或更高版本。

  • PyPowerFlex 1.12.0。

参数

参数

注释

hostname

别名:gateway_host

字符串 / 必填

PowerFlex 主机的 IP 或 FQDN。

pair_id

字符串

复制对的 ID。

pair_name 互斥。

pair_name

字符串

复制对的名称。

pair_id 互斥。

pairs

列表 / elements=字典

要添加到 rcg 的复制对列表。

copy_type

字符串 / 必填

复制类型。

选项

  • "Identical"

  • "OnlineCopy"

  • "OnlineHashCopy"

  • "OfflineCopy"

name

字符串

复制对的名称。

source_volume_id

字符串

源卷 ID。

source_volume_name 互斥。

source_volume_name

字符串

源卷名称。

source_volume_id 互斥。

target_volume_id

字符串

目标卷 ID。

target_volume_name 互斥。

target_volume_name

字符串

目标卷名称。

如果指定,还应指定 remote_peer 详细信息。

target_volume_id 互斥。

password

字符串 / 必填

PowerFlex 主机的密码。

pause

布尔值

暂停或恢复复制对的初始复制。

选项

  • false

  • true

port

整数

与 PowerFlex 主机通信的端口号。

默认值: 443

rcg_id

字符串

复制一致性组的 ID。

rcg_name 互斥。

rcg_name

字符串

复制一致性组的名称。

rcg_id 互斥。

remote_peer

字典

远程对等系统。

hostname

别名:gateway_host

字符串 / 必填

远程对等网关主机的 IP 或 FQDN。

password

字符串 / 必填

远程对等网关主机的密码。

port

整数

与远程对等网关主机通信的端口号。

默认值: 443

timeout

整数

连接终止的时间。

以秒为单位提及。

默认值: 120

username

字符串 / 必填

远程对等网关主机的用户名。

validate_certs

别名:verifycert

布尔值

布尔变量,用于指定是否验证 SSL 证书。

true - 表示应验证 SSL 证书。

false - 表示不应验证 SSL 证书。

选项

  • false

  • true ← (默认)

state

字符串

复制对的状态。

选项

  • "present" ← (默认)

  • "absent"

timeout

整数

连接终止的时间。

以秒为单位提及。

默认值: 120

username

字符串 / 必填

PowerFlex 主机的用户名。

validate_certs

别名:verifycert

布尔值

布尔变量,用于指定是否验证 SSL 证书。

true - 表示应验证 SSL 证书。

false - 表示不应验证 SSL 证书。

选项

  • false

  • true ← (默认)

说明

注意

  • 支持 check_mode

  • 在 4.0 中,当 copy_type 指定为 OfflineCopy 时,复制对的创建将失败。

  • 名为 “dellemc.powerflex” 的集合中存在的模块旨在支持 Dell PowerFlex 存储平台。

示例

- name: Get replication pair details
  dellemc.powerflex.replication_pair:
    hostname: "{{hostname}}"
    username: "{{username}}"
    password: "{{password}}"
    validate_certs: "{{validate_certs}}"
    port: "{{port}}"
    pair_id: "123"

- name: Create a replication pair
  dellemc.powerflex.replication_pair:
    hostname: "{{hostname}}"
    username: "{{username}}"
    password: "{{password}}"
    validate_certs: "{{validate_certs}}"
    port: "{{port}}"
    rcg_name: "test_rcg"
    pairs:
      - source_volume_id: "002"
        target_volume_id: "001"
        copy_type: "OnlineCopy"
        name: "pair1"

- name: Create a replication pair with target volume name
  dellemc.powerflex.replication_pair:
    hostname: "{{hostname}}"
    username: "{{username}}"
    password: "{{password}}"
    validate_certs: "{{validate_certs}}"
    port: "{{port}}"
    rcg_name: "test_rcg"
    pairs:
      - source_volume_name: "src_vol"
        target_volume_name: "dest_vol"
        copy_type: "OnlineCopy"
        name: "pair1"
    remote_peer:
      hostname: "{{hostname}}"
      username: "{{username}}"
      password: "{{password}}"
      validate_certs: "{{validate_certs}}"
      port: "{{port}}"

- name: Pause replication pair
  dellemc.powerflex.replication_pair:
    hostname: "{{hostname}}"
    username: "{{username}}"
    password: "{{password}}"
    validate_certs: "{{validate_certs}}"
    port: "{{port}}"
    pair_name: "pair1"
    pause: true

- name: Resume replication pair
  dellemc.powerflex.replication_pair:
    hostname: "{{hostname}}"
    username: "{{username}}"
    password: "{{password}}"
    validate_certs: "{{validate_certs}}"
    port: "{{port}}"
    pair_name: "pair1"
    pause: false

- name: Delete replication pair
  dellemc.powerflex.replication_pair:
    hostname: "{{hostname}}"
    username: "{{username}}"
    password: "{{password}}"
    validate_certs: "{{validate_certs}}"
    port: "{{port}}"
    pair_name: "pair1"
    state: "absent"

返回值

通用返回值记录在 此处,以下是此模块特有的字段

描述

changed

布尔值

资源是否已更改。

返回: 始终

示例: false

rcg_replication_pairs

列表 / elements=字符串

rcg 的复制对的详细信息。

返回:当 rcg 存在时

示例: [{"copyType": "OnlineCopy", "id": "23aa0bc900000001", "initialCopyPriority": -1, "initialCopyState": "Done", "lifetimeState": "Normal", "localActivityState": "RplEnabled", "localVolumeId": "e2bc1fab00000008", "localVolumeName": "vol1", "name": null, "peerSystemName": null, "remoteActivityState": "RplEnabled", "remoteCapacityInMB": 8192, "remoteId": "a058446700000001", "remoteVolumeId": "1cda7af20000000d", "remoteVolumeName": "vol", "replicationConsistencyGroupId": "e2ce036b00000002", "userRequestedPauseTransmitInitCopy": false}]

copyType

字符串

复制对的复制类型。

返回:成功

id

字符串

复制对的 ID。

返回:成功

initialCopyPriority

整数

初始复制优先级。

返回:成功

initialCopyState

字符串

复制对的初始复制状态。

返回:成功

lifetimeState

整数

复制对的生命周期状态。

返回:成功

localActivityState

字符串

本地复制对的活动状态。

返回:成功

localVolumeId

字符串

本地卷的 ID。

返回:成功

localVolumeName

字符串

本地卷的名称。

返回:成功

name

字符串

复制对的名称。

返回:成功

peerSystemName

整数

对等系统名称。

返回:成功

remoteActivityState

字符串

远程复制对的活动状态。

返回:成功

remoteCapacityInMB

整数

远程容量(MB)。

返回:成功

remoteId

字符串

远程复制对的 ID。

返回:成功

remoteVolumeId

整数

远程卷 ID。

返回:成功

remoteVolumeName

整数

远程卷名称。

返回:成功

replicationConsistencyGroupId

字符串

复制一致性组的 ID。

返回:成功

userRequestedPauseTransmitInitCopy

整数

用户请求暂停传输初始复制的值。

返回:成功

replication_pair_details

字典

复制对的详细信息。

返回:当复制对存在时

示例: {"copyType": "OnlineCopy", "id": "23aa0bc900000001", "initialCopyPriority": -1, "initialCopyState": "Done", "lifetimeState": "Normal", "localActivityState": "RplEnabled", "localVolumeId": "e2bc1fab00000008", "localVolumeName": "vol1", "name": null, "peerSystemName": null, "remoteActivityState": "RplEnabled", "remoteCapacityInMB": 8192, "remoteId": "a058446700000001", "remoteVolumeId": "1cda7af20000000d", "remoteVolumeName": "vol", "replicationConsistencyGroupId": "e2ce036b00000002", "userRequestedPauseTransmitInitCopy": false}

copyType

字符串

复制对的复制类型。

返回:成功

id

字符串

复制对的 ID。

返回:成功

initialCopyPriority

整数

初始复制优先级。

返回:成功

initialCopyState

字符串

复制对的初始复制状态。

返回:成功

lifetimeState

整数

复制对的生命周期状态。

返回:成功

localActivityState

字符串

本地复制对的活动状态。

返回:成功

localVolumeId

字符串

本地卷的 ID。

返回:成功

localVolumeName

字符串

本地卷的名称。

返回:成功

name

字符串

复制对的名称。

返回:成功

peerSystemName

整数

对等系统名称。

返回:成功

remoteActivityState

字符串

远程复制对的活动状态。

返回:成功

remoteCapacityInMB

整数

远程容量(MB)。

返回:成功

remoteId

字符串

远程复制对的 ID。

返回:成功

remoteVolumeId

整数

远程卷 ID。

返回:成功

remoteVolumeName

整数

远程卷名称。

返回:成功

replicationConsistencyGroupId

字符串

复制一致性组的 ID。

返回:成功

userRequestedPauseTransmitInitCopy

整数

用户请求暂停传输初始复制的值。

返回:成功

作者

  • Jennifer John (@Jennifer-John)