Debian Codegraph @

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

raw
1 .. _filesystem_module:
2
3
4 filesystem -- Manage filesystem on Unity storage system
5 =======================================================
6
7 .. contents::
8 :local:
9 :depth: 1
10
11
12 Synopsis
13 --------
14
15 Managing filesystem on Unity storage system includes Create new filesystem, Modify snapschedule attribute of filesystem, Modify filesystem attributes, Display filesystem details, Display filesystem snapshots, Display filesystem snapschedule, Delete snapschedule associated with the filesystem, Delete filesystem, Create new filesystem with quota configuration, Enable, modify and disable replication.
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 filesystem_name (optional, str, None)
34 The name of the filesystem. Mandatory only for the create operation. All the operations are supported through *filesystem_name*.
35
36 It is mutually exclusive with *filesystem_id*.
37
38
39 filesystem_id (optional, str, None)
40 The id of the filesystem.
41
42 It can be used only for get, modify, or delete operations.
43
44 It is mutually exclusive with *filesystem_name*.
45
46
47 pool_name (optional, str, None)
48 This is the name of the pool where the filesystem will be created.
49
50 Either the *pool_name* or *pool_id* must be provided to create a new filesystem.
51
52
53 pool_id (optional, str, None)
54 This is the ID of the pool where the filesystem will be created.
55
56 Either the *pool_name* or *pool_id* must be provided to create a new filesystem.
57
58
59 size (optional, int, None)
60 The size of the filesystem.
61
62
63 cap_unit (optional, str, None)
64 The unit of the filesystem size. It defaults to ``GB``, if not specified.
65
66
67 nas_server_name (optional, str, None)
68 Name of the NAS server on which filesystem will be hosted.
69
70
71 nas_server_id (optional, str, None)
72 ID of the NAS server on which filesystem will be hosted.
73
74
75 supported_protocols (optional, str, None)
76 Protocols supported by the file system.
77
78 It will be overridden by NAS server configuration if NAS Server is ``Multiprotocol``.
79
80
81 description (optional, str, None)
82 Description about the filesystem.
83
84 Description can be removed by passing empty string ("").
85
86
87 smb_properties (optional, dict, None)
88 Advance settings for SMB. It contains optional candidate variables.
89
90
91 is_smb_sync_writes_enabled (optional, bool, None)
92 Indicates whether the synchronous writes option is enabled on the file system.
93
94
95 is_smb_notify_on_access_enabled (optional, bool, None)
96 Indicates whether notifications of changes to directory file structure are enabled.
97
98
99 is_smb_op_locks_enabled (optional, bool, None)
100 Indicates whether opportunistic file locking is enabled on the file system.
101
102
103 is_smb_notify_on_write_enabled (optional, bool, None)
104 Indicates whether file write notifications are enabled on the file system.
105
106
107 smb_notify_on_change_dir_depth (optional, int, None)
108 Integer variable, determines the lowest directory level to which the enabled notifications apply.
109
110 Minimum value is ``1``.
111
112
113
114 data_reduction (optional, bool, None)
115 Boolean variable, specifies whether or not to enable compression. Compression is supported only for thin filesystem.
116
117
118 is_thin (optional, bool, None)
119 Boolean variable, specifies whether or not it is a thin filesystem.
120
121
122 access_policy (optional, str, None)
123 Access policy of a filesystem.
124
125
126 locking_policy (optional, str, None)
127 File system locking policies. These policy choices control whether the NFSv4 range locks must be honored.
128
129
130 tiering_policy (optional, str, None)
131 Tiering policy choices for how the storage resource data will be distributed among the tiers available in the pool.
132
133
134 quota_config (optional, dict, None)
135 Configuration for quota management. It contains optional parameters.
136
137
138 grace_period (optional, int, None)
139 Grace period set in quota configuration after soft limit is reached.
140
141 If *grace_period* is not set during creation of filesystem, it will be set to ``7 days`` by default.
142
143
144 grace_period_unit (optional, str, None)
145 Unit of grace period.
146
147 Default unit is ``days``.
148
149
150 default_hard_limit (optional, int, None)
151 Default hard limit for user quotas and tree quotas.
152
153 If *default_hard_limit* is not set while creation of filesystem, it will be set to ``0B`` by default.
154
155
156 default_soft_limit (optional, int, None)
157 Default soft limit for user quotas and tree quotas.
158
159 If *default_soft_limit* is not set while creation of filesystem, it will be set to ``0B`` by default.
160
161
162 is_user_quota_enabled (optional, bool, None)
163 Indicates whether the user quota is enabled.
164
165 If *is_user_quota_enabled* is not set while creation of filesystem, it will be set to ``false`` by default.
166
167 Parameters *is_user_quota_enabled* and *quota_policy* are mutually exclusive.
168
169
170 quota_policy (optional, str, None)
171 Quota policy set in quota configuration.
172
173 If *quota_policy* is not set while creation of filesystem, it will be set to ``FILE_SIZE`` by default.
174
175 Parameters *is_user_quota_enabled* and *quota_policy* are mutually exclusive.
176
177
178 cap_unit (optional, str, None)
179 Unit of *default_soft_limit* and *default_hard_limit* size.
180
181 Default unit is ``GB``.
182
183
184
185 state (True, str, None)
186 State variable to determine whether filesystem will exist or not.
187
188
189 snap_schedule_name (optional, str, None)
190 This is the name of an existing snapshot schedule which is to be associated with the filesystem.
191
192 This is mutually exclusive with *snapshot_schedule_id*.
193
194
195 snap_schedule_id (optional, str, None)
196 This is the id of an existing snapshot schedule which is to be associated with the filesystem.
197
198 This is mutually exclusive with *snapshot_schedule_name*.
199
200
201 replication_params (optional, dict, None)
202 Settings required for enabling or modifying replication.
203
204
205 replication_name (optional, str, None)
206 Name of the replication session.
207
208
209 new_replication_name (optional, str, None)
210 Replication name to rename the session to.
211
212
213 replication_mode (optional, str, None)
214 The replication mode.
215
216 This is a mandatory field while creating a replication session.
217
218
219 rpo (optional, int, None)
220 Maximum time to wait before the system syncs the source and destination LUNs.
221
222 The *rpo* option should be specified if the *replication_mode* is ``asynchronous``.
223
224 The value should be in range of ``5`` to ``1440`` for ``asynchronous``, ``0`` for ``synchronous`` and ``-1`` for ``manual``.
225
226
227 replication_type (optional, str, None)
228 Type of replication.
229
230
231 remote_system (optional, dict, None)
232 Details of remote system to which the replication is being configured.
233
234 The *remote_system* option should be specified if the *replication_type* is ``remote``.
235
236
237 remote_system_host (True, str, None)
238 IP or FQDN for remote Unity unisphere Host.
239
240
241 remote_system_username (True, str, None)
242 User name of remote Unity unisphere Host.
243
244
245 remote_system_password (True, str, None)
246 Password of remote Unity unisphere Host.
247
248
249 remote_system_verifycert (optional, bool, True)
250 Boolean variable to specify whether or not to validate SSL certificate of remote Unity unisphere Host.
251
252 ``true`` - Indicates that the SSL certificate should be verified.
253
254 ``false`` - Indicates that the SSL certificate should not be verified.
255
256
257 remote_system_port (optional, int, 443)
258 Port at which remote Unity unisphere is hosted.
259
260
261
262 destination_pool_id (optional, str, None)
263 ID of pool to allocate destination filesystem.
264
265
266 destination_pool_name (optional, str, None)
267 Name of pool to allocate destination filesystem.
268
269
270
271 replication_state (optional, str, None)
272 State of the replication.
273
274
275 unispherehost (True, str, None)
276 IP or FQDN of the Unity management server.
277
278
279 username (True, str, None)
280 The username of the Unity management server.
281
282
283 password (True, str, None)
284 The password of the Unity management server.
285
286
287 validate_certs (optional, bool, True)
288 Boolean variable to specify whether or not to validate SSL certificate.
289
290 ``true`` - Indicates that the SSL certificate should be verified.
291
292 ``false`` - Indicates that the SSL certificate should not be verified.
293
294
295 port (optional, int, 443)
296 Port number through which communication happens with Unity management server.
297
298
299
300
301
302 Notes
303 -----
304
305 .. note::
306 - SMB shares, NFS exports, and snapshots associated with filesystem need to be deleted prior to deleting a filesystem.
307 - The *quota_config* parameter can be used to update default hard limit and soft limit values to limit the maximum space that can be used. By default they both are set to 0 during filesystem creation which means unlimited.
308 - The *check_mode* is not supported.
309 - The modules present in this collection named as 'dellemc.unity' are built to support the Dell Unity storage platform.
310
311
312
313
314 Examples
315 --------
316
317 .. code-block:: yaml+jinja
318
319
320 - name: Create FileSystem
321 filesystem:
322 unispherehost: "{{unispherehost}}"
323 username: "{{username}}"
324 password: "{{password}}"
325 validate_certs: "{{validate_certs}}"
326 filesystem_name: "ansible_test_fs"
327 nas_server_name: "lglap761"
328 pool_name: "pool_1"
329 size: 5
330 state: "present"
331
332 - name: Create FileSystem with quota configuration
333 filesystem:
334 unispherehost: "{{unispherehost}}"
335 username: "{{username}}"
336 password: "{{password}}"
337 validate_certs: "{{validate_certs}}"
338 filesystem_name: "ansible_test_fs"
339 nas_server_name: "lglap761"
340 pool_name: "pool_1"
341 size: 5
342 quota_config:
343 grace_period: 8
344 grace_period_unit: "days"
345 default_soft_limit: 10
346 is_user_quota_enabled: False
347 state: "present"
348
349 - name: Expand FileSystem size
350 filesystem:
351 unispherehost: "{{unispherehost}}"
352 username: "{{username}}"
353 password: "{{password}}"
354 validate_certs: "{{validate_certs}}"
355 filesystem_name: "ansible_test_fs"
356 nas_server_name: "lglap761"
357 size: 10
358 state: "present"
359
360 - name: Expand FileSystem size
361 filesystem:
362 unispherehost: "{{unispherehost}}"
363 username: "{{username}}"
364 password: "{{password}}"
365 validate_certs: "{{validate_certs}}"
366 filesystem_name: "ansible_test_fs"
367 nas_server_name: "lglap761"
368 size: 10
369 state: "present"
370
371 - name: Modify FileSystem smb_properties
372 filesystem:
373 unispherehost: "{{unispherehost}}"
374 username: "{{username}}"
375 password: "{{password}}"
376 validate_certs: "{{validate_certs}}"
377 filesystem_name: "ansible_test_fs"
378 nas_server_name: "lglap761"
379 smb_properties:
380 is_smb_op_locks_enabled: True
381 smb_notify_on_change_dir_depth: 5
382 is_smb_notify_on_access_enabled: True
383 state: "present"
384
385 - name: Modify FileSystem Snap Schedule
386 filesystem:
387 unispherehost: "{{unispherehost}}"
388 username: "{{username}}"
389 password: "{{password}}"
390 validate_certs: "{{validate_certs}}"
391 filesystem_id: "fs_141"
392 snap_schedule_id: "{{snap_schedule_id}}"
393 state: "{{state_present}}"
394
395 - name: Get details of FileSystem using id
396 filesystem:
397 unispherehost: "{{unispherehost}}"
398 username: "{{username}}"
399 password: "{{password}}"
400 validate_certs: "{{validate_certs}}"
401 filesystem_id: "rs_405"
402 state: "present"
403
404 - name: Delete a FileSystem using id
405 filesystem:
406 unispherehost: "{{unispherehost}}"
407 username: "{{username}}"
408 password: "{{password}}"
409 validate_certs: "{{validate_certs}}"
410 filesystem_id: "rs_405"
411 state: "absent"
412
413 - name: Enable replication on the fs
414 filesystem:
415 unispherehost: "{{unispherehost}}"
416 username: "{{username}}"
417 password: "{{password}}"
418 validate_certs: "{{validate_certs}}"
419 filesystem_id: "rs_405"
420 replication_params:
421 replication_name: "test_repl"
422 replication_type: "remote"
423 replication_mode: "asynchronous"
424 rpo: 60
425 remote_system:
426 remote_system_host: '0.1.2.3'
427 remote_system_verifycert: False
428 remote_system_username: 'username'
429 remote_system_password: 'password'
430 destination_pool_name: "pool_test_1"
431 replication_state: "enable"
432 state: "present"
433
434 - name: Modify replication on the fs
435 filesystem:
436 unispherehost: "{{unispherehost}}"
437 username: "{{username}}"
438 password: "{{password}}"
439 validate_certs: "{{validate_certs}}"
440 filesystem_id: "rs_405"
441 replication_params:
442 replication_name: "test_repl"
443 new_replication_name: "test_repl_updated"
444 replication_mode: "asynchronous"
445 rpo: 50
446 replication_state: "enable"
447 state: "present"
448
449 - name: Disable replication on the fs
450 filesystem:
451 unispherehost: "{{unispherehost}}"
452 username: "{{username}}"
453 password: "{{password}}"
454 validate_certs: "{{validate_certs}}"
455 filesystem_id: "rs_405"
456 replication_state: "disable"
457 state: "present"
458
459 - name: Disable replication by specifying replication_name on the fs
460 filesystem:
461 unispherehost: "{{unispherehost}}"
462 username: "{{username}}"
463 password: "{{password}}"
464 validate_certs: "{{validate_certs}}"
465 filesystem_id: "rs_405"
466 replication_params:
467 replication_name: "test_replication"
468 replication_state: "disable"
469 state: "present"
470
471
472
473 Return Values
474 -------------
475
476 changed (always, bool, True)
477 Whether or not the resource has changed.
478
479
480 filesystem_details (When filesystem exists, dict, {'access_policy': 'AccessPolicyEnum.UNIX', 'cifs_notify_on_change_dir_depth': 512, 'cifs_share': None, 'data_reduction_percent': 0, 'data_reduction_ratio': 1.0, 'data_reduction_size_saved': 0, 'description': '', 'existed': True, 'folder_rename_policy': 'FSRenamePolicyEnum.SMB_RENAME_FORBIDDEN', 'format': 'FSFormatEnum.UFS64', 'hash': 8735427610152, 'health': {'UnityHealth': {'hash': 8735427614928}}, 'host_io_size': 'HostIOSizeEnum.GENERAL_8K', 'id': 'fs_65916', 'is_advanced_dedup_enabled': False, 'is_cifs_notify_on_access_enabled': False, 'is_cifs_notify_on_write_enabled': False, 'is_cifs_op_locks_enabled': False, 'is_cifs_sync_writes_enabled': False, 'is_data_reduction_enabled': False, 'is_read_only': False, 'is_smbca': False, 'is_thin_enabled': True, 'locking_policy': 'FSLockingPolicyEnum.MANDATORY', 'metadata_size': 11274289152, 'metadata_size_allocated': 4294967296, 'min_size_allocated': 0, 'name': 'test_fs', 'nas_server': {'id': 'nas_18', 'name': 'test_nas1'}, 'nfs_share': None, 'per_tier_size_used': [6979321856, 0, 0], 'pool': {'id': 'pool_7', 'name': 'pool 7'}, 'pool_full_policy': 'ResourcePoolFullPolicyEnum.FAIL_WRITES', 'quota_config': {'default_hard_limit': '0B', 'default_soft_limit': '0B', 'grace_period': '7.0 days', 'id': 'quotaconfig_171798760421_0', 'is_user_quota_enabled': False, 'quota_policy': 'QuotaPolicyEnum.FILE_SIZE'}, 'replication_sessions': {'current_transfer_est_remain_time': 0, 'id': '***', 'last_sync_time': '2022-05-12 11:20:38+00:00', 'local_role': 'ReplicationSessionReplicationRoleEnum.SOURCE', 'max_time_out_of_sync': 60, 'members': None, 'name': 'local_repl_new', 'network_status': 'ReplicationSessionNetworkStatusEnum.OK', 'remote_system': {'UnityRemoteSystem': {'hash': 8735426929707}}, 'replication_resource_type': 'ReplicationEndpointResourceTypeEnum.FILESYSTEM', 'src_resource_id': 'res_66444', 'src_status': 'ReplicationSessionStatusEnum.OK', 'status': 'ReplicationOpStatusEnum.AUTO_SYNC_CONFIGURED', 'sync_progress': 0, 'sync_state': 'ReplicationSessionSyncStateEnum.IDLE'}, 'size_allocated': 283148288, 'size_allocated_total': 4578148352, 'size_preallocated': 2401173504, 'size_total': 10737418240, 'size_total_with_unit': '10.0 GB', 'size_used': 1620312064, 'snap_count': 2, 'snaps_size': 21474869248, 'snaps_size_allocated': 32768, 'snapshots': [], 'supported_protocols': 'FSSupportedProtocolEnum.NFS', 'tiering_policy': 'TieringPolicyEnum.AUTOTIER_HIGH', 'type': 'FilesystemTypeEnum.FILESYSTEM'})
481 Details of the filesystem.
482
483
484 id (, str, )
485 The system generated ID given to the filesystem.
486
487
488 name (, str, )
489 Name of the filesystem.
490
491
492 description (, str, )
493 Description about the filesystem.
494
495
496 is_data_reduction_enabled (, bool, )
497 Whether or not compression enabled on this filesystem.
498
499
500 size_total_with_unit (, str, )
501 Size of the filesystem with actual unit.
502
503
504 tiering_policy (, str, )
505 Tiering policy applied to this filesystem.
506
507
508 is_cifs_notify_on_access_enabled (, bool, )
509 Indicates whether the system generates a notification when a user accesses the file system.
510
511
512 is_cifs_notify_on_write_enabled (, bool, )
513 Indicates whether the system generates a notification when the file system is written to.
514
515
516 is_cifs_op_locks_enabled (, bool, )
517 Indicates whether opportunistic file locks are enabled for the file system.
518
519
520 is_cifs_sync_writes_enabled (, bool, )
521 Indicates whether the CIFS synchronous writes option is enabled for the file system.
522
523
524 cifs_notify_on_change_dir_depth (, int, )
525 Indicates the lowest directory level to which the enabled notifications apply, if any.
526
527
528 pool (, dict, )
529 The pool in which this filesystem is allocated.
530
531
532 id (, str, )
533 The system ID given to the pool.
534
535
536 name (, str, )
537 The name of the storage pool.
538
539
540
541 nas_server (, dict, )
542 The NAS Server details on which this filesystem is hosted.
543
544
545 id (, str, )
546 The system ID given to the NAS Server.
547
548
549 name (, str, )
550 The name of the NAS Server.
551
552
553
554 snapshots (, list, )
555 The list of snapshots of this filesystem.
556
557
558 id (, str, )
559 The system ID given to the filesystem snapshot.
560
561
562 name (, str, )
563 The name of the filesystem snapshot.
564
565
566
567 is_thin_enabled (, bool, )
568 Indicates whether thin provisioning is enabled for this filesystem.
569
570
571 snap_schedule_id (, str, )
572 Indicates the id of the snap schedule associated with the filesystem.
573
574
575 snap_schedule_name (, str, )
576 Indicates the name of the snap schedule associated with the filesystem.
577
578
579 quota_config (, dict, )
580 Details of quota configuration of the filesystem created.
581
582
583 grace_period (, str, )
584 Grace period set in quota configuration after soft limit is reached.
585
586
587 default_hard_limit (, int, )
588 Default hard limit for user quotas and tree quotas.
589
590
591 default_soft_limit (, int, )
592 Default soft limit for user quotas and tree quotas.
593
594
595 is_user_quota_enabled (, bool, )
596 Indicates whether the user quota is enabled.
597
598
599 quota_policy (, str, )
600 Quota policy set in quota configuration.
601
602
603
604 replication_sessions (, dict, )
605 List of replication sessions if replication is enabled.
606
607
608 id (, str, )
609 ID of replication session
610
611
612 name (, str, )
613 Name of replication session
614
615
616 remote_system (, dict, )
617 Remote system
618
619
620 id (, str, )
621 ID of remote system
622
623
624
625
626
627
628
629
630 Status
631 ------
632
633
634
635
636
637 Authors
638 ~~~~~~~
639
640 - Arindam Datta (@dattaarindam) <[email protected]>
641 - Meenakshi Dembi (@dembim) <[email protected]>
642 - Spandita Panigrahi (@panigs7) <[email protected]>
643