Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I've read that SSD TRIM is now supported in the recent kernels with ext4 too (see How to enable TRIM? ).

Is it OK/safe to enable TRIM when having a) LVM b) RAID1+LVM?


share|improve this question

Device Mapper based RAID e.g. via dmsetup does support TRIM MD raid e.g. via mdadm does not support TRIM.

This might have changed, but a quick grep of the oneiric kernel (git grep REQ_DISCARD drivers/md)doesn't show any specific support in the MD code for discards. It might be worth searching the MD RAID mailing list to see how this has progressed.

Speaking from experience, I am not a big fan of using DM for managing RAID sets, the tools are kinda cumbersome and basic admin tasks are a burden; and so is recovering a failed RAID. If you want to take the plunge I strongly recommend you model the setup in a VM so you can become accustomed with the toolset's ins and outs. BTW, don't get confused by dmraid, that's for fake raid only.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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