Debian Codegraph @

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

raw
1 .. _snapshot_module:
2
3
4 snapshot -- Manage Snapshots on Dell PowerFlex
5 ==============================================
6
7 .. contents::
8 :local:
9 :depth: 1
10
11
12 Synopsis
13 --------
14
15 Managing snapshots on PowerFlex Storage System includes creating, getting details, mapping/unmapping to/from SDC, modifying the attributes and deleting snapshot.
16
17
18
19 Requirements
20 ------------
21 The below requirements are needed on the host that executes this module.
22
23 - A Dell PowerFlex storage system version 3.6 or later.
24 - PyPowerFlex 2.0.0.
25
26
27
28 Parameters
29 ----------
30
31 snapshot_name (optional, str, None)
32 The name of the snapshot.
33
34 Mandatory for create operation.
35
36 Specify either \ :emphasis:`snapshot\_name`\ or \ :emphasis:`snapshot\_id`\ (but not both) for any operation.
37
38
39 snapshot_id (optional, str, None)
40 The ID of the Snapshot.
41
42
43 vol_name (optional, str, None)
44 The name of the volume for which snapshot will be taken.
45
46 Specify either \ :emphasis:`vol\_name`\ or \ :emphasis:`vol\_id`\ while creating snapshot.
47
48
49 vol_id (optional, str, None)
50 The ID of the volume.
51
52
53 read_only (optional, bool, None)
54 Specifies whether mapping of the created snapshot volume will have read-write access or limited to read-only access.
55
56 If \ :literal:`true`\ , snapshot is created with read-only access.
57
58 If \ :literal:`false`\ , snapshot is created with read-write access.
59
60
61 size (optional, int, None)
62 The size of the snapshot.
63
64
65 cap_unit (optional, str, None)
66 The unit of the volume size. It defaults to \ :literal:`GB`\ , if not specified.
67
68
69 snapshot_new_name (optional, str, None)
70 New name of the snapshot. Used to rename the snapshot.
71
72
73 allow_multiple_mappings (optional, bool, None)
74 Specifies whether to allow multiple mappings or not.
75
76
77 desired_retention (optional, int, None)
78 The retention value for the Snapshot.
79
80 If the desired\_retention is not mentioned during creation, snapshot will be created with unlimited retention.
81
82 Maximum supported desired retention is 31 days.
83
84
85 retention_unit (optional, str, None)
86 The unit for retention. It defaults to \ :literal:`hours`\ , if not specified.
87
88
89 sdc (optional, list, None)
90 Specifies SDC parameters.
91
92
93 sdc_name (optional, str, None)
94 Name of the SDC.
95
96 Specify either \ :emphasis:`sdc\_name`\ , \ :emphasis:`sdc\_id`\ or \ :emphasis:`sdc\_ip`\ .
97
98 Mutually exclusive with \ :emphasis:`sdc\_id`\ and \ :emphasis:`sdc\_ip`\ .
99
100
101 sdc_id (optional, str, None)
102 ID of the SDC.
103
104 Specify either \ :emphasis:`sdc\_name`\ , \ :emphasis:`sdc\_id`\ or \ :emphasis:`sdc\_ip`\ .
105
106 Mutually exclusive with \ :emphasis:`sdc\_name`\ and \ :emphasis:`sdc\_ip`\ .
107
108
109 sdc_ip (optional, str, None)
110 IP of the SDC.
111
112 Specify either \ :emphasis:`sdc\_name`\ , \ :emphasis:`sdc\_id`\ or \ :emphasis:`sdc\_ip`\ .
113
114 Mutually exclusive with \ :emphasis:`sdc\_id`\ and \ :emphasis:`sdc\_ip`\ .
115
116
117 access_mode (optional, str, None)
118 Define the access mode for all mappings of the snapshot.
119
120
121 bandwidth_limit (optional, int, None)
122 Limit of snapshot network bandwidth.
123
124 Need to mention in multiple of 1024 Kbps.
125
126 To set no limit, 0 is to be passed.
127
128
129 iops_limit (optional, int, None)
130 Limit of snapshot IOPS.
131
132 Minimum IOPS limit is 11 and specify 0 for unlimited iops.
133
134
135
136 sdc_state (optional, str, None)
137 Mapping state of the SDC.
138
139
140 remove_mode (optional, str, None)
141 Removal mode for the snapshot.
142
143 It defaults to \ :literal:`ONLY\_ME`\ , if not specified.
144
145
146 state (True, str, None)
147 State of the snapshot.
148
149
150 hostname (True, str, None)
151 IP or FQDN of the PowerFlex host.
152
153
154 username (True, str, None)
155 The username of the PowerFlex host.
156
157
158 password (True, str, None)
159 The password of the PowerFlex host.
160
161
162 validate_certs (optional, bool, True)
163 Boolean variable to specify whether or not to validate SSL certificate.
164
165 \ :literal:`true`\ - Indicates that the SSL certificate should be verified.
166
167 \ :literal:`false`\ - Indicates that the SSL certificate should not be verified.
168
169
170 port (optional, int, 443)
171 Port number through which communication happens with PowerFlex host.
172
173
174 timeout (False, int, 120)
175 Time after which connection will get terminated.
176
177 It is to be mentioned in seconds.
178
179
180
181
182
183 Notes
184 -----
185
186 .. note::
187 - The \ :emphasis:`check\_mode`\ is not supported.
188 - The modules present in the collection named as 'dellemc.powerflex' are built to support the Dell PowerFlex storage platform.
189
190
191
192
193 Examples
194 --------
195
196 .. code-block:: yaml+jinja
197
198
199 - name: Create snapshot
200 dellemc.powerflex.snapshot:
201 hostname: "{{hostname}}"
202 username: "{{username}}"
203 password: "{{password}}"
204 validate_certs: "{{validate_certs}}"
205 snapshot_name: "ansible_snapshot"
206 vol_name: "ansible_volume"
207 read_only: false
208 desired_retention: 2
209 state: "present"
210
211 - name: Get snapshot details using snapshot id
212 dellemc.powerflex.snapshot:
213 hostname: "{{hostname}}"
214 username: "{{username}}"
215 password: "{{password}}"
216 validate_certs: "{{validate_certs}}"
217 snapshot_id: "fe6cb28200000007"
218 state: "present"
219
220 - name: Map snapshot to SDC
221 dellemc.powerflex.snapshot:
222 hostname: "{{hostname}}"
223 username: "{{username}}"
224 password: "{{password}}"
225 validate_certs: "{{validate_certs}}"
226 snapshot_id: "fe6cb28200000007"
227 sdc:
228 - sdc_ip: "198.10.xxx.xxx"
229 - sdc_id: "663ac0d200000001"
230 allow_multiple_mappings: true
231 sdc_state: "mapped"
232 state: "present"
233
234 - name: Modify the attributes of SDC mapped to snapshot
235 dellemc.powerflex.snapshot:
236 hostname: "{{hostname}}"
237 username: "{{username}}"
238 password: "{{password}}"
239 validate_certs: "{{validate_certs}}"
240 snapshot_id: "fe6cb28200000007"
241 sdc:
242 - sdc_ip: "198.10.xxx.xxx"
243 iops_limit: 11
244 bandwidth_limit: 4096
245 - sdc_id: "663ac0d200000001"
246 iops_limit: 20
247 bandwidth_limit: 2048
248 allow_multiple_mappings: true
249 sdc_state: "mapped"
250 state: "present"
251
252 - name: Extend the size of snapshot
253 dellemc.powerflex.snapshot:
254 hostname: "{{hostname}}"
255 username: "{{username}}"
256 password: "{{password}}"
257 validate_certs: "{{validate_certs}}"
258 snapshot_id: "fe6cb28200000007"
259 size: 16
260 state: "present"
261
262 - name: Unmap SDCs from snapshot
263 dellemc.powerflex.snapshot:
264 hostname: "{{hostname}}"
265 username: "{{username}}"
266 password: "{{password}}"
267 validate_certs: "{{validate_certs}}"
268 snapshot_id: "fe6cb28200000007"
269 sdc:
270 - sdc_ip: "198.10.xxx.xxx"
271 - sdc_id: "663ac0d200000001"
272 sdc_state: "unmapped"
273 state: "present"
274
275 - name: Rename snapshot
276 dellemc.powerflex.snapshot:
277 hostname: "{{hostname}}"
278 username: "{{username}}"
279 password: "{{password}}"
280 validate_certs: "{{validate_certs}}"
281 snapshot_id: "fe6cb28200000007"
282 snapshot_new_name: "ansible_renamed_snapshot_10"
283 state: "present"
284
285 - name: Delete snapshot
286 dellemc.powerflex.snapshot:
287 hostname: "{{hostname}}"
288 username: "{{username}}"
289 password: "{{password}}"
290 validate_certs: "{{validate_certs}}"
291 snapshot_id: "fe6cb28200000007"
292 remove_mode: "ONLY_ME"
293 state: "absent"
294
295
296
297 Return Values
298 -------------
299
300 changed (always, bool, false)
301 Whether or not the resource has changed.
302
303
304 snapshot_details (When snapshot exists, dict, {'accessModeLimit': 'ReadOnly', 'ancestorVolumeId': 'cdd883cf00000002', 'ancestorVolumeName': 'ansible-volume-1', '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, 'retentionInHours': 0, 'retentionLevels': [], 'secureSnapshotExpTime': 0, 'sizeInGb': 16, 'sizeInKb': 16777216, 'snplIdOfAutoSnapshot': None, 'snplIdOfSourceVolume': None, 'storagePoolId': 'e0d8f6c900000000', 'storagePoolName': 'pool1', 'timeStampIsAccurate': False, 'useRmcache': False, 'volumeReplicationState': 'UnmarkedForReplication', 'volumeType': 'Snapshot', 'vtreeId': '6e86255c00000001'})
305 Details of the snapshot.
306
307
308 ancestorVolumeId (, str, )
309 The ID of the root of the specified volume's V-Tree.
310
311
312 ancestorVolumeName (, str, )
313 The name of the root of the specified volume's V-Tree.
314
315
316 creationTime (, int, )
317 The creation time of the snapshot.
318
319
320 id (, str, )
321 The ID of the snapshot.
322
323
324 mappedSdcInfo (, dict, )
325 The details of the mapped SDC.
326
327
328 sdcId (, str, )
329 ID of the SDC.
330
331
332 sdcName (, str, )
333 Name of the SDC.
334
335
336 sdcIp (, str, )
337 IP of the SDC.
338
339
340 accessMode (, str, )
341 Mapping access mode for the specified snapshot.
342
343
344 limitIops (, int, )
345 IOPS limit for the SDC.
346
347
348 limitBwInMbps (, int, )
349 Bandwidth limit for the SDC.
350
351
352
353 name (, str, )
354 Name of the snapshot.
355
356
357 secureSnapshotExpTime (, int, )
358 Expiry time of the snapshot.
359
360
361 sizeInKb (, int, )
362 Size of the snapshot.
363
364
365 sizeInGb (, int, )
366 Size of the snapshot.
367
368
369 retentionInHours (, int, )
370 Retention of the snapshot in hours.
371
372
373 storagePoolId (, str, )
374 The ID of the Storage pool in which snapshot resides.
375
376
377 storagePoolName (, str, )
378 The name of the Storage pool in which snapshot resides.
379
380
381
382
383
384
385 Status
386 ------
387
388
389
390
391
392 Authors
393 ~~~~~~~
394
395 - Akash Shendge (@shenda1) <[email protected]>
396