We've been running an SSD (Intel X25-M) in a Linux (RHEL 5) server for a while, but never made any effort to figure out how much write load it was under for the past year. Is there any tool under Linux to tell us approximately how much has been written to the disk over time or (even better) how much wear it has accumulated? Just looking for a hint to see if it's near death or not...
Intel SSDs do keep statistics on total writes and how far through it's likely lifespan it is.
The following is from an Intel X25-M G2 160GB (SSDSA2M160G2GC)
The Host_Writes_32MIB raw value shows how many 32MiB units of data have been written to this drive.
The Media_Wearout_Indicator value shows you a normalised percentage of how far through its useful wear-lifespan the drive is. This starts at 100 (or 099, I forget which), and proceeds down to 001, at which point Intel consider the drive to have exceeded its useful life. Intel use the MWI as part of warranty claims too - once the MWI reaches 001, the warranty is expired.
The MWI reaching 001 does not mean the drive will fail immediately however! Intel will have tolerance built in to deal with variances in flash units. I've seen drives last well past this point, and I'm actively wear-testing some Intel 320 series SSDs to see how much longer they last.
However, as the warranty expires when the MWI reaches 001, I'd replace any drives at that point.
Not really. If the drive doesn't keep statistics, you wouldn't know for sure. Even then the drive would abstract the write-leveling algorithms and such to try to optimize things under the hood, away from the system calls and interfaces. In other words, the drive could easily lie to you about where the data is actually written on the "media" so you wouldn't know what cells are getting activity.
That still doesn't guarantee when/if you'll see failures or errors. Drive could fail tomorrow, could fail in three years.
Best bet is to keep it in a RAID configuration and have a plan in place to replace it when it does fail (before the other drive fails) and makes sure your backups are current.
Corsair drives also export a similar percentage-life-left indicator. In their case it is attribute 231:
(Note that if smartctl is displaying this as a Temperature you need to update your device database. On my Debian system that means running
A Corsair blog post seems to show that the value never goes below 10% so I presume it should be replaced at 10%.
I also have an OCZ drive with the same Sandforce controller which also exports the same SSD_Life_Left value.
The Media_Wearout_Indicator is what you are looking for. For 100 means your ssd has 100% life, the lower number means less life left.
Output from my laptop
If you want to see more details and full attributes from your drive, you can run
and the output