I've got an older X25-M that doesn't support trim. If I image the drive, format it, then reimage it, would that restore it to roughly its original R/W speeds?
Intel X25-M G1 (no TRIM) SSD – format and restore just as good as TRIM
ssdtrim
Related Solutions
Consider using ext4
with the journal disabled. See this Ubuntu Forums thread: http://ubuntuforums.org/showthread.php?t=1109698. Also, mount with the noatime
option so that the last access time is not written on every access.
Note that wiper cannot be used because wiper requires TRIM.
Also note that while running without journalling may improve performance and reduce writes to the SSD, it may also increase the chance of data loss if the system crashes. Here is a kernel.org description of the journal, and an excerpt from Bovet and Cesati's
Understanding the Linux kernel, Chapter 17, in which page 29-30 explains the advantage of using journalling. It may also increase the amount it takes to recover from a forced shutdown, as the system will have to perform a full fsck
rather than just replay the journal and roll back any incomplete operations.
Formatting a disk is not always equivalent to performing a manual TRIM on a drive - it depends if the format utility has explicit support for it. The Windows 7 format command does happen to have support for this. As for the difference between quick/full formats on Windows, if you do a quick format, it simply deletes the partition table and file listing. If you do a full format, it also does a full bad sector check (basically the same thing as a quick, format followed by running chkdsk /R
on the new partition).
Does it replace old data with new data or tells it to erase data just like TRIM command without filling anything instead?
AFAIK, nothing is ever actually overwritten. I think the sectors are simply marked as free (unless you do a full format, which as overwrites each sector). Again, this is unless you're using an operating system with explicit TRIM support. From the blog post I linked to above:
Windows 7 requests the Trim operation for more than just file delete operations. The Trim operation is fully integrated with partition- and volume-level commands like Format and Delete, with file system commands relating to truncate and compression, and with the System Restore (aka Volume Snapshot) feature.
I expect that new builds of most Linux/Unix tools also have this support built-in, although you will need to verify this on a per-distribution basis (depending on TRIM support in the first place).
I want to use SSD on my system that seems to not allow TRIM so I would just back up whole system, format and restore periodically to keep spare blocks on SSD to help longevity and speed.
This usually will not suffice, as TRIM commands are far different from standard disk writes/reads/erase commands. If your operating system does not support automatically sending TRIM commands, you need to get a tool from your SSD manufacturer to manually TRIM the drive, or use another application like hdparam.
Final thoughts: If your operating system does not support TRIM, it would be wise to consider switching. While manually performing TRIM commands on the drive can increase the lifespan and performance of the drive (as opposed to simply doing nothing), using an operating system with explicit TRIM support will make these issues non-existent (and will make the drive last much longer than manually using a TRIM utility).
Best Answer
I looked into this again (six months after my original post) and had much better luck: I found the ATA Secure Erase wiki entry. It shows you how to use hdparm to tell the SSD to do a "Secure Erase". From the article:
The exact steps I took were:
I didn't do any before/after measurements, but several people have and it sure looks like the drive is performing like new.
There's also an option to do it using an MS-DOS-only HDDERASE.EXE from 5 years ago - I spent a little time with it and think hdparms is a far superior option. There are a lot of forum postings and blogs about this out there now - google around until you feel comfortable.
But not too comfortable - you don't want to wipe the wrong disk or find out your image was corrupt!