Difference between revisions of "SSD memory cell clearing"

From ArchWiki
Jump to: navigation, search
Line 4: Line 4:
 
{{Article summary heading|Related Articles}}
 
{{Article summary heading|Related Articles}}
 
{{Article summary wiki|Solid State Drives}}
 
{{Article summary wiki|Solid State Drives}}
 +
{{Article summary wiki|Securely Wipe HDD}}
 
{{Article summary end}}
 
{{Article summary end}}
  
Line 9: Line 10:
  
 
On occasion, users may wish to completely reset an SSD's cells to the same virgin state they were at the time he/she installed the device thus restoring it to its [http://www.anandtech.com/storage/showdoc.aspx?i=3531&p=8 factory default write performance].  Write performance is known to degrade over time even on SSDs with native TRIM support.  TRIM only safeguards against file deletes, not replacements such as an incremental save.
 
On occasion, users may wish to completely reset an SSD's cells to the same virgin state they were at the time he/she installed the device thus restoring it to its [http://www.anandtech.com/storage/showdoc.aspx?i=3531&p=8 factory default write performance].  Write performance is known to degrade over time even on SSDs with native TRIM support.  TRIM only safeguards against file deletes, not replacements such as an incremental save.
{{Warning|Doing so will erase ALL data on the SSD and rendering it unrecoverable by even data recovery services!}}
+
{{Warning|Back up ALL data of importance prior to continuing!  Using this procedure will destroy ALL data on the SSD and rendering it unrecoverable by even data recovery services!  Users will have to repartition the device and restore the data after completing this procedure!}}
  
 
== Step 1 - Make sure the drive security is not frozen ==
 
== Step 1 - Make sure the drive security is not frozen ==

Revision as of 08:16, 3 July 2010

Summary help replacing me
This article presents a method to reset all cells on an SSD to their factory default state thus recovering any loss of write performance.
Related Articles
Solid State Drives
Securely Wipe HDD

Introduction

On occasion, users may wish to completely reset an SSD's cells to the same virgin state they were at the time he/she installed the device thus restoring it to its factory default write performance. Write performance is known to degrade over time even on SSDs with native TRIM support. TRIM only safeguards against file deletes, not replacements such as an incremental save.

Warning: Back up ALL data of importance prior to continuing! Using this procedure will destroy ALL data on the SSD and rendering it unrecoverable by even data recovery services! Users will have to repartition the device and restore the data after completing this procedure!

Step 1 - Make sure the drive security is not frozen

Issue the following command:

# hdparm -I /dev/sdX

If the command output shows "frozen" one cannot continue to the next step. Most BIOSes block (do no allow) the ATA Secure Erase command by issuing a "SECURITY FREEZE" command to "freeze" the drive before booting an operating system.

A possible solution for SATA drives is hot-(re)plug the data cable (which might crash the kernel). If hot-(re)pluging the SATA data cable crashes the kernel try letting the operating system fully boot up, then quickly hot-(re)plug both the SATA power and data cables.

  • It has been reported that hooking up the drive to an eSATA SIIG ExpressCard/54 with an eSATA enclosure will leave the drive security state to "not frozen."
  • Placing the target system into "sleep" (Clevo M865TU notebook) has reported to work as well; this may reset other drives to "not frozen."
Security: 
        Master password revision code = 65534
                supported
        not     enabled
        not     locked
        not     frozen
        not     expired: security count
                supported: enhanced erase
        2min for SECURITY ERASE UNIT. 2min for ENHANCED SECURITY ERASE UNIT.

Step 2 - Enable security by setting a user password

Note: When the user password is set the drive will be locked after next power cycle denying normal access until unlocked with the correct password).

Any password will do, as this should only be temporary. After the secure erase the password will be set back to NULL. In this example, the password is "Eins" as shown:

# hdparm --user-master u --security-set-pass Eins /dev/sdX
security_password="Eins"
/dev/sdX:
Issuing SECURITY_SET_PASS command, password="Eins", user=user, mode=high

As a sanity check, issue the following command

# hdparm -I /dev/sdX

The command output should display "enabled":

 Security: 
        Master password revision code = 65534
                supported
                enabled
        not     locked
        not     frozen
        not     expired: security count
                supported: enhanced erase
        Security level high
        2min for SECURITY ERASE UNIT. 2min for ENHANCED SECURITY ERASE UNIT.

Step 3 - Issue the ATA Secure Erase command

# time hdparm --user-master u --security-erase Eins /dev/sdX

Wait until the command completes. This example output shows it took about 40 seconds for an Intel X25-M 80GB SSD, for a 1TB hard disk it might take 3 hours or more!

security_password="Eins"
/dev/sdX:
Issuing SECURITY_ERASE command, password="Eins", user=user
0.000u 0.000s 0:39.71 0.0%      0+0k 0+0io 0pf+0w

The drive is now erased. After a successful erasure the drive security should automatically be set to disabled (thus no longer requiring a password for access). Verify this by running the following command:

# hdparm -I /dev/sdX

The command output should display "not enabled":

 Security: 
        Master password revision code = 65534
                supported
        not     enabled
        not     locked
        not     frozen
        not     expired: security count
                supported: enhanced erase
        2min for SECURITY ERASE UNIT. 2min for ENHANCED SECURITY ERASE UNIT.