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 in lvm.conf, if that matters.

Why would only one of them support trimming?


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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.