Debian Codegraph @

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

raw
1 .. _volume_module:
2
3
4 volume -- 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 3.6 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 compression_type (optional, str, None)
90 Type of the compression method.
91
92
93 use_rmcache (optional, bool, None)
94 Whether to use RM Cache or not.
95
96
97 snapshot_policy_name (optional, str, None)
98 Name of the snapshot policy.
99
100 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`\ .
101
102
103 snapshot_policy_id (optional, str, None)
104 ID of the snapshot policy.
105
106 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`\ .
107
108
109 auto_snap_remove_type (optional, str, None)
110 Whether to remove or detach the snapshot policy.
111
112 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`\ .
113
114 If the snapshot policy name/id is passed empty then \ :emphasis:`auto\_snap\_remove\_type`\ is defaulted to \ :literal:`detach`\ .
115
116
117 size (optional, int, None)
118 The size of the volume.
119
120 Size of the volume will be assigned as higher multiple of 8 GB.
121
122
123 cap_unit (optional, str, None)
124 The unit of the volume size. It defaults to 'GB'.
125
126
127 vol_new_name (optional, str, None)
128 New name of the volume. Used to rename the volume.
129
130
131 allow_multiple_mappings (optional, bool, None)
132 Specifies whether to allow or not allow multiple mappings.
133
134 If the volume is mapped to one SDC then for every new mapping \ :emphasis:`allow\_multiple\_mappings`\ has to be passed as true.
135
136
137 sdc (optional, list, None)
138 Specifies SDC parameters.
139
140
141 sdc_name (optional, str, None)
142 Name of the SDC.
143
144 Specify either \ :emphasis:`sdc\_name`\ , \ :emphasis:`sdc\_id`\ or \ :emphasis:`sdc\_ip`\ .
145
146 Mutually exclusive with \ :emphasis:`sdc\_id`\ and \ :emphasis:`sdc\_ip`\ .
147
148
149 sdc_id (optional, str, None)
150 ID of the SDC.
151
152 Specify either \ :emphasis:`sdc\_name`\ , \ :emphasis:`sdc\_id`\ or \ :emphasis:`sdc\_ip`\ .
153
154 Mutually exclusive with \ :emphasis:`sdc\_name`\ and \ :emphasis:`sdc\_ip`\ .
155
156
157 sdc_ip (optional, str, None)
158 IP of the SDC.
159
160 Specify either \ :emphasis:`sdc\_name`\ , \ :emphasis:`sdc\_id`\ or \ :emphasis:`sdc\_ip`\ .
161
162 Mutually exclusive with \ :emphasis:`sdc\_id`\ and \ :emphasis:`sdc\_ip`\ .
163
164
165 access_mode (optional, str, None)
166 Define the access mode for all mappings of the volume.
167
168
169 bandwidth_limit (optional, int, None)
170 Limit of volume network bandwidth.
171
172 Need to mention in multiple of 1024 Kbps.
173
174 To set no limit, 0 is to be passed.
175
176
177 iops_limit (optional, int, None)
178 Limit of volume IOPS.
179
180 Minimum IOPS limit is 11 and specify 0 for unlimited iops.
181
182
183
184 sdc_state (optional, str, None)
185 Mapping state of the SDC.
186
187
188 delete_snapshots (optional, bool, None)
189 If \ :literal:`true`\ , the volume and all its dependent snapshots will be deleted.
190
191 If \ :literal:`false`\ , only the volume will be deleted.
192
193 It can be specified only when the \ :emphasis:`state`\ is \ :literal:`absent`\ .
194
195 It defaults to \ :literal:`false`\ , if not specified.
196
197
198 state (True, str, None)
199 State of the volume.
200
201
202 hostname (True, str, None)
203 IP or FQDN of the PowerFlex host.
204
205
206 username (True, str, None)
207 The username of the PowerFlex host.
208
209
210 password (True, str, None)
211 The password of the PowerFlex host.
212
213
214 validate_certs (optional, bool, True)
215 Boolean variable to specify whether or not to validate SSL certificate.
216
217 \ :literal:`true`\ - Indicates that the SSL certificate should be verified.
218
219 \ :literal:`false`\ - Indicates that the SSL certificate should not be verified.
220
221
222 port (optional, int, 443)
223 Port number through which communication happens with PowerFlex host.
224
225
226 timeout (False, int, 120)
227 Time after which connection will get terminated.
228
229 It is to be mentioned in seconds.
230
231
232
233
234
235 Notes
236 -----
237
238 .. note::
239 - The \ :emphasis:`check\_mode`\ is not supported.
240 - The modules present in the collection named as 'dellemc.powerflex' are built to support the Dell PowerFlex storage platform.
241
242
243
244
245 Examples
246 --------
247
248 .. code-block:: yaml+jinja
249
250
251 - name: Create a volume
252 dellemc.powerflex.volume:
253 hostname: "{{hostname}}"
254 username: "{{username}}"
255 password: "{{password}}"
256 validate_certs: "{{validate_certs}}"
257 port: "{{port}}"
258 vol_name: "sample_volume"
259 storage_pool_name: "pool_1"
260 protection_domain_name: "pd_1"
261 vol_type: "THICK_PROVISIONED"
262 compression_type: "NORMAL"
263 use_rmcache: true
264 size: 16
265 state: "present"
266
267 - name: Map a SDC to volume
268 dellemc.powerflex.volume:
269 hostname: "{{hostname}}"
270 username: "{{username}}"
271 password: "{{password}}"
272 validate_certs: "{{validate_certs}}"
273 port: "{{port}}"
274 vol_name: "sample_volume"
275 allow_multiple_mappings: true
276 sdc:
277 - sdc_id: "92A304DB-EFD7-44DF-A07E-D78134CC9764"
278 access_mode: "READ_WRITE"
279 sdc_state: "mapped"
280 state: "present"
281
282 - name: Unmap a SDC to volume
283 dellemc.powerflex.volume:
284 hostname: "{{hostname}}"
285 username: "{{username}}"
286 password: "{{password}}"
287 validate_certs: "{{validate_certs}}"
288 port: "{{port}}"
289 vol_name: "sample_volume"
290 sdc:
291 - sdc_id: "92A304DB-EFD7-44DF-A07E-D78134CC9764"
292 sdc_state: "unmapped"
293 state: "present"
294
295 - name: Map multiple SDCs to a volume
296 dellemc.powerflex.volume:
297 hostname: "{{hostname}}"
298 username: "{{username}}"
299 password: "{{password}}"
300 validate_certs: "{{validate_certs}}"
301 port: "{{port}}"
302 vol_name: "sample_volume"
303 protection_domain_name: "pd_1"
304 sdc:
305 - sdc_id: "92A304DB-EFD7-44DF-A07E-D78134CC9764"
306 access_mode: "READ_WRITE"
307 bandwidth_limit: 2048
308 iops_limit: 20
309 - sdc_ip: "198.10.xxx.xxx"
310 access_mode: "READ_ONLY"
311 allow_multiple_mappings: true
312 sdc_state: "mapped"
313 state: "present"
314
315 - name: Get the details of the volume
316 dellemc.powerflex.volume:
317 hostname: "{{hostname}}"
318 username: "{{username}}"
319 password: "{{password}}"
320 validate_certs: "{{validate_certs}}"
321 port: "{{port}}"
322 vol_id: "fe6c8b7100000005"
323 state: "present"
324
325 - name: Modify the details of the Volume
326 dellemc.powerflex.volume:
327 hostname: "{{hostname}}"
328 username: "{{username}}"
329 password: "{{password}}"
330 validate_certs: "{{validate_certs}}"
331 port: "{{port}}"
332 vol_name: "sample_volume"
333 storage_pool_name: "pool_1"
334 new_vol_name: "new_sample_volume"
335 size: 64
336 state: "present"
337
338 - name: Delete the Volume
339 dellemc.powerflex.volume:
340 hostname: "{{hostname}}"
341 username: "{{username}}"
342 password: "{{password}}"
343 validate_certs: "{{validate_certs}}"
344 port: "{{port}}"
345 vol_name: "sample_volume"
346 delete_snapshots: false
347 state: "absent"
348
349 - name: Delete the Volume and all its dependent snapshots
350 dellemc.powerflex.volume:
351 hostname: "{{hostname}}"
352 username: "{{username}}"
353 password: "{{password}}"
354 validate_certs: "{{validate_certs}}"
355 port: "{{port}}"
356 vol_name: "sample_volume"
357 delete_snapshots: true
358 state: "absent"
359
360
361
362 Return Values
363 -------------
364
365 changed (always, bool, false)
366 Whether or not the resource has changed.
367
368
369 volume_details (When volume exists, dict, {'accessModeLimit': 'ReadWrite', 'ancestorVolumeId': None, 'autoSnapshotGroupId': None, 'compressionMethod': 'Invalid', 'consistencyGroupId': None, 'creationTime': 1631618520, 'dataLayout': 'MediumGranularity', '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, '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': {'childVolumeIds': [], 'descendantVolumeIds': [], 'initiatorSdcId': None, 'mappedSdcIds': ['c42425XXXXXX'], 'numOfChildVolumes': 0, 'numOfDescendantVolumes': 0, 'numOfMappedSdcs': 1, 'registrationKey': None, 'registrationKeys': [], 'replicationJournalVolume': False, 'replicationState': 'UnmarkedForReplication', 'reservationType': 'NotReserved', 'rplTotalJournalCap': 0, 'rplUsedJournalCap': 0, 'userDataReadBwc': {'numOccured': 0, 'numSeconds': 0, 'totalWeightInKb': 0}, 'userDataSdcReadLatency': {'numOccured': 0, 'numSeconds': 0, 'totalWeightInKb': 0}, 'userDataSdcTrimLatency': {'numOccured': 0, 'numSeconds': 0, 'totalWeightInKb': 0}, 'userDataSdcWriteLatency': {'numOccured': 0, 'numSeconds': 0, 'totalWeightInKb': 0}, 'userDataTrimBwc': {'numOccured': 0, 'numSeconds': 0, 'totalWeightInKb': 0}, 'userDataWriteBwc': {'numOccured': 0, 'numSeconds': 0, 'totalWeightInKb': 0}}, 'snplIdOfAutoSnapshot': None, 'snplIdOfSourceVolume': None, 'storagePoolId': 'e0d8f6c900000000', 'storagePoolName': 'pool1', 'timeStampIsAccurate': False, 'useRmcache': False, 'volumeReplicationState': 'UnmarkedForReplication', 'volumeType': 'ThinProvisioned', 'vtreeId': '6e86255c00000001'})
370 Details of the volume.
371
372
373 id (, str, )
374 The ID of the volume.
375
376
377 mappedSdcInfo (, dict, )
378 The details of the mapped SDC.
379
380
381 sdcId (, str, )
382 ID of the SDC.
383
384
385 sdcName (, str, )
386 Name of the SDC.
387
388
389 sdcIp (, str, )
390 IP of the SDC.
391
392
393 accessMode (, str, )
394 Mapping access mode for the specified volume.
395
396
397 limitIops (, int, )
398 IOPS limit for the SDC.
399
400
401 limitBwInMbps (, int, )
402 Bandwidth limit for the SDC.
403
404
405
406 name (, str, )
407 Name of the volume.
408
409
410 sizeInKb (, int, )
411 Size of the volume in Kb.
412
413
414 sizeInGb (, int, )
415 Size of the volume in Gb.
416
417
418 storagePoolId (, str, )
419 ID of the storage pool in which volume resides.
420
421
422 storagePoolName (, str, )
423 Name of the storage pool in which volume resides.
424
425
426 protectionDomainId (, str, )
427 ID of the protection domain in which volume resides.
428
429
430 protectionDomainName (, str, )
431 Name of the protection domain in which volume resides.
432
433
434 snapshotPolicyId (, str, )
435 ID of the snapshot policy associated with volume.
436
437
438 snapshotPolicyName (, str, )
439 Name of the snapshot policy associated with volume.
440
441
442 snapshotsList (, str, )
443 List of snapshots associated with the volume.
444
445
446 statistics (, dict, )
447 Statistics details of the storage pool.
448
449
450 numOfChildVolumes (, int, )
451 Number of child volumes.
452
453
454 numOfMappedSdcs (, int, )
455 Number of mapped Sdcs of the volume.
456
457
458
459
460
461
462
463 Status
464 ------
465
466
467
468
469
470 Authors
471 ~~~~~~~
472
473 - P Srinivas Rao (@srinivas-rao5) <[email protected]>
474