Environment
- OS: Ubuntu 24.04 LTS
- FS: ext4
Issue/error
/var/log/kern.log
2025-11-10T00:42:38.282302+02:00 ubuntu24 kernel: critical target error, dev sda, sector 4136 op 0x3:(DISCARD) flags 0x0 phys_seg 1 prio class 0
Diagnostic steps
$ systemctl status fstrim.timer
● fstrim.timer - Discard unused filesystem blocks once a week
Loaded: loaded (/usr/lib/systemd/system/fstrim.timer; enabled; preset: enabled)
Active: active (waiting) since Sat 2025-11-01 10:43:34 EET; 1 week 1 day ago
Trigger: Mon 2025-11-17 00:23:59 EET; 6 days left
Triggers: ● fstrim.service
Docs: man:fstrim
$ systemctl status fstrim.service
× fstrim.service - Discard unused blocks on filesystems from /etc/fstab
Loaded: loaded (/usr/lib/systemd/system/fstrim.service; static)
Active: failed (Result: exit-code) since Mon 2025-11-10 00:42:38 EET; 9h ago
TriggeredBy: ● fstrim.timer
Docs: man:fstrim(8)
Process: 414127 ExecStart=/sbin/fstrim --listed-in /etc/fstab:/proc/self/mountinfo --verbose --quiet-unsupported (code=exited, status=64)
Main PID: 414127 (code=exited, status=64)
CPU: 60ms
Nov 10 00:42:38 hostname fstrim[414127]: /: 228.2 MiB (239288320 bytes) trimmed on /dev/disk/by-id/dm-uuid-LVM-6vai0diuJQbxDh7jYnSwuAwJ63RcGeBv2mrDm9GTSHJxnScU9RwasgZ8fP7SQx1C
Nov 10 00:42:38 hostname systemd[1]: fstrim.service: Main process exited, code=exited, status=64/USAGE
Nov 10 00:42:38 hostname systemd[1]: fstrim.service: Failed with result 'exit-code'.
Nov 10 00:42:38 hostname systemd[1]: Failed to start fstrim.service - Discard unused blocks on filesystems from /etc/fstab.
Resolution
$ systemctl restart fstrim.service
$ systemctl status fstrim.service
○ fstrim.service - Discard unused blocks on filesystems from /etc/fstab
Loaded: loaded (/usr/lib/systemd/system/fstrim.service; static)
Active: inactive (dead) since Mon 2025-11-10 10:06:59 EET; 23s ago
TriggeredBy: ● fstrim.timer
Docs: man:fstrim(8)
Process: 433094 ExecStart=/sbin/fstrim --listed-in /etc/fstab:/proc/self/mountinfo --verbose --quiet-unsupported (code=exited, status=0/SUCCESS)
Main PID: 433094 (code=exited, status=0/SUCCESS)
CPU: 49ms
Nov 10 10:06:59 hostname[433094]: /: 1.8 MiB (1847296 bytes) trimmed on /dev/disk/by-id/dm-uuid-LVM-6vai0diuJQbxDh7jYnSwuAwJ63RcGeBv2mrDm9GTSHJxnScU9RwasgZ8fP7SQx1C
Nov 10 10:06:59 hostname systemd[1]: fstrim.service: Deactivated successfully.
Nov 10 10:06:59 hostname systemd[1]: Finished fstrim.service - Discard unused blocks on filesystems from /etc/fstab.