Debian Codegraph @

ansible_collections/dellemc/powerflex/docs/modules/volume_v2.rst

raw
1 .. _volume_v2_module:
2
3
4 volume_v2 -- Manage volumes on Dell PowerFlex
5 =============================================
6
7 .. contents::
8 :local:
9 :depth: 1
10
11
12 Synopsis
13 --------
14
15 Managing volumes on PowerFlex storage system includes creating, getting details, modifying attributes and deleting volume.
16
17 It also includes adding/removing snapshot policy, mapping/unmapping volume to/from SDC and listing associated snapshots.
18
19
20
21 Requirements
22 ------------
23 The below requirements are needed on the host that executes this module.
24
25 - A Dell PowerFlex storage system version 5.0 or later.
26 - PyPowerFlex 2.0.0
27
28
29
30 Parameters
31 ----------
32
33 vol_name (optional, str, None)
34 The name of the volume.
35
36 Mandatory for create operation.
37
38 It is unique across the PowerFlex array.
39
40 Mutually exclusive with :emphasis:`vol\_id`.
41
42
43 vol_id (optional, str, None)
44 The ID of the volume.
45
46 Except create operation, all other operations can be performed using :emphasis:`vol\_id`.
47
48 Mutually exclusive with :emphasis:`vol\_name`.
49
50
51 storage_pool_name (optional, str, None)
52 The name of the storage pool.
53
54 Either name or the id of the storage pool is required for creating a volume.
55
56 During creation, if storage pool name is provided then either protection domain name or id must be mentioned along with it.
57
58 Mutually exclusive with :emphasis:`storage\_pool\_id`.
59
60
61 storage_pool_id (optional, str, None)
62 The ID of the storage pool.
63
64 Either name or the id of the storage pool is required for creating a volume.
65
66 Mutually exclusive with :emphasis:`storage\_pool\_name`.
67
68
69 protection_domain_name (optional, str, None)
70 The name of the protection domain.
71
72 During creation of a volume, if more than one storage pool exists with the same name then either protection domain name or id must be mentioned along with it.
73
74 Mutually exclusive with :emphasis:`protection\_domain\_id`.
75
76
77 protection_domain_id (optional, str, None)
78 The ID of the protection domain.
79
80 During creation of a volume, if more than one storage pool exists with the same name then either protection domain name or id must be mentioned along with it.
81
82 Mutually exclusive with :emphasis:`protection\_domain\_name`.
83
84
85 vol_type (optional, str, None)
86 Type of volume provisioning.
87
88
89 snapshot_policy_name (optional, str, None)
90 Name of the snapshot policy.
91
92 To remove/detach snapshot policy, empty :emphasis:`snapshot\_policy\_id`\ /\ :emphasis:`snapshot\_policy\_name` is to be passed along with :emphasis:`auto\_snap\_remove\_type`.
93
94
95 snapshot_policy_id (optional, str, None)
96 ID of the snapshot policy.
97
98 To remove/detach snapshot policy, empty :emphasis:`snapshot\_policy\_id`\ /\ :emphasis:`snapshot\_policy\_name` is to be passed along with :emphasis:`auto\_snap\_remove\_type`.
99
100
101 auto_snap_remove_type (optional, str, None)
102 Whether to remove or detach the snapshot policy.
103
104 To remove/detach snapshot policy, empty :emphasis:`snapshot\_policy\_id`\ /\ :emphasis:`snapshot\_policy\_name` is to be passed along with :emphasis:`auto\_snap\_remove\_type`.
105
106 If the snapshot policy name/id is passed empty then :emphasis:`auto\_snap\_remove\_type` is defaulted to :literal:`detach`.
107
108
109 size (optional, int, None)
110 The size of the volume.
111
112 Size of the volume will be assigned as higher multiple of 8 GB.
113
114
115 cap_unit (optional, str, None)
116 The unit of the volume size. It defaults to 'GB'.
117
118
119 vol_new_name (optional, str, None)
120 New name of the volume. Used to rename the volume.
121
122
123 refresh_src_vol_id (optional, str, None)
124 ID of the source volume/snapshot to refresh from.
125
126 Either the name or the id of the source volume/snapshot is required
127
128 Mutually exclusive with :emphasis:`refresh\_src\_vol\_name`.
129
130
131 refresh_src_vol_name (optional, str, None)
132 Name of the source volume/snapshot to refresh from.
133
134 Either the name or the id of the source volume/snapshot is required
135
136 Mutually exclusive with :emphasis:`refresh\_src\_vol\_id`.
137
138
139 restore_src_vol_id (optional, str, None)
140 ID of the source volume/snapshot to restore from.
141
142 Either the name or the id of the source volume/snapshot is required
143
144 Mutually exclusive with :emphasis:`restore\_src\_vol\_name`.
145
146
147 restore_src_vol_name (optional, str, None)
148 Name of the source volume/snapshot to restore from.
149
150 Either the name or the id of the source volume/snapshot is required
151
152 Mutually exclusive with :emphasis:`restore\_src\_vol\_id`.
153
154
155 allow_multiple_mappings (optional, bool, None)
156 Specifies whether to allow or not allow multiple mappings.
157
158 If the volume is mapped to one SDC then for every new mapping :emphasis:`allow\_multiple\_mappings` has to be passed as true.
159
160
161 sdc (optional, list, None)
162 Specifies SDC parameters.
163
164
165 sdc_name (optional, str, None)
166 Name of the SDC.
167
168 Specify either :emphasis:`sdc\_name`\ , :emphasis:`sdc\_id` or :emphasis:`sdc\_ip`.
169
170 Mutually exclusive with :emphasis:`sdc\_id` and :emphasis:`sdc\_ip`.
171
172
173 sdc_id (optional, str, None)
174 ID of the SDC.
175
176 Specify either :emphasis:`sdc\_name`\ , :emphasis:`sdc\_id` or :emphasis:`sdc\_ip`.
177
178 Mutually exclusive with :emphasis:`sdc\_name` and :emphasis:`sdc\_ip`.
179
180
181 sdc_ip (optional, str, None)
182 IP of the SDC.
183
184 Specify either :emphasis:`sdc\_name`\ , :emphasis:`sdc\_id` or :emphasis:`sdc\_ip`.
185
186 Mutually exclusive with :emphasis:`sdc\_id` and :emphasis:`sdc\_ip`.
187
188
189 access_mode (optional, str, None)
190 Define the access mode for all mappings of the volume.
191
192
193 bandwidth_limit (optional, int, None)
194 Limit of volume network bandwidth.
195
196 Need to mention in multiple of 1024 Kbps.
197
198 To set no limit, 0 is to be passed.
199
200
201 iops_limit (optional, int, None)
202 Limit of volume IOPS.
203
204 Minimum IOPS limit is 11 and specify 0 for unlimited iops.
205
206
207
208 sdc_state (optional, str, None)
209 Mapping state of the SDC.
210
211
212 delete_snapshots (optional, bool, None)
213 If :literal:`true`\ , the volume and all its dependent snapshots will be deleted.
214
215 If :literal:`false`\ , only the volume will be deleted.
216
217 It can be specified only when the :emphasis:`state` is :literal:`absent`.
218
219 It defaults to :literal:`false`\ , if not specified.
220
221
222 state (True, str, None)
223 State of the volume.
224
225
226 hostname (True, str, None)
227 IP or FQDN of the PowerFlex host.
228
229
230 username (True, str, None)
231 The username of the PowerFlex host.
232
233
234 password (True, str, None)
235 The password of the PowerFlex host.
236
237
238 validate_certs (optional, bool, True)
239 Boolean variable to specify whether or not to validate SSL certificate.
240
241 :literal:`true` - Indicates that the SSL certificate should be verified.
242
243 :literal:`false` - Indicates that the SSL certificate should not be verified.
244
245
246 port (optional, int, 443)
247 Port number through which communication happens with PowerFlex host.
248
249
250 timeout (False, int, 120)
251 Time after which connection will get terminated.
252
253 It is to be mentioned in seconds.
254
255
256
257
258
259 Notes
260 -----
261
262 .. note::
263 - Compression\_type and use\_rmcache are not supported since PowerFlex 5.0.0
264 - Refresh and restore cannot be conducted in the same task.
265 - The modules present in the collection named as 'dellemc.powerflex' are built to support the Dell PowerFlex storage platform.
266
267
268
269
270 Examples
271 --------
272
273 .. code-block:: yaml+jinja
274
275
276 - name: Create a volume
277 dellemc.powerflex.volume_v2:
278 hostname: "{{hostname}}"
279 username: "{{username}}"
280 password: "{{password}}"
281 validate_certs: "{{validate_certs}}"
282 port: "{{port}}"
283 vol_name: "sample_volume"
284 storage_pool_name: "pool_1"
285 protection_domain_name: "pd_1"
286 vol_type: "THIN_PROVISIONED"
287 size: 16
288 state: "present"
289
290 - name: Map a SDC to volume
291 dellemc.powerflex.volume_v2:
292 hostname: "{{hostname}}"
293 username: "{{username}}"
294 password: "{{password}}"
295 validate_certs: "{{validate_certs}}"
296 port: "{{port}}"
297 vol_name: "sample_volume"
298 allow_multiple_mappings: true
299 sdc:
300 - sdc_id: "92A304DB-EFD7-44DF-A07E-D78134CC9764"
301 access_mode: "READ_WRITE"
302 sdc_state: "mapped"
303 state: "present"
304
305 - name: Unmap a SDC to volume
306 dellemc.powerflex.volume_v2:
307 hostname: "{{hostname}}"
308 username: "{{username}}"
309 password: "{{password}}"
310 validate_certs: "{{validate_certs}}"
311 port: "{{port}}"
312 vol_name: "sample_volume"
313 sdc:
314 - sdc_id: "92A304DB-EFD7-44DF-A07E-D78134CC9764"
315 sdc_state: "unmapped"
316 state: "present"
317
318 - name: Map multiple SDCs to a volume
319 dellemc.powerflex.volume_v2:
320 hostname: "{{hostname}}"
321 username: "{{username}}"
322 password: "{{password}}"
323 validate_certs: "{{validate_certs}}"
324 port: "{{port}}"
325 vol_name: "sample_volume"
326 protection_domain_name: "pd_1"
327 sdc:
328 - sdc_id: "92A304DB-EFD7-44DF-A07E-D78134CC9764"
329 access_mode: "READ_WRITE"
330 bandwidth_limit: 2048
331 iops_limit: 20
332 - sdc_ip: "198.10.xxx.xxx"
333 access_mode: "READ_ONLY"
334 allow_multiple_mappings: true
335 sdc_state: "mapped"
336 state: "present"
337
338 - name: Get the details of the volume
339 dellemc.powerflex.volume_v2:
340 hostname: "{{hostname}}"
341 username: "{{username}}"
342 password: "{{password}}"
343 validate_certs: "{{validate_certs}}"
344 port: "{{port}}"
345 vol_id: "fe6c8b7100000005"
346 state: "present"
347
348 - name: Restore volume
349 dellemc.powerflex.volume_v2:
350 hostname: "{{hostname}}"
351 username: "{{username}}"
352 password: "{{password}}"
353 validate_certs: "{{validate_certs}}"
354 port: "{{port}}"
355 restore_src_vol_id: "fe6c8b7100000006"
356 state: "present"
357
358 - name: Refresh volume
359 dellemc.powerflex.volume_v2:
360 hostname: "{{hostname}}"
361 username: "{{username}}"
362 password: "{{password}}"
363 validate_certs: "{{validate_certs}}"
364 port: "{{port}}"
365 refresh_src_vol_name: "example_snapshot"
366 state: "present"
367
368 - name: Modify the details of the Volume
369 dellemc.powerflex.volume_v2:
370 hostname: "{{hostname}}"
371 username: "{{username}}"
372 password: "{{password}}"
373 validate_certs: "{{validate_certs}}"
374 port: "{{port}}"
375 vol_name: "sample_volume"
376 storage_pool_name: "pool_1"
377 vol_new_name: "new_sample_volume"
378 size: 64
379 state: "present"
380
381 - name: Delete the Volume
382 dellemc.powerflex.volume_v2:
383 hostname: "{{hostname}}"
384 username: "{{username}}"
385 password: "{{password}}"
386 validate_certs: "{{validate_certs}}"
387 port: "{{port}}"
388 vol_name: "sample_volume"
389 delete_snapshots: false
390 state: "absent"
391
392 - name: Delete the Volume and all its dependent snapshots
393 dellemc.powerflex.volume_v2:
394 hostname: "{{hostname}}"
395 username: "{{username}}"
396 password: "{{password}}"
397 validate_certs: "{{validate_certs}}"
398 port: "{{port}}"
399 vol_name: "sample_volume"
400 delete_snapshots: true
401 state: "absent"
402
403
404
405 Return Values
406 -------------
407
408 changed (always, bool, false)
409 Whether or not the resource has changed.
410
411
412 volume_details (When volume exists, dict, {'accessModeLimit': 'ReadWrite', 'ancestorVolumeId': None, 'autoSnapshotGroupId': None, 'compressionMethod': 'Invalid', 'consistencyGroupId': None, 'creationTime': 1631618520, 'dataLayout': 'MediumGranularity', 'genType': 'EC', 'id': 'cdd883cf00000002', 'links': [{'href': '/api/instances/Volume::cdd883cf00000002', 'rel': 'self'}, {'href': '/api/instances/Volume::cdd883cf00000002/relationships /Statistics', 'rel': '/api/Volume/relationship/Statistics'}, {'href': '/api/instances/VTree::6e86255c00000001', 'rel': '/api/parent/relationship/vtreeId'}, {'href': '/api/instances/StoragePool::e0d8f6c900000000', 'rel': '/api/parent/relationship/storagePoolId'}], 'lockedAutoSnapshot': False, 'lockedAutoSnapshotMarkedForRemoval': False, 'managedBy': 'ScaleIO', 'mappedSdcInfo': None, 'name': 'ansible-volume-1', 'notGenuineSnapshot': False, 'nsid': 23, 'originalExpiryTime': 0, 'pairIds': None, 'protectionDomainId': '9300c1f900000000', 'protectionDomainName': 'domain1', 'replicationJournalVolume': False, 'replicationTimeStamp': 0, 'retentionLevels': [], 'secureSnapshotExpTime': 0, 'sizeInGB': 16, 'sizeInKb': 16777216, 'snapshotPolicyId': None, 'snapshotPolicyName': None, 'snapshotsList': [{'accessModeLimit': 'ReadOnly', 'ancestorVolumeId': 'cdd883cf00000002', 'autoSnapshotGroupId': None, 'compressionMethod': 'Invalid', 'consistencyGroupId': '22f1e80c00000001', 'creationTime': 1631619229, 'dataLayout': 'MediumGranularity', 'id': 'cdd883d000000004', 'links': [{'href': '/api/instances/Volume::cdd883d000000004', 'rel': 'self'}, {'href': '/api/instances/Volume::cdd883d000000004 /relationships/Statistics', 'rel': '/api/Volume/relationship/Statistics'}, {'href': '/api/instances/Volume::cdd883cf00000002', 'rel': '/api/parent/relationship/ancestorVolumeId'}, {'href': '/api/instances/VTree::6e86255c00000001', 'rel': '/api/parent/relationship/vtreeId'}, {'href': '/api/instances/StoragePool::e0d8f6c900000000', 'rel': '/api/parent/relationship/storagePoolId'}], 'lockedAutoSnapshot': False, 'lockedAutoSnapshotMarkedForRemoval': False, 'managedBy': 'ScaleIO', 'mappedSdcInfo': None, 'name': 'ansible_vol_snap_1', 'notGenuineSnapshot': False, 'originalExpiryTime': 0, 'pairIds': None, 'replicationJournalVolume': False, 'replicationTimeStamp': 0, 'retentionLevels': [], 'secureSnapshotExpTime': 0, 'sizeInKb': 16777216, 'snplIdOfAutoSnapshot': None, 'snplIdOfSourceVolume': None, 'storagePoolId': 'e0d8f6c900000000', 'timeStampIsAccurate': False, 'useRmcache': False, 'volumeReplicationState': 'UnmarkedForReplication', 'volumeType': 'Snapshot', 'vtreeId': '6e86255c00000001'}], 'statistics': {'host_trim_bandwidth': 0, 'host_trim_iops': 0, 'avg_host_write_latency': 0, 'logical_provisioned': 3221225472, 'avg_host_read_latency': 0, 'host_read_bandwidth': 0, 'host_read_iops': 0, 'logical_used': 0, 'host_write_bandwidth': 0, 'host_write_iops': 0, 'avg_host_trim_latency': 0}, 'snplIdOfAutoSnapshot': None, 'snplIdOfSourceVolume': None, 'storagePoolId': 'e0d8f6c900000000', 'storagePoolName': 'pool1', 'timeStampIsAccurate': False, 'useRmcache': False, 'volumeClass': 'defaultclass', 'volumeReplicationState': 'UnmarkedForReplication', 'volumeType': 'ThinProvisioned', 'vtreeId': '6e86255c00000001'})
413 Details of the volume.
414
415
416 id (, str, )
417 The ID of the volume.
418
419
420 mappedSdcInfo (, dict, )
421 The details of the mapped SDC.
422
423
424 sdcId (, str, )
425 ID of the SDC.
426
427
428 sdcName (, str, )
429 Name of the SDC.
430
431
432 sdcIp (, str, )
433 IP of the SDC.
434
435
436 accessMode (, str, )
437 Mapping access mode for the specified volume.
438
439
440 limitIops (, int, )
441 IOPS limit for the SDC.
442
443
444 limitBwInMbps (, int, )
445 Bandwidth limit for the SDC.
446
447
448
449 name (, str, )
450 Name of the volume.
451
452
453 sizeInKb (, int, )
454 Size of the volume in Kb.
455
456
457 sizeInGb (, int, )
458 Size of the volume in Gb.
459
460
461 storagePoolId (, str, )
462 ID of the storage pool in which volume resides.
463
464
465 storagePoolName (, str, )
466 Name of the storage pool in which volume resides.
467
468
469 protectionDomainId (, str, )
470 ID of the protection domain in which volume resides.
471
472
473 protectionDomainName (, str, )
474 Name of the protection domain in which volume resides.
475
476
477 snapshotPolicyId (, str, )
478 ID of the snapshot policy associated with volume.
479
480
481 snapshotPolicyName (, str, )
482 Name of the snapshot policy associated with volume.
483
484
485 snapshotsList (, str, )
486 List of snapshots associated with the volume.
487
488
489 statistics (, dict, )
490 Statistics details of the volume.
491
492
493 avg_host_read_latency (, int, )
494 Average host read latency.
495
496
497 avg_host_trim_latency (, int, )
498 Average host trim latency.
499
500
501 avg_host_write_latency (, int, )
502 Average host write latency.
503
504
505 host_read_bandwidth (, int, )
506 Host read bandwidth.
507
508
509 host_read_iops (, int, )
510 Host read IOPS.
511
512
513 host_trim_bandwidth (, int, )
514 Host trim bandwidth.
515
516
517 host_trim_iops (, int, )
518 Host trim IOPS.
519
520
521 host_write_bandwidth (, int, )
522 Host write bandwidth.
523
524
525 host_write_iops (, int, )
526 Host write IOPS.
527
528
529 logical_provisioned (, int, )
530 Logical provisioned size.
531
532
533 logical_used (, int, )
534 Logical used size.
535
536
537
538
539
540
541
542 Status
543 ------
544
545
546
547
548
549 Authors
550 ~~~~~~~
551
552 - Yuhao Liu (@RayLiu7) <[email protected]>
553