LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware
User Name
Password
Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?

Notices

Reply
 
Search this Thread
Old 01-19-2013, 04:32 PM   #1
malloc
Member
 
Registered: Jul 2010
Posts: 111

Rep: Reputation: 4
SSD reset, TRIM?


I want to reinstall Linux on my SSD. How do I reset the SSD such that the SSD controller is informed that every block is now indeed free?

Can I do this with hdparm's --trim-sector-ranges? If so, what arguments should I give that command?

I don't fully understand the example in the manpage:

hdparm --trim-sector-ranges 1000:4 7894:16 /dev/sdz

With the syntax [LBA]:[sector count]

Can I simply do hdparm --trim-sector-ranges 0:[number of sectors in total] [device]?

How can I confirm that the the SSD has indeed been reset?
 
Old 01-19-2013, 04:40 PM   #2
TobiSGD
Moderator
 
Registered: Dec 2009
Location: Hanover, Germany
Distribution: Main: Gentoo Others: What fits the task
Posts: 15,592
Blog Entries: 2

Rep: Reputation: 4047Reputation: 4047Reputation: 4047Reputation: 4047Reputation: 4047Reputation: 4047Reputation: 4047Reputation: 4047Reputation: 4047Reputation: 4047Reputation: 4047
If you want to reset your SSD you can use its Secure Erase feature, it will do what you want to achieve:
Code:
sudo hdparm --security-erase NULL /dev/sda
 
Old 01-19-2013, 05:03 PM   #3
malloc
Member
 
Registered: Jul 2010
Posts: 111

Original Poster
Rep: Reputation: 4
Quote:
Originally Posted by TobiSGD View Post
If you want to reset your SSD you can use its Secure Erase feature, it will do what you want to achieve:
Code:
sudo hdparm --security-erase NULL /dev/sda
Thanks, are you sure this is correct though? There is no mention in the manual that --security-erase actually uses TRIM or that it in any other way tells the controller this data has been deleted using TRIM. Simply deleting the contents of the device, e.g. sending it arbitrary data to fill every byte, will not erase anything as far as the SSD controller is concerned.

Also, I'm still wondering how it can be verified that the device has been reset.
 
Old 01-19-2013, 06:13 PM   #4
TobiSGD
Moderator
 
Registered: Dec 2009
Location: Hanover, Germany
Distribution: Main: Gentoo Others: What fits the task
Posts: 15,592
Blog Entries: 2

Rep: Reputation: 4047Reputation: 4047Reputation: 4047Reputation: 4047Reputation: 4047Reputation: 4047Reputation: 4047Reputation: 4047Reputation: 4047Reputation: 4047Reputation: 4047
Secure Erase will tell the controller to dump all contents of the disk and mark the blocks as unused. It will not zero out the device or copy any data to it.
http://en.wikipedia.org/wiki/Write_a...n#Secure_erase
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Enabling TRIM on ssd jas0n Debian 6 09-08-2012 02:18 PM
ntfs-3g SSD TRIM? qrange Linux - Software 4 07-05-2012 10:00 PM
[SOLVED] RAID 1 SSD drives with TRIM grolendaves Linux - Hardware 2 06-05-2011 08:44 AM
[SOLVED] TRIM on SSD mira.mikes Linux - Kernel 8 01-08-2011 06:36 PM
SSD TRIM support on Linux Thoreau Linux - Kernel 2 03-25-2009 04:05 AM


All times are GMT -5. The time now is 05:36 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration