Ask Dr. SCSI
Q.
“Dear Dr. SCSI – I have some used drives which I need to prepare for re-use. I want to find and remap any bad blocks that the drive has grown, and I need to erase all previous user data from the drive. In the past with SCSI drives I would FORMAT the drive to accomplish this. How do I do this with SATA drives? – Ricky Refurber”
A.
“Dear Ricky – you are correct – with a SCSI/SAS/FC drive the FORMAT command would accomplish both zeroing the data and finding and remapping any new bad blocks.
But with SATA drives that is not the case. While most SATA drives will do something when you send a FORMAT command to them you are never guaranteed exactly what the drive will do. That’s because there isn’t actually a FORMAT command defined in the SATA command specification, so it is up to each drive manufacturer what they do when a FORMAT is received.
To be 100% certain that you are accomplishing your goal we recommend using the following procedure in the STB Suite DMM.
Identify and Remap all bad blocks
SATA disk drives have the feature of automatically remapping any block which fails any READ or WRITE command.
With SCSI/SAS/FC drives the default of the FORMAT command includes running a “certify pass” which is a sequential READ test of the entire drive.
We will copy the functionality of this certify pass by doing our own sequential test of the entire drive. Any blocks which fail (are “bad”) will be remapped and added to the Reallocated Sector list.
And… Zero all blocks
But instead of doing a sequential READ pass we will do a sequential WRITE pass. This will accomplish two goals in one – 1)all bad blocks will be identified and remapped, and 2)the drive will be zeroed out, erasing any preexisting user data.
Documenting the Process
The following DMM Test Sequence is used to process a drive –
The first Test Step records all of the drive’s SMART Attribute data to the DMM .log file. The attribute we are interested in is Attribute 5 – Reallocated Sector Count.
The next step is the sequential Write of the entire drive. We specify a data pattern of “All Zeros” here.
Then the last step is the record the SMART attribute data again. This is so you can see the Reallocated Sector Count before and after the sequential write test – so any new bad blocks which have been remapped will be visible.
Here is an example .log file showing this process. We’ve edited the SMART data to only show Attribute 5 for the sake of space in this article.
Note: There were no new bad blocks identified/remapped. This is very common and not an error.
================================================================================
>> SCSI Toolbox32, Version 10. 0. 0 (build) 170112, running on \\W10-TESTBOX <<
>> Default Driver: 10, Operating System: Windows 10 Enterprise Insider Preview<<
>> Number of Drives Under Test: 1 <<
>> Available Memory (in GB): 12.43 <<
================================================================================
Test Date: 01/24/2017 09:47:51
Test Pass: 1
Device: 5:2:0 Vendor: ATA, Product: SSD2SC240G1SA754 Serial: PNY33140000575740262, Version: 0A
Capacity: 240.06 GB, BlockSize: 512 (0x200)
Script Filename: C:\Users\Michael\Documents\1-SATAallInOne.seq
Results:
01/24/2017 09:47:51 TEST 1 of 3:
SMART Data Test
Stop-on-Error Type: Stop Current Test
SMART data follows:
Attribute 5 (** Reallocated Sector Count) – Raw = (00 00 00 00 00 00), (dec) = 0
01/24/2017 09:47:52 PASSED
——————————————————————————
01/24/2017 09:47:52 TEST 2 of 3:
Write Test; Sequential; for 468,862,128 Blocks
Fixed-Length Transfers of 256 (0x0100) Blocks
Start Block: 0
Data Pattern: All Zeros
Queue Depth = 1
FUA = OFF
Number of Workers = 1
Stop-on-Error Type: Stop Current Test
01/24/2017 10:00:46 Worker ID: 1
01/24/2017 10:00:46 Test Completed Successfully
Time for test: 12 Min, 54 Sec, 87 ms
Transfer Rate: 295.75 MB/sec
I/O Per Second: 2366.00 IO/sec
Number of Blocks Transferred: 468,862,128
Fastest Command Completion Time: 0.297 ms
Slowest Command Completion Time: 28.655 ms
Average Command Completion Time: 0.409 ms
Standard Deviation of Command Completion Times: 0.291 ms
01/24/2017 10:00:46 PASSED
——————————————————————————
01/24/2017 10:00:46 TEST 3 of 3:
SMART Data Test
Stop-on-Error Type: Stop Current Test
SMART data follows:
Attribute 5 (** Reallocated Sector Count) – Raw = (00 00 00 00 00 00), (dec) = 0
01/24/2017 10:00:46 PASSED
——————————————————————————
Download and run the 1 SATA all in One Test sequence
1-SATAallInOne.zip test sequence for DMM, DME, or AME.