1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
|
.. _storagepool_module:
storagepool -- Manage storage pool on Unity
===========================================
.. contents::
:local:
:depth: 1
Synopsis
--------
Managing storage pool on Unity storage system contains the operations Get details of storage pool, Create a storage pool, Modify storage pool.
Requirements
------------
The below requirements are needed on the host that executes this module.
- A Dell Unity Storage device version 5.1 or later.
- Ansible-core 2.13 or later.
- Python 3.9, 3.10 or 3.11.
- Storops Python SDK 1.2.11.
Parameters
----------
pool_name (optional, str, None)
Name of the storage pool, unique in the storage system.
pool_id (optional, str, None)
Unique identifier of the pool instance.
new_pool_name (optional, str, None)
New name of the storage pool, unique in the storage system.
pool_description (optional, str, None)
The description of the storage pool.
fast_cache (optional, str, None)
Indicates whether the fast cache is enabled for the storage pool.
``Enabled`` - FAST Cache is enabled for the pool.
``Disabled`` - FAST Cache is disabled for the pool.
fast_vp (optional, str, None)
Indicates whether to enable scheduled data relocations for the pool.
``Enabled`` - Enabled scheduled data relocations for the pool.
``Disabled`` - Disabled scheduled data relocations for the pool.
raid_groups (optional, dict, None)
Parameters to create RAID group from the disks and add it to the pool.
disk_group_id (optional, str, None)
Id of the disk group.
disk_num (optional, int, None)
Number of disks.
raid_type (optional, str, None)
RAID group types or RAID levels.
stripe_width (optional, str, None)
RAID group stripe widths, including parity or mirror disks.
alert_threshold (optional, int, None)
Threshold at which the system will generate alerts about the free space in the pool, specified as a percentage.
Minimum threshold limit is 50.
Maximum threshold limit is 84.
is_harvest_enabled (optional, bool, None)
Enable/Disable automatic deletion of snapshots based on pool space usage.
pool_harvest_high_threshold (optional, float, None)
Max threshold for space used in pool beyond which the system automatically starts deleting snapshots in the pool.
Applies when the automatic deletion of snapshots based on pool space usage is enabled for the system and pool.
Minimum pool harvest high threshold value is 1.
Maximum pool harvest high threshold value is 99.
pool_harvest_low_threshold (optional, float, None)
Min threshold for space used in pool below which the system automatically stops deletion of snapshots in the pool.
Applies when the automatic deletion of snapshots based on pool space usage is enabled for the system and pool.
Minimum pool harvest low threshold value is 0.
Maximum pool harvest low threshold value is 98.
is_snap_harvest_enabled (optional, bool, None)
Enable/Disable automatic deletion of snapshots based on pool space usage.
snap_harvest_high_threshold (optional, float, None)
Max threshold for space used in snapshot beyond which the system automatically starts deleting snapshots in the pool.
Applies when the automatic deletion of snapshots based on pool space usage is enabled for the pool.
Minimum snap harvest high threshold value is 1.
Maximum snap harvest high threshold value is 99.
snap_harvest_low_threshold (optional, float, None)
Min threshold for space used in snapshot below which the system will stop automatically deleting snapshots in the pool.
Applies when the automatic deletion of snapshots based on pool space usage is enabled for the pool.
Minimum snap harvest low threshold value is 0.
Maximum snap harvest low threshold value is 98.
pool_type (optional, str, None)
Indicates storage pool type.
state (True, str, None)
Define whether the storage pool should exist or not.
``Present`` - indicates that the storage pool should exist on the system.
``Absent`` - indicates that the storage pool should not exist on the system.
unispherehost (True, str, None)
IP or FQDN of the Unity management server.
username (True, str, None)
The username of the Unity management server.
password (True, str, None)
The password of the Unity management server.
validate_certs (optional, bool, True)
Boolean variable to specify whether or not to validate SSL certificate.
``true`` - Indicates that the SSL certificate should be verified.
``false`` - Indicates that the SSL certificate should not be verified.
port (optional, int, 443)
Port number through which communication happens with Unity management server.
Notes
-----
.. note::
- Deletion of storage pool is not allowed through Ansible module.
- The *check_mode* is not supported.
- The modules present in this collection named as 'dellemc.unity' are built to support the Dell Unity storage platform.
Examples
--------
.. code-block:: yaml+jinja
- name: Get Storage pool details using pool_name
dellemc.unity.storagepool:
unispherehost: "{{unispherehost}}"
username: "{{username}}"
password: "{{password}}"
validate_certs: "{{validate_certs}}"
pool_name: "{{pool_name}}"
state: "present"
- name: Get Storage pool details using pool_id
dellemc.unity.storagepool:
unispherehost: "{{unispherehost}}"
username: "{{username}}"
password: "{{password}}"
validate_certs: "{{validate_certs}}"
pool_id: "{{pool_id}}"
state: "present"
- name: Modify Storage pool attributes using pool_name
dellemc.unity.storagepool:
unispherehost: "{{unispherehost}}"
username: "{{username}}"
password: "{{password}}"
validate_certs: "{{validate_certs}}"
pool_name: "{{pool_name}}"
new_pool_name: "{{new_pool_name}}"
pool_description: "{{pool_description}}"
fast_cache: "{{fast_cache_enabled}}"
fast_vp: "{{fast_vp_enabled}}"
state: "present"
- name: Modify Storage pool attributes using pool_id
dellemc.unity.storagepool:
unispherehost: "{{unispherehost}}"
username: "{{username}}"
password: "{{password}}"
validate_certs: "{{validate_certs}}"
pool_id: "{{pool_id}}"
new_pool_name: "{{new_pool_name}}"
pool_description: "{{pool_description}}"
fast_cache: "{{fast_cache_enabled}}"
fast_vp: "{{fast_vp_enabled}}"
state: "present"
- name: Create a StoragePool
dellemc.unity.storagepool:
unispherehost: "{{unispherehost}}"
username: "{{username}}"
password: "{{password}}"
validate_certs: "{{validate_certs}}"
pool_name: "Test"
pool_description: "test pool"
raid_groups:
disk_group_id : "dg_16"
disk_num : 2
raid_type : "RAID10"
stripe_width : "BEST_FIT"
alert_threshold : 50
is_harvest_enabled : True
pool_harvest_high_threshold : 60
pool_harvest_low_threshold : 40
is_snap_harvest_enabled : True
snap_harvest_high_threshold : 70
snap_harvest_low_threshold : 50
fast_vp: "enabled"
fast_cache: "enabled"
pool_type : "DYNAMIC"
state: "present"
Return Values
-------------
changed (always, bool, True)
Whether or not the storage pool has changed.
storage_pool_details (When storage pool exists., dict, {'alert_threshold': 50, 'creation_time': '2022-03-08 14:05:32+00:00', 'description': '', 'drives': [{'disk_technology': 'SAS', 'id': 'dpe_disk_22', 'name': 'DPE Drive 22', 'size': 590860984320, 'tier_type': 'PERFORMANCE'}, {'disk_technology': 'SAS', 'id': 'dpe_disk_23', 'name': 'DPE Drive 23', 'size': 590860984320, 'tier_type': 'PERFORMANCE'}, {'disk_technology': 'SAS', 'id': 'dpe_disk_24', 'name': 'DPE Drive 24', 'size': 590860984320, 'tier_type': 'PERFORMANCE'}], 'existed': True, 'harvest_state': 'UsageHarvestStateEnum.IDLE', 'hash': 8744642897210, 'health': {'UnityHealth': {'hash': 8744642799842}}, 'id': 'pool_280', 'is_all_flash': False, 'is_empty': False, 'is_fast_cache_enabled': False, 'is_fast_vp_enabled': False, 'is_harvest_enabled': True, 'is_snap_harvest_enabled': True, 'metadata_size_subscribed': 105763569664, 'metadata_size_used': 57176752128, 'name': 'test_pool', 'object_id': 12884902146, 'pool_fast_vp': {'UnityPoolFastVp': {'hash': 8744647518980}}, 'pool_space_harvest_high_threshold': 59.0, 'pool_space_harvest_low_threshold': 40.0, 'pool_type': 'StoragePoolTypeEnum.DYNAMIC', 'raid_type': 'RaidTypeEnum.RAID10', 'rebalance_progress': None, 'size_free': 470030483456, 'size_free_with_unit': '437.75 GB', 'size_subscribed': 447215820800, 'size_subscribed_with_unit': '416.5 GB', 'size_total': 574720311296, 'size_total_with_unit': '535.25 GB', 'size_used': 76838068224, 'size_used_with_unit': '71.56 GB', 'snap_size_subscribed': 128851369984, 'snap_size_subscribed_with_unit': '120.0 GB', 'snap_size_used': 2351104, 'snap_size_used_with_unit': '2.24 MB', 'snap_space_harvest_high_threshold': 80.0, 'snap_space_harvest_low_threshold': 60.0, 'tiers': {'UnityPoolTierList': [{'disk_count': [0, 3, 0], 'existed': True, 'hash': 8744643017382, 'name': ['Extreme Performance', 'Performance', 'Capacity'], 'pool_units': [None, {'UnityPoolUnitList': [{'UnityPoolUnit': {'hash': 8744642786759, 'id': 'rg_4'}}, {'UnityPoolUnit': {'hash': 8744642786795, 'id': 'rg_5'}}]}, None], 'raid_type': ['RaidTypeEnum.NONE', 'RaidTypeEnum.RAID10', 'RaidTypeEnum.NONE'], 'size_free': [0, 470030483456, 0], 'size_moving_down': [0, 0, 0], 'size_moving_up': [0, 0, 0], 'size_moving_within': [0, 0, 0], 'size_total': [0, 574720311296, 0], 'size_used': [0, 104689827840, 0], 'stripe_width': [None, 'RaidStripeWidthEnum._2', None], 'tier_type': ['TierTypeEnum.EXTREME_PERFORMANCE', 'TierTypeEnum.PERFORMANCE', 'TierTypeEnum.CAPACITY']}]}})
The storage pool details.
id (, str, )
Pool id, unique identifier of the pool.
name (, str, )
Pool name, unique in the storage system.
is_fast_cache_enabled (, bool, )
Indicates whether the fast cache is enabled for the storage pool. true - FAST Cache is enabled for the pool. false - FAST Cache is disabled for the pool.
is_fast_vp_enabled (, bool, )
Indicates whether to enable scheduled data relocations for the storage pool. true - Enabled scheduled data relocations for the pool. false - Disabled scheduled data relocations for the pool.
size_free_with_unit (, str, )
Indicates size_free with its appropriate unit in human readable form.
size_subscribed_with_unit (, str, )
Indicates size_subscribed with its appropriate unit in human readable form.
size_total_with_unit (, str, )
Indicates size_total with its appropriate unit in human readable form.
size_used_with_unit (, str, )
Indicates size_used with its appropriate unit in human readable form.
snap_size_subscribed_with_unit (, str, )
Indicates snap_size_subscribed with its appropriate unit in human readable form.
snap_size_used_with_unit (, str, )
Indicates snap_size_used with its appropriate unit in human readable form.
drives (, list, )
Indicates information about the drives associated with the storage pool.
id (, str, )
Unique identifier of the drive.
name (, str, )
Indicates name of the drive.
size (, str, )
Indicates size of the drive.
disk_technology (, str, )
Indicates disk technology of the drive.
tier_type (, str, )
Indicates tier type of the drive.
Status
------
Authors
~~~~~~~
- Ambuj Dubey (@AmbujDube) <ansible.team@dell.com>
|