filesystem – Local and NFS filesystems management.

Synopsis

This module allows to create, modify and remove local and NFS filesystems.

Requirements

The below requirements are needed on the host that executes this module.

  • AIX

  • Python >= 3.6

  • Privileged user with authorizations: aix.fs.manage.list,aix.fs.manage.create,aix.fs.manage.change,aix.fs.manage.remove,aix.network.nfs.mount

Parameters

filesystem (True, str, None)

Specifies the mount point that is the directory where the file system will be mounted.

state (optional, str, present)

Specifies the action to be performed on the filesystem.

present specifies to create a filesystem if it does not exist, otherwise it changes the attributes of the specified filesystem.

absent specifies to remove a filesystem.

rm_mount_point (optional, bool, False)

When state=absent, specifies to remove the mount directory along with the entry in the filesystem.

attributes (optional, list, None)

When state=present, specifies comma separated ‘attribute=value’ pairs used to create or modify the local filesystem.

Refer to ‘crfs’ AIX command documentation for more details on the supported attributes.

device (optional, str, None)

When state=present, for local filesystem, it specifies the logical volume to use to create the filesystem. If not specified, a new logical volume will be created.

When state=present, for NFS filesystem, it specifies the remote export device to use to create or modify the filesystem.

vg (optional, str, None)

When state=present, specifies an existing volume group.

account_subsystem (optional, str, None)

When state=present, for local filesystems, specifies whether the file system is to be processed by the accounting subsystem.

fs_type (optional, str, jfs2)

Specifies the virtual filesystem type to create the local filesystem.

nfs_soft_mount (optional, bool, False)

Creates a soft mount, which means the system returns an error if the server does not respond.

auto_mount (optional, str, None)

Specifies whether to automatically mount the filesystem at system restart while creating or updating filesystem.

permissions (optional, str, None)

Specifies file system permissions while creation/updation of any filesystem.

rw specifies read-write mode.

ro specifies read-only mode.

mount_group (optional, str, None)

Specifies the mount group to be set/modified for a filesystem.

nfs_server (optional, str, None)

Specifies a Network File System (NFS) server for NFS filesystem.

Notes

Examples

- name: Creation of a JFS2 filesystem
  ibm.power_aix.filesystem:
    state: present
    filesystem: /mnt3
    fs_type: jfs2
    attributes: size=32768,isnapshot='no'
    mount_group: test
    vg: rootvg
- name: Increase size of a filesystem
  ibm.power_aix.filesystem:
    filesystem: /mnt3
    state: present
    attributes: size=+5M
- name: Remove a NFS filesystem
  ibm.power_aix.filesystem:
    filesystem: /mnt
    state: absent
    rm_mount_point: true

Return Values

msg (always, str, )

The execution message.

rc (If the command failed., int, )

The return code.

stdout (If the command failed., str, )

The standard output.

stderr (If the command failed., str, )

The standard error.

Status

  • This module is not guaranteed to have a backwards compatible interface. [preview]

  • This module is maintained by community.

Authors

  • AIX Development Team (@pbfinley1911)