Why does fstrim fail on Red Hat Enterprise Linux VMs on VMware hypervisors?
Issue
-
fstrim
fails on VMware guests with messages similar to the following:-
On ext4 filesystems:
fstrim: /path/to/mountpoint: the discard operation is not supported fstrim: /path/to/mountpoint: FITRIM ioctl failed: Input/output error fstrim: /path/to/mountpoint: FITRIM ioctl failed: Operation not supported
-
On XFS filesystems:
fstrim: /path/to/mountpoint: the discard operation is not supported fstrim: /path/to/mountpoint: FITRIM ioctl failed: Input/output error
-
-
The exact error message depends on filesystem type, system state and version.
Environment
- Red Hat Enterprise Linux VM (So far, the problem has been observed in Red Hat Enterprise Linux 6 and 7. However, in theory, it can affect all versions)
- VMware Hypervisors
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.