Debian Codegraph @

ansible_collections/dellemc/unity/docs/modules/consistencygroup.rst

raw
1 .. _consistencygroup_module:
2
3
4 consistencygroup -- Manage consistency groups on Unity storage system
5 =====================================================================
6
7 .. contents::
8 :local:
9 :depth: 1
10
11
12 Synopsis
13 --------
14
15 Managing the consistency group on the Unity storage system includes creating new consistency group, adding volumes to consistency group, removing volumes from consistency group, mapping hosts to consistency group, unmapping hosts from consistency group, renaming consistency group, modifying attributes of consistency group, enabling replication in consistency group, disabling replication in consistency group and deleting consistency group.
16
17
18
19 Requirements
20 ------------
21 The below requirements are needed on the host that executes this module.
22
23 - A Dell Unity Storage device version 5.1 or later.
24 - Ansible-core 2.17 or later.
25 - Python 3.11, or 3.12.
26 - Storops Python SDK 1.2.12.
27
28
29
30 Parameters
31 ----------
32
33 cg_name (optional, str, None)
34 The name of the consistency group.
35
36 It is mandatory for the create operation.
37
38 Specify either *cg_name* or *cg_id* (but not both) for any operation.
39
40
41 cg_id (optional, str, None)
42 The ID of the consistency group.
43
44 It can be used only for get, modify, add/remove volumes, or delete operations.
45
46
47 volumes (optional, list, None)
48 This is a list of volumes.
49
50 Either the volume ID or name must be provided for adding/removing existing volumes from consistency group.
51
52 If *volumes* are given, then *vol_state* should also be specified.
53
54 Volumes cannot be added/removed from consistency group, if the consistency group or the volume has snapshots.
55
56
57 vol_id (optional, str, None)
58 The ID of the volume.
59
60
61 vol_name (optional, str, None)
62 The name of the volume.
63
64
65
66 vol_state (optional, str, None)
67 String variable, describes the state of volumes inside consistency group.
68
69 If *volumes* are given, then *vol_state* should also be specified.
70
71
72 new_cg_name (optional, str, None)
73 The new name of the consistency group, used in rename operation.
74
75
76 description (optional, str, None)
77 Description of the consistency group.
78
79
80 snap_schedule (optional, str, None)
81 Snapshot schedule assigned to the consistency group.
82
83 Specifying an empty string "" removes the existing snapshot schedule from consistency group.
84
85
86 tiering_policy (optional, str, None)
87 Tiering policy choices for how the storage resource data will be distributed among the tiers available in the pool.
88
89
90 hosts (optional, list, None)
91 This is a list of hosts.
92
93 Either the host ID or name must be provided for mapping/unmapping hosts for a consistency group.
94
95 If *hosts* are given, then *mapping_state* should also be specified.
96
97 Hosts cannot be mapped to a consistency group, if the consistency group has no volumes.
98
99 When a consistency group is being mapped to the host, users should not use the volume module to map the volumes in the consistency group to hosts.
100
101
102 host_id (optional, str, None)
103 The ID of the host.
104
105
106 host_name (optional, str, None)
107 The name of the host.
108
109
110
111 mapping_state (optional, str, None)
112 String variable, describes the state of hosts inside the consistency group.
113
114 If *hosts* are given, then *mapping_state* should also be specified.
115
116
117 replication_params (optional, dict, None)
118 Settings required for enabling replication.
119
120
121 destination_cg_name (optional, str, None)
122 Name of the destination consistency group.
123
124 Default value will be source consistency group name prefixed by 'DR_'.
125
126
127 replication_mode (True, str, None)
128 The replication mode.
129
130
131 rpo (optional, int, None)
132 Maximum time to wait before the system syncs the source and destination LUNs.
133
134 Option *rpo* should be specified if the *replication_mode* is ``asynchronous``.
135
136 The value should be in range of ``5`` to ``1440``.
137
138
139 replication_type (optional, str, local)
140 Type of replication.
141
142
143 remote_system (optional, dict, None)
144 Details of remote system to which the replication is being configured.
145
146 The *remote_system* option should be specified if the *replication_type* is ``remote``.
147
148
149 remote_system_host (True, str, None)
150 IP or FQDN for remote Unity unisphere Host.
151
152
153 remote_system_username (True, str, None)
154 User name of remote Unity unisphere Host.
155
156
157 remote_system_password (True, str, None)
158 Password of remote Unity unisphere Host.
159
160
161 remote_system_verifycert (optional, bool, True)
162 Boolean variable to specify whether or not to validate SSL certificate of remote Unity unisphere Host.
163
164 ``true`` - Indicates that the SSL certificate should be verified.
165
166 ``false`` - Indicates that the SSL certificate should not be verified.
167
168
169 remote_system_port (optional, int, 443)
170 Port at which remote Unity unisphere is hosted.
171
172
173
174 destination_pool_name (optional, str, None)
175 Name of pool to allocate destination Luns.
176
177 Mutually exclusive with *destination_pool_id*.
178
179
180 destination_pool_id (optional, str, None)
181 Id of pool to allocate destination Luns.
182
183 Mutually exclusive with *destination_pool_name*.
184
185
186
187 replication_state (optional, str, None)
188 State of the replication.
189
190
191 state (True, str, None)
192 Define whether the consistency group should exist or not.
193
194
195 unispherehost (True, str, None)
196 IP or FQDN of the Unity management server.
197
198
199 username (True, str, None)
200 The username of the Unity management server.
201
202
203 password (True, str, None)
204 The password of the Unity management server.
205
206
207 validate_certs (optional, bool, True)
208 Boolean variable to specify whether or not to validate SSL certificate.
209
210 ``true`` - Indicates that the SSL certificate should be verified.
211
212 ``false`` - Indicates that the SSL certificate should not be verified.
213
214
215 port (optional, int, 443)
216 Port number through which communication happens with Unity management server.
217
218
219
220
221
222 Notes
223 -----
224
225 .. note::
226 - The *check_mode* is not supported.
227 - The modules present in this collection named as 'dellemc.unity' are built to support the Dell Unity storage platform.
228
229
230
231
232 Examples
233 --------
234
235 .. code-block:: yaml+jinja
236
237
238 - name: Create consistency group
239 consistencygroup:
240 unispherehost: "{{unispherehost}}"
241 validate_certs: "{{validate_certs}}"
242 username: "{{username}}"
243 password: "{{password}}"
244 cg_name: "{{cg_name}}"
245 description: "{{description}}"
246 snap_schedule: "{{snap_schedule1}}"
247 state: "present"
248
249 - name: Get details of consistency group using id
250 consistencygroup:
251 unispherehost: "{{unispherehost}}"
252 username: "{{username}}"
253 password: "{{password}}"
254 validate_certs: "{{validate_certs}}"
255 cg_id: "{{cg_id}}"
256 state: "present"
257
258 - name: Add volumes to consistency group
259 consistencygroup:
260 unispherehost: "{{unispherehost}}"
261 username: "{{username}}"
262 password: "{{password}}"
263 validate_certs: "{{validate_certs}}"
264 cg_id: "{{cg_id}}"
265 volumes:
266 - vol_name: "Ansible_Test-3"
267 - vol_id: "sv_1744"
268 vol_state: "{{vol_state_present}}"
269 state: "present"
270
271 - name: Rename consistency group
272 consistencygroup:
273 unispherehost: "{{unispherehost}}"
274 username: "{{username}}"
275 password: "{{password}}"
276 validate_certs: "{{validate_certs}}"
277 cg_name: "{{cg_name}}"
278 new_cg_name: "{{new_cg_name}}"
279 state: "present"
280
281 - name: Modify consistency group details
282 consistencygroup:
283 unispherehost: "{{unispherehost}}"
284 username: "{{username}}"
285 password: "{{password}}"
286 validate_certs: "{{validate_certs}}"
287 cg_name: "{{new_cg_name}}"
288 snap_schedule: "{{snap_schedule2}}"
289 tiering_policy: "{{tiering_policy1}}"
290 state: "present"
291
292 - name: Map hosts to a consistency group
293 consistencygroup:
294 unispherehost: "{{unispherehost}}"
295 username: "{{username}}"
296 password: "{{password}}"
297 validate_certs: "{{validate_certs}}"
298 cg_id: "{{cg_id}}"
299 hosts:
300 - host_name: "10.226.198.248"
301 - host_id: "Host_511"
302 mapping_state: "mapped"
303 state: "present"
304
305 - name: Unmap hosts from a consistency group
306 consistencygroup:
307 unispherehost: "{{unispherehost}}"
308 username: "{{username}}"
309 password: "{{password}}"
310 validate_certs: "{{validate_certs}}"
311 cg_id: "{{cg_id}}"
312 hosts:
313 - host_id: "Host_511"
314 - host_name: "10.226.198.248"
315 mapping_state: "unmapped"
316 state: "present"
317
318 - name: Remove volumes from consistency group
319 consistencygroup:
320 unispherehost: "{{unispherehost}}"
321 username: "{{username}}"
322 password: "{{password}}"
323 validate_certs: "{{validate_certs}}"
324 cg_name: "{{new_cg_name}}"
325 volumes:
326 - vol_name: "Ansible_Test-3"
327 - vol_id: "sv_1744"
328 vol_state: "{{vol_state_absent}}"
329 state: "present"
330
331 - name: Delete consistency group
332 consistencygroup:
333 unispherehost: "{{unispherehost}}"
334 username: "{{username}}"
335 password: "{{password}}"
336 validate_certs: "{{validate_certs}}"
337 cg_name: "{{new_cg_name}}"
338 state: "absent"
339
340 - name: Enable replication for consistency group
341 consistencygroup:
342 unispherehost: "{{unispherehost}}"
343 username: "{{username}}"
344 password: "{{password}}"
345 validate_certs: "{{validate_certs}}"
346 cg_id: "cg_id_1"
347 replication_params:
348 destination_cg_name: "destination_cg_1"
349 replication_mode: "asynchronous"
350 rpo: 60
351 replication_type: "remote"
352 remote_system:
353 remote_system_host: '10.1.2.3'
354 remote_system_verifycert: False
355 remote_system_username: 'username'
356 remote_system_password: 'password'
357 destination_pool_name: "pool_test_1"
358 replication_state: "enable"
359 state: "present"
360
361 - name: Disable replication for consistency group
362 consistencygroup:
363 unispherehost: "{{unispherehost}}"
364 username: "{{username}}"
365 password: "{{password}}"
366 validate_certs: "{{validate_certs}}"
367 cg_name: "dis_repl_ans_source"
368 replication_state: "disable"
369 state: "present"
370
371
372
373 Return Values
374 -------------
375
376 changed (always, bool, True)
377 Whether or not the resource has changed.
378
379
380 consistency_group_details (When consistency group exists, dict, {'advanced_dedup_status': 'DedupStatusEnum.DISABLED', 'block_host_access': None, 'cg_replication_enabled': False, 'data_reduction_percent': 0, 'data_reduction_ratio': 1.0, 'data_reduction_size_saved': 0, 'data_reduction_status': 'DataReductionStatusEnum.DISABLED', 'datastores': None, 'dedup_status': None, 'description': 'Ansible testing', 'esx_filesystem_block_size': None, 'esx_filesystem_major_version': None, 'existed': True, 'filesystem': None, 'hash': 8776023812033, 'health': {'UnityHealth': {'hash': 8776023811889}}, 'host_v_vol_datastore': None, 'id': 'res_7477', 'is_replication_destination': False, 'is_snap_schedule_paused': None, 'luns': None, 'metadata_size': 0, 'metadata_size_allocated': 0, 'name': 'Ansible_CG_Testing', 'per_tier_size_used': None, 'pools': None, 'relocation_policy': 'TieringPolicyEnum.MIXED', 'replication_type': 'ReplicationTypeEnum.NONE', 'size_allocated': 0, 'size_total': 0, 'size_used': None, 'snap_count': 0, 'snap_schedule': None, 'snaps_size_allocated': 0, 'snaps_size_total': 0, 'snapshots': [], 'thin_status': 'ThinStatusEnum.FALSE', 'type': 'StorageResourceTypeEnum.CONSISTENCY_GROUP', 'virtual_volumes': None, 'vmware_uuid': None})
381 Details of the consistency group.
382
383
384 id (, str, )
385 The system ID given to the consistency group.
386
387
388 relocation_policy (, str, )
389 FAST VP tiering policy for the consistency group.
390
391
392 cg_replication_enabled (, bool, )
393 Whether or not the replication is enabled..
394
395
396 snap_schedule (, dict, )
397 Snapshot schedule applied to consistency group.
398
399
400 UnitySnapSchedule (, dict, )
401 Snapshot schedule applied to consistency group.
402
403
404 id (, str, )
405 The system ID given to the snapshot schedule.
406
407
408 name (, str, )
409 The name of the snapshot schedule.
410
411
412
413
414 luns (, dict, )
415 Details of volumes part of consistency group.
416
417
418 UnityLunList (, list, )
419 List of volumes part of consistency group.
420
421
422 UnityLun (, dict, )
423 Detail of volume.
424
425
426 id (, str, )
427 The system ID given to volume.
428
429
430 name (, str, )
431 The name of the volume.
432
433
434
435
436
437 snapshots (, list, )
438 List of snapshots of consistency group.
439
440
441 name (, str, )
442 Name of the snapshot.
443
444
445 creation_time (, str, )
446 Date and time on which the snapshot was taken.
447
448
449 expirationTime (, str, )
450 Date and time after which the snapshot will expire.
451
452
453 storageResource (, dict, )
454 Storage resource for which the snapshot was taken.
455
456
457 UnityStorageResource (, dict, )
458 Details of the storage resource.
459
460
461 id (, str, )
462 The id of the storage resource.
463
464
465
466
467
468 block_host_access (, dict, )
469 Details of hosts mapped to the consistency group.
470
471
472 UnityBlockHostAccessList (, list, )
473 List of hosts mapped to consistency group.
474
475
476 UnityBlockHostAccess (, dict, )
477 Details of host.
478
479
480 id (, str, )
481 The ID of the host.
482
483
484 name (, str, )
485 The name of the host.
486
487
488
489
490
491
492
493
494
495 Status
496 ------
497
498
499
500
501
502 Authors
503 ~~~~~~~
504
505 - Akash Shendge (@shenda1) <[email protected]>
506