This is a broad question -- I'm not asking about a particular RAID level or OS.
4 Answers
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.
- 1,705
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.
- 265
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.
- 111
I'll guess a qualified Yes. As all software raid on the windows side treats the drive as a single drive. Only the volume is treated like RAID.
You would have to be sure to plug the drive into a drive controller that doesn't have BMC or RAID support. Essentially if speedfan, hdtune, and such can see SMART data I would expect the Trim command to make it to the drive.
Windows 7 and Windows Server 2008 R2 support Trim. That would mean software RAID 0, 1, or 5 could support trim if I'm right.
That leaves Server 2008 32bit, Server 2008 64 bit (not R2), Server 2003 (all versions) out on this. Doubly so for Vista and XP which can't create software RAID volumes.
Unfortunately on the Windows side of things RAID 10 is not supported as a fully software based raid level. You would have to do RAID 0 or 1 in hardware and then stripe or mirror as needed on the software side to get the 1+0 or 0+1 array you truly wanted and at that point no TRIM support would apply just as if you did RAID 10 entirely in hardware.
In addition many hardware raid controllers will be slower than software RAID with SSDs. See http://it.anandtech.com/IT/showdoc.aspx?i=3532&p=9 for benchmarks showing this concept.
- 1,262