Chapter 34. Enabling online block discard using RHEL System Roles
This section describes how to enable online block discard using the storage
role.
Prerequisites
-
An Ansible playbook including the
storage
role exists.
34.1. Example Ansible playbook to enable online block discard
This section provides an example Ansible playbook. This playbook applies the storage
role to mount an XFS file system with online block discard enabled.
Example 34.1. A playbook that enables online block discard on /mnt/data/
--- - hosts: all vars: storage_volumes: - name: barefs type: disk disks: - sdb fs_type: xfs mount_point: /mnt/data mount_options: discard roles: - rhel-system-roles.storage
Additional resources
- Example Ansible playbook to persistently mount a file system
-
The
/usr/share/ansible/roles/rhel-system-roles.storage/README.md
file.