I have set up LVM to cache a logical volume (located on an HDD) on a partition of an SSD (in writeback mode if this matters). As far as I can tell, this works correctly and the cache uses all available space.

Now, I am wondering whether this setup issues TRIM command to the SSD and whether issuing such commands is necessary (or reasonable) to extend the SSD's lifetime. I have added discard to the options in /etc/fstab for the cached logical volume's entry. However, I have no idea how this affects the cache partition nor do I have an idea on how to test whether TRIM commands are issued.

  • Why do you suspect trim is being issued?
    – Nils
    Sep 20, 2018 at 17:00
  • @Nils The problem is rather that I suspect no TRIM commands are issued and that this might negatively affect the SSD's lifetime.
    – JPW
    Sep 23, 2018 at 11:58

1 Answer 1


To test it, simply use:

fstrim -v -a

This will trim all your SSD block devices (including cached volumes) and print out how much has been trimmed.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .