Due to big performance issues with an mdraid-1 array I'd like to pull down from the array one of the devices (Samsung 840 Pro), erase it to restore factory performance and re-add it to the array. The reason I want to do this to one of the SSDs is because the poor performance seems to be related to one specific SSD out of the two (although they are the same brand, model and firmware ver).
But how do I erase a SSD from Linux?
I mention that hdparm indicates that both drives are frozen at this time. Maybe because they are part of an md array?
Thanks in advance!
Best Answer
You would need to perform a secure erase of the disk's contents - this would signal the controller that it can reclaim all blocks as wear-leveling candidates.
hdparm
has the--security-erase
parameter to do exactly this, but the operation has some pre-requisites:--security-erase
commandThe referenced article from the Kernel wiki will guide you through the necessary steps.
You also might consider issuing a TRIM command for all sectors instead. Again,
hdparm
offers support for it using the--trim-sector-ranges
parameter.