Do any software RAID solutions support the TRIM command?

Not yet, no, at least as far as I'm aware.

The issue is the disconnect between the filesystem layer and the LVM systems used to handle the software RAID - generally they abstract away the type of device from the filesystem so it doesn't know to use TRIM.

The first people to support it in software will probably with Sun with ZFS, which doesn't have a traditional LVM layer but instead operates as a unified pool. They're already working on TRIM support being added to ZFS, when it happens I think it'll work across all the ZFS functionality including software RAID.


You can use my MDTRIM script ( https://github.com/Cyberax/mdtrim/ ) to TRIM empty space on ext4/3 level-1 RAIDs. We start it periodically from cron and it works great for us.

Adding support for other RAID levels is possible, but I don't have time (or need) for that.


SoftRAID 4.3 for OS X, a $129 third-party software RAID, now supports TRIM on striped arrays:

The SoftRAID driver now supports TRIM commands for all brands of SSDs when running under Lion (Mac OS X 10.7). This can dramatically increase the useful life of SSDs. Unlike most other RAID solutions, SoftRAID even supports TRIM on stripe volumes (RAID 0). Support for TRIM commands can be disabled in the SoftRAID preferences.

As far as I can tell (this is notoriously hard to verify), OS X's builtin software RAID doesn't handle TRIM.

Edit: verified with dtrace that builtin SW RAID doesn't call TRIM-related functions.