--- description: >- TRIM policy optimization for the mw-pfeddersheim-workstation after the Samsung PM9A1 firmware update to GXA7801Q. tags: - storage - trim - nvme - ansible - optimization last_updated: '2026-04-02' --- # TRIM Optimization After PM9A1 Firmware Update ## Summary On 2026-04-02 the workstation TRIM policy was aligned with current Linux best practice for ext4. - Root filesystem (`/`) on `/dev/nvme0n1p2` was changed from `noatime,discard` to `noatime` in `/etc/fstab` - Weekly `fstrim.timer` remains enabled and active - Continuous ext4 discard was disabled at runtime with a remount using `nodiscard` ## Why This Change Was Necessary The root ext4 filesystem was configured with continuous `discard` while the system already had periodic TRIM enabled via `fstrim.timer`. For ext4, continuous discard adds overhead to unlink and truncate operations. With a healthy weekly `fstrim.timer`, it is redundant on this workstation. ## Implementation The persistent change was implemented in Ansible. - `ansible/vars/main.yml` - added `root_filesystem_uuid` - added `root_filesystem_mount_opts: noatime` - `ansible/roles/common/tasks/main.yml` - ensured the root fstab entry is managed with `mount: state=present` - checked current root mount options with `findmnt` - remounted `/` without continuous discard when needed ## Verification ### fstab ```text UUID=2aeade2e-b169-4964-8cbd-bb7356320b51 / ext4 noatime 0 1 ``` ### Periodic TRIM ```text ActiveState=active UnitFileState=enabled NextElapseUSecRealtime=Mon 2026-04-06 00:49:28 CEST ``` ### Validation Steps ```text ansible-playbook ansible/workstation.yml --check --tags trim ansible-playbook ansible/workstation.yml --tags trim findmnt --verify --tab-file /etc/fstab ``` ## Notes - `/boot/efi` remains unchanged - This change only targets the ext4 root filesystem TRIM policy - Firmware and benchmark documentation remain in the NVMe benchmark documents