dellemc.unity.filesystem module – Manage filesystem on Unity storage system
Note
This module is part of the dellemc.unity collection (version 1.7.1).
You might already have this collection installed if you are using the ansible
package.
It is not included in ansible-core
.
To check whether it is installed, run ansible-galaxy collection list
.
To install it, use: ansible-galaxy collection install dellemc.unity
.
You need further requirements to be able to use this module,
see Requirements for details.
To use it in a playbook, specify: dellemc.unity.filesystem
.
New in dellemc.unity 1.1.0
Synopsis
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.
Aliases: dellemc_unity_filesystem
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
Parameter |
Comments |
---|---|
Access policy of a filesystem. Choices:
|
|
The unit of the filesystem size. It defaults to Choices:
|
|
Boolean variable, specifies whether or not to enable compression. Compression is supported only for thin filesystem. Choices:
|
|
Description about the filesystem. Description can be removed by passing empty string (“”). |
|
The id of the filesystem. It can be used only for get, modify, or delete operations. It is mutually exclusive with filesystem_name. |
|
The name of the filesystem. Mandatory only for the create operation. All the operations are supported through filesystem_name. It is mutually exclusive with filesystem_id. |
|
Boolean variable, specifies whether or not it is a thin filesystem. Choices:
|
|
File system locking policies. These policy choices control whether the NFSv4 range locks must be honored. Choices:
|
|
ID of the NAS server on which filesystem will be hosted. |
|
Name of the NAS server on which filesystem will be hosted. |
|
The password of the Unity management server. |
|
This is the ID of the pool where the filesystem will be created. Either the pool_name or pool_id must be provided to create a new filesystem. |
|
This is the name of the pool where the filesystem will be created. Either the pool_name or pool_id must be provided to create a new filesystem. |
|
Port number through which communication happens with Unity management server. Default: |
|
Configuration for quota management. It contains optional parameters. |
|
Unit of default_soft_limit and default_hard_limit size. Default unit is Choices:
|
|
Default hard limit for user quotas and tree quotas. If default_hard_limit is not set while creation of filesystem, it will be set to |
|
Default soft limit for user quotas and tree quotas. If default_soft_limit is not set while creation of filesystem, it will be set to |
|
Grace period set in quota configuration after soft limit is reached. If grace_period is not set during creation of filesystem, it will be set to |
|
Unit of grace period. Default unit is Choices:
|
|
Indicates whether the user quota is enabled. If is_user_quota_enabled is not set while creation of filesystem, it will be set to Parameters is_user_quota_enabled and quota_policy are mutually exclusive. Choices:
|
|
Quota policy set in quota configuration. If quota_policy is not set while creation of filesystem, it will be set to Parameters is_user_quota_enabled and quota_policy are mutually exclusive. Choices:
|
|
Settings required for enabling or modifying replication. |
|
ID of pool to allocate destination filesystem. |
|
Name of pool to allocate destination filesystem. |
|
Replication name to rename the session to. |
|
Details of remote system to which the replication is being configured. The remote_system option should be specified if the replication_type is |
|
IP or FQDN for remote Unity unisphere Host. |
|
Password of remote Unity unisphere Host. |
|
Port at which remote Unity unisphere is hosted. Default: |
|
User name of remote Unity unisphere Host. |
|
Boolean variable to specify whether or not to validate SSL certificate of remote Unity unisphere Host.
Choices:
|
|
The replication mode. This is a mandatory field while creating a replication session. Choices:
|
|
Name of the replication session. |
|
Type of replication. Choices:
|
|
Maximum time to wait before the system syncs the source and destination LUNs. The rpo option should be specified if the replication_mode is The value should be in range of |
|
State of the replication. Choices:
|
|
The size of the filesystem. |
|
Advance settings for SMB. It contains optional candidate variables. |
|
Indicates whether notifications of changes to directory file structure are enabled. Choices:
|
|
Indicates whether file write notifications are enabled on the file system. Choices:
|
|
Indicates whether opportunistic file locking is enabled on the file system. Choices:
|
|
Indicates whether the synchronous writes option is enabled on the file system. Choices:
|
|
Integer variable, determines the lowest directory level to which the enabled notifications apply. Minimum value is |
|
This is the id of an existing snapshot schedule which is to be associated with the filesystem. This is mutually exclusive with snapshot_schedule_name. |
|
This is the name of an existing snapshot schedule which is to be associated with the filesystem. This is mutually exclusive with snapshot_schedule_id. |
|
State variable to determine whether filesystem will exist or not. Choices:
|
|
Protocols supported by the file system. It will be overridden by NAS server configuration if NAS Server is Choices:
|
|
Tiering policy choices for how the storage resource data will be distributed among the tiers available in the pool. Choices:
|
|
IP or FQDN of the Unity management server. |
|
The username of the Unity management server. |
|
Boolean variable to specify whether or not to validate SSL certificate.
Choices:
|
Notes
Note
SMB shares, NFS exports, and snapshots associated with filesystem need to be deleted prior to deleting a filesystem.
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.
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
- name: Create FileSystem
dellemc.unity.filesystem:
unispherehost: "{{unispherehost}}"
username: "{{username}}"
password: "{{password}}"
validate_certs: "{{validate_certs}}"
filesystem_name: "ansible_test_fs"
nas_server_name: "lglap761"
pool_name: "pool_1"
size: 5
state: "present"
- name: Create FileSystem with quota configuration
dellemc.unity.filesystem:
unispherehost: "{{unispherehost}}"
username: "{{username}}"
password: "{{password}}"
validate_certs: "{{validate_certs}}"
filesystem_name: "ansible_test_fs"
nas_server_name: "lglap761"
pool_name: "pool_1"
size: 5
quota_config:
grace_period: 8
grace_period_unit: "days"
default_soft_limit: 10
is_user_quota_enabled: false
state: "present"
- name: Expand FileSystem size
dellemc.unity.filesystem:
unispherehost: "{{unispherehost}}"
username: "{{username}}"
password: "{{password}}"
validate_certs: "{{validate_certs}}"
filesystem_name: "ansible_test_fs"
nas_server_name: "lglap761"
size: 10
state: "present"
- name: Expand FileSystem size
dellemc.unity.filesystem:
unispherehost: "{{unispherehost}}"
username: "{{username}}"
password: "{{password}}"
validate_certs: "{{validate_certs}}"
filesystem_name: "ansible_test_fs"
nas_server_name: "lglap761"
size: 10
state: "present"
- name: Modify FileSystem smb_properties
dellemc.unity.filesystem:
unispherehost: "{{unispherehost}}"
username: "{{username}}"
password: "{{password}}"
validate_certs: "{{validate_certs}}"
filesystem_name: "ansible_test_fs"
nas_server_name: "lglap761"
smb_properties:
is_smb_op_locks_enabled: true
smb_notify_on_change_dir_depth: 5
is_smb_notify_on_access_enabled: true
state: "present"
- name: Modify FileSystem Snap Schedule
dellemc.unity.filesystem:
unispherehost: "{{unispherehost}}"
username: "{{username}}"
password: "{{password}}"
validate_certs: "{{validate_certs}}"
filesystem_id: "fs_141"
snap_schedule_id: "{{snap_schedule_id}}"
state: "{{state_present}}"
- name: Get details of FileSystem using id
dellemc.unity.filesystem:
unispherehost: "{{unispherehost}}"
username: "{{username}}"
password: "{{password}}"
validate_certs: "{{validate_certs}}"
filesystem_id: "rs_405"
state: "present"
- name: Delete a FileSystem using id
dellemc.unity.filesystem:
unispherehost: "{{unispherehost}}"
username: "{{username}}"
password: "{{password}}"
validate_certs: "{{validate_certs}}"
filesystem_id: "rs_405"
state: "absent"
- name: Enable replication on the fs
dellemc.unity.filesystem:
unispherehost: "{{unispherehost}}"
username: "{{username}}"
password: "{{password}}"
validate_certs: "{{validate_certs}}"
filesystem_id: "rs_405"
replication_params:
replication_name: "test_repl"
replication_type: "remote"
replication_mode: "asynchronous"
rpo: 60
remote_system:
remote_system_host: '0.1.2.3'
remote_system_verifycert: false
remote_system_username: 'username'
remote_system_password: 'password'
destination_pool_name: "pool_test_1"
replication_state: "enable"
state: "present"
- name: Modify replication on the fs
dellemc.unity.filesystem:
unispherehost: "{{unispherehost}}"
username: "{{username}}"
password: "{{password}}"
validate_certs: "{{validate_certs}}"
filesystem_id: "rs_405"
replication_params:
replication_name: "test_repl"
new_replication_name: "test_repl_updated"
replication_mode: "asynchronous"
rpo: 50
replication_state: "enable"
state: "present"
- name: Disable replication on the fs
dellemc.unity.filesystem:
unispherehost: "{{unispherehost}}"
username: "{{username}}"
password: "{{password}}"
validate_certs: "{{validate_certs}}"
filesystem_id: "rs_405"
replication_state: "disable"
state: "present"
- name: Disable replication by specifying replication_name on the fs
dellemc.unity.filesystem:
unispherehost: "{{unispherehost}}"
username: "{{username}}"
password: "{{password}}"
validate_certs: "{{validate_certs}}"
filesystem_id: "rs_405"
replication_params:
replication_name: "test_replication"
replication_state: "disable"
state: "present"
Return Values
Common return values are documented here, the following are the fields unique to this module:
Key |
Description |
---|---|
Whether or not the resource has changed. Returned: always Sample: |
|
Details of the filesystem. Returned: When filesystem exists Sample: |
|
Indicates the lowest directory level to which the enabled notifications apply, if any. Returned: success |
|
Description about the filesystem. Returned: success |
|
The system generated ID given to the filesystem. Returned: success |
|
Indicates whether the system generates a notification when a user accesses the file system. Returned: success |
|
Indicates whether the system generates a notification when the file system is written to. Returned: success |
|
Indicates whether opportunistic file locks are enabled for the file system. Returned: success |
|
Indicates whether the CIFS synchronous writes option is enabled for the file system. Returned: success |
|
Whether or not compression enabled on this filesystem. Returned: success |
|
Indicates whether thin provisioning is enabled for this filesystem. Returned: success |
|
Name of the filesystem. Returned: success |
|
The NAS Server details on which this filesystem is hosted. Returned: success |
|
The system ID given to the NAS Server. Returned: success |
|
The name of the NAS Server. Returned: success |
|
The pool in which this filesystem is allocated. Returned: success |
|
The system ID given to the pool. Returned: success |
|
The name of the storage pool. Returned: success |
|
Details of quota configuration of the filesystem created. Returned: success |
|
Default hard limit for user quotas and tree quotas. Returned: success |
|
Default soft limit for user quotas and tree quotas. Returned: success |
|
Grace period set in quota configuration after soft limit is reached. Returned: success |
|
Indicates whether the user quota is enabled. Returned: success |
|
Quota policy set in quota configuration. Returned: success |
|
List of replication sessions if replication is enabled. Returned: success |
|
ID of replication session Returned: success |
|
Name of replication session Returned: success |
|
Remote system Returned: success |
|
ID of remote system Returned: success |
|
Size of the filesystem with actual unit. Returned: success |
|
Indicates the id of the snap schedule associated with the filesystem. Returned: success |
|
Indicates the name of the snap schedule associated with the filesystem. Returned: success |
|
The list of snapshots of this filesystem. Returned: success |
|
The system ID given to the filesystem snapshot. Returned: success |
|
The name of the filesystem snapshot. Returned: success |
|
Tiering policy applied to this filesystem. Returned: success |