[kwlug-disc] SSDs and TRIM

Chris Irwin chris at chrisirwin.ca
Thu Apr 29 12:10:04 EDT 2010


I just ordered my birthday present: A Solid-State Disk. I made sure I
got one with TRIM support to try and prevent the performance
degredation seen with earlier SSDs. Now, TRIM isn't part of ext4 until
Linux 2.6.34, so I can't actually have live TRIM support at the
filesystem layer, but it appears there is a manual utility that can be
used with offline ext2/3/4 filesystems, and apparently online ext4 as
well. (This is apparently part of hdparm now).

BUT, has anybody been using TRIM on their LVM-backed filesystems? I've
seen "No, can't be done", "Maybe it should work", and "yes, per the
instructions in the forum". Of course the dozens of related forum
threads have dozens of pages to sift through. I've put in a few hours
of reading, but still have no idea what is going on. From what I
understand, ext4's TRIM support won't work with LVM since the DM layer
doesn't currently do the mapping. In theory, the third party TRIM
utilities floating around could do it since they build their own maps
and sector lists. Anybdoy else looked into this?

The problem with LVM being that the filesystem isn't a flat map to a
physical partition, and apparently nobody has done the work to build a
map to redirect TRIM commands.

-- 
Chris Irwin
<chris at chrisirwin.ca>




More information about the kwlug-disc mailing list