Red Hat Training

A Red Hat training course is available for RHEL 8

Chapter 38. Enabling online block discard using RHEL System Roles

This section describes how to enable online block discard using the storage role.


  • An Ansible playbook including the storage role exists.

38.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 38.1. A playbook that enables online block discard on /mnt/data/

- hosts: all
      - name: barefs
        type: disk
          - sdb
        fs_type: xfs
        mount_point: /mnt/data
        mount_options: discard

Additional resources

38.2. Additional resources