fstrim "the discard operation is not supported" with ext4 on LVM
5,322
Turns out there was a LVM snapshot of the root filesystem's LV, but not the other. Appears snapshots block TRIM, because the device-mapper snapshot target doesn't support it.
Related videos on Youtube
Author by
derobert
Updated on September 18, 2022Comments
-
derobert almost 2 years
Attempting to run fstrim on my root partition (which is ext4 on a LVM logical volume, single physical volume—an SSD supporting TRIM) produces an error:
fstrim -v / fstrim: /: the discard operation is not supported
However, running it on a different LV in the same single-PV volume group works just fine. Mount options for both (according to
/proc/mounts
) are the same:rw,relatime,errors=remount-ro,data=ordered
.issue_discards = 1
is set inlvm.conf
, if that matters.Why would only one of them support trimming?