How to reformat HDD & SSD to 512B Sector Size

soccrstar

New Member
Jul 12, 2020
7
0
1
Seems like something went wrong



Post output of sedutil-cli and sg_format

Ahh i got it! Thanks!

I needed to add --six

And it worked space went from 822gb to 838gb after going from 528 to 512. A lot of wasted space.

Thanks for your reply!
 

cromualdo

New Member
Nov 30, 2020
1
1
3
Here is how you get the DKS5E-J900SS versions of the ST900MM0006's to work. Even when formatting them to 512b sectors, you cannot write to them. They will produce an error like this:

FAILED Result: hostbyte=DID_OK driverbyte=DRIVER_SENSE
Sense Key : Hardware Error [current]
<<vendor>>ASC=0x81 ASCQ=0x0
CDB: Write(10) 2a 00 34 62 65 28 00 00 d0 00

Trying tricks like others suggested of turning wce on, did nothing to help. You can read from the drive all you want, but you cannot write to the drive.

So, in my exhaustive searching, I came upon this post on reddit:
https://www.reddit.com/r/sysadmin/comments/ge4ngu
He indicated that he was able to get the drives to work by flashing a firmware 0004 to the drives. I have 8 drives, 5 of them come up as the ST900MM0006 drives with firmware 0004, and the other 3 come up as the DKS5E-J900SS with a firmware of 7F0A.

Now, going to Seagate's website, you cannot download firmware for your drives unless you plug in a serial number that has a firmware update for it. All of my drives came up as no firmware available. In that reddit post, he said he searched on ebay for his drive and kept trying serial numbers until he found one that let him download the firmware. I tried that, it only took about 35 serial numbers to finally find one that came up with the download for the firmware version 0004 that I was looking for. (To speed this up, use serial # S0N5HBHA).

When you download the firmware, it also includes the flashing utility. I was doing this on Proxmox box, so here was the command I used from the Seagate download: (from the linux cli tools/seaflashlin folder from the archive)

./seaflashlin_043_64 -m DKS5E-J900SS -f 0004.LOD -d /dev/sg5

You have to set the -m flag to what the drive currently shows it's model number is. On linux, running ./seaflashlin -i will scan your drives and show you the make, device, model, serial#, and firmware versions.

The firmware file was called Lightningbug10K6-STD-0004.LOD in the firmware folder, I just moved it into the linux cli tools/seaflashlin folder and named it 0004.LOD.

After the drive flashed, and reset, it now shows up as a ST900MM0006 drive, and smartctl now shows the details like a normal drive vs before it would only show a few items.

Hope this helps. I successfully flashed all 3 of my drives without issue. Use at your own risk.

Leon
Hi Leon,
I just registered to say thanks for saving my 8 recently bought Seagate 4TB SAS disks (previously DKS2E-H4R0SS and later ST4000NM0023 after firmware downgrade/upgrade) that refused to work with my HBA - could not partition, format, basically use them - console threw constantly the errors you described before. None of my 8 disks' serial's worked in Seagate page in order to find a firmware upgrade available but the serial from the third picture I tried from ebay's units granted me a ticket to firmware download heaven :) for future reference #Z1Z5WH52.
It worked for me but it's not guaranteed it might work for others. Use it at your own risk! ;) Again thank you for this amazing information!
Best regards,
Carlos
 
  • Like
Reactions: Samir

amp88

New Member
Jul 9, 2020
23
18
3
Hoping this will help someone as it took me ages to get a working solution...

I couldn't get sg_format to work with my EMC formatted HGST HUS72303CLAR3000 3TB drives, tried all the combinations of command line arguments mentioned here, but nada:

root@ubuntu:~# sg_format --format --size=512 -v /dev/sg2
HITACHI HUS72303CLAR3000 C442 peripheral_type: disk [0x0]
...
00 0MODE SELECT command: Illegal request sense key, apart from Invalid opcode


...but I did have success with the setblocksize util!

I've put together a very slightly modded version of setblocksize here with higher possible and default timeouts (the default is way to low for bigger drives) as well as the instructions on how to compile it etc. etc.

ahouston/setblocksize

So far I've rescued 7 of my EMC 3TB HGST drives, waiting on the last batch to finish up :)
I just wanted to say thank you so much, from the bottom of my wallet. I picked up an EMC KTN-STL3 DAE/disk enclosure with 10 of these exact drives and when they failed to reformat to 512 bytes with the usual sg_format method I despaired. However, your guide has worked perfectly on the first batch of 5 drives, and I've got the second batch formatting now. Thanks, once again! :)
 
  • Like
Reactions: Samir

ccie4526

New Member
Jan 25, 2021
16
10
3
Just a thought... like this thread is sticky because of the valuable info herein... could we get another sticky thread listing specific drive part numbers under categories of "Known Good Working Reformat from X to X" or "Known Unable to Reformat"? I remember there's a certain batch of Samsung 200GB SSD devices used in EMC that just won't reformat to 512-byte sectors, but I don't remember the specific part numbers to watch out for, etc., etc.
 
  • Like
Reactions: Samir and amp88

amp88

New Member
Jul 9, 2020
23
18
3
Just a thought... like this thread is sticky because of the valuable info herein... could we get another sticky thread listing specific drive part numbers under categories of "Known Good Working Reformat from X to X" or "Known Unable to Reformat"? I remember there's a certain batch of Samsung 200GB SSD devices used in EMC that just won't reformat to 512-byte sectors, but I don't remember the specific part numbers to watch out for, etc., etc.
Agreed, good idea. I've personally done three four different drives:

With the normal sg_format method:
Seagate Savvio 10K.6 ST600MM0006, NetApp part number: 9WG066-038, 600GB HDD - Originally in 520 byte format in a NetApp DS2246 disk shelf.
HGST Ultrastar SSD400M HUSML4020ASS600, EMC part number: 118033211-02, 200GB SSD - Originally in 520 byte format in an EMC enclosure.
HGST Ultrastar He8 HUH728080AL4200, 8TB HDD - Originally in 520 byte format, converted to 4kn.

With the setblocksize method:
HGST Ultrastar 7K3000 HUS723030ALS640 / HUS72303CLAR3000, EMC part number: 118032815-02, 3TB HDD - Originally in 520 byte format in an EMC KTN-STL3 Viper disk enclosure.

edit: Added fourth drive.
 
Last edited:
  • Like
Reactions: Samir

ccie4526

New Member
Jan 25, 2021
16
10
3
Agreed, good idea. I've personally done three different drives:

With the normal sg_format method:
Seagate Savvio 10K.6 ST600MM0006, NetApp part number: 9WG066-038, 600GB HDD - Originally in 520 byte format in a NetApp DS2246 disk shelf.
HGST Ultrastar SSD400M HUSML4020ASS600, EMC part number: 118033211-02, 200GB SSD - Originally in 520 byte format in an EMC enclosure.

With the setblocksize method:
HGST Ultrastar 7K3000 HUS723030ALS640 / HUS72303CLAR3000, EMC part number: 118032815-02, 3TB HDD - Originally in 520 byte format in an EMC KTN-STL3 Viper disk enclosure.
Likewise, I've done a bunch of EMC platter disks and a couple of 100GB SSDs, but there were two 200GB SSDs in the same enclosure that wouldn't go.... I just don't remember the specific part numbers, and can't get into that server from where I am right now... but would likewise happily contribute part numbers and reformat process used. :D
 
  • Like
Reactions: Samir and amp88

Fritz

Well-Known Member
Apr 6, 2015
2,292
564
113
67
Just another thought....... until this becomes a sticky I've had great luck finding info on STH using Google including this thread. There have been several other instances where a Google search has led me to STH.

And taking the concept a little further, a "Hard To Find Info" thread would be killer.
 
  • Like
Reactions: Samir and amp88

ccie4526

New Member
Jan 25, 2021
16
10
3
Disks I have successfully reformatted:
HITACHI HUSRL401 NEO100 C140 - 100GB SSD

SEAGATE STE60005 CLAR600 ES0F - 600GB HDD

TOSHIBA AL13SXB6 CLAR600 0B06 - 600GB HDD

HITACHI HUC10909 NEO900 C600 - 900GB HDD

SEAGATE ST1000NM NEO1000 PS10 - All 1TB HDD, just various minor firmware differences
SEAGATE ST1000NM NEO1000 PS11
SEAGATE ST1000NMCLAR1000 PS10
 
  • Like
Reactions: amp88

Samir

Well-Known Member
Jul 21, 2017
1,618
543
113
46
It would be interesting to see which sata drives have reformatted too. :cool:
 
  • Like
Reactions: Fritz

stamasd

Member
May 30, 2020
32
10
8
I have a bunch of 520-byte-sector Seagate 3TB drives (Constellation ES.3 ST3000NM023 ST3000NXCLAR3000 GS18) which I am reformatting using setblocksize. It works but takes a huge amount of time (about 12h per drive).

Is there a way to run several reformats in parallel on the same controller? I am using an IBM H1110 converted to 9211-4i in the machine used for the conversion. I could attach 4 drives at a time and run setblocksize on each of them in parallel in separate virtual terminals (in Linux of course). It could save me a huge amount of time if I could do it this way.

Any reason why I shouldn't do that?
 

amp88

New Member
Jul 9, 2020
23
18
3
I have a bunch of 520-byte-sector Seagate 3TB drives (Constellation ES.3 ST3000NM023 ST3000NXCLAR3000 GS18) which I am reformatting using setblocksize. It works but takes a huge amount of time (about 12h per drive).

Is there a way to run several reformats in parallel on the same controller? I am using an IBM H1110 converted to 9211-4i in the machine used for the conversion. I could attach 4 drives at a time and run setblocksize on each of them in parallel in separate virtual terminals (in Linux of course). It could save me a huge amount of time if I could do it this way.

Any reason why I shouldn't do that?
This is a perfectly valid way of reformatting multiple drives at once. I've used the setblocksize method with 5 drives at the same time, and the sg_format method in batches of 8 drives at a time, with no issues.
 
  • Like
Reactions: stamasd and Fritz

Whaaat

Active Member
Jan 31, 2020
142
39
28
I have a bunch of 520-byte-sector Seagate 3TB drives (Constellation ES.3 ST3000NM023 ST3000NXCLAR3000 GS18) which I am reformatting using setblocksize
you can even change the firmware to oem seagate version on these drives
 

stamasd

Member
May 30, 2020
32
10
8
Seagate says no firmware available to download (and no, there is no "certificate" download either.

seagatefirmware.png
 

Whaaat

Active Member
Jan 31, 2020
142
39
28
Seagate says no firmware available to download
Of course, this drive was not indented for retails but for vendor distribution, nevertheless you can update its firmware from EMC GS18 to original E007 version
Code:
\\.\PhysicalDrive6 - ST3000NXCLAR3000 - Z1Y36DMN    0000R531 - SCSI
        Vendor ID: SEAGATE
        Model Number: ST3000NXCLAR3000
        Serial Number: Z1Y36DMN    0000R531
        Firmware Revision: GS18
        World Wide Name: 5000C50063794FE7
        Copyright: Copyright (c) 2014 Seagate All rights reserved
        Drive Capacity (TB/TiB): 3.00/2.73
        Temperature Data:
                Current Temperature (C): 36
                Highest Temperature (C): Not Reported
                Lowest Temperature (C): Not Reported
        Power On Time:  2 years 75 days 9 hours 35 minutes
        Power On Hours: 25473.58
        MaxLBA: 5860533167
        Native MaxLBA: Not Reported
        Logical Sector Size (B): 512
        Physical Sector Size (B): 512
        Sector Alignment: 0
        Rotation Rate (RPM): 7200
        Form Factor: 3.5"
        Last DST information:
                DST has never been run
        Long Drive Self Test Time:  7 hours 13 minutes
        Interface speed:
                Port 0 (Current Port)
                        Max Speed (GB/s): 6.0
                        Negotiated Speed (Gb/s): 6.0
                Port 1
                        Max Speed (GB/s): 6.0
                        Negotiated Speed (Gb/s): Not Reported
        Annualized Workload Rate (TB/yr): 104.69
        Total Bytes Read (TB): 209.98
        Total Bytes Written (TB): 94.44
        Encryption Support: Not Supported
        Cache Size (MiB): Not Reported
        Read Look-Ahead: Enabled
        Write Cache: Enabled
        SMART Status: Good
        ATA Security Information: Not Supported
        Firmware Download Support: Full, Segmented, Deferred
        Number of Logical Units: 1
        Specifications Supported:
                SPC-3
                ----
                ----
                ----
                ----
                ----
                ----
                ----
                ----
        Features Supported:
                Application Client Logging
                Self Test
                Automatic Write Reassignment [Enabled]
                Automatic Read Reassignment [Enabled]
                EPC [Enabled]
                Informational Exceptions [Mode 6]
                Translate Address
                Format Unit
        Adapter Information:
                Vendor ID: 1000h
                Product ID: 005Bh
                Revision: 0005h
Code:
\\.\PhysicalDrive6 - ST3000NM0023 - Z1Y36DMN0000R531LND6 - SCSI
        Vendor ID: SEAGATE
        Model Number: ST3000NM0023
        Serial Number: Z1Y36DMN
        PCBA Serial Number: 0000R531LND6
        Firmware Revision: E007
        World Wide Name: 5000C50063794FE7
        Copyright: Copyright (c) 2016 Seagate All rights reserved
        Drive Capacity (TB/TiB): 3.00/2.73
        Temperature Data:
                Current Temperature (C): 35
                Highest Temperature (C): Not Reported
                Lowest Temperature (C): Not Reported
        Power On Time:  2 years 75 days 9 hours 37 minutes
        Power On Hours: 25473.62
        MaxLBA: 5860533167
        Native MaxLBA: Not Reported
        Logical Sector Size (B): 512
        Physical Sector Size (B): 512
        Sector Alignment: 0
        Rotation Rate (RPM): 7200
        Form Factor: 3.5"
        Last DST information:
                DST has never been run
        Long Drive Self Test Time:  7 hours 13 minutes
        Interface speed:
                Port 0 (Current Port)
                        Max Speed (GB/s): 6.0
                        Negotiated Speed (Gb/s): 6.0
                Port 1
                        Max Speed (GB/s): 6.0
                        Negotiated Speed (Gb/s): Not Reported
        Annualized Workload Rate (TB/yr): 104.69
        Total Bytes Read (TB): 209.98
        Total Bytes Written (TB): 94.44
        Encryption Support: Not Supported
        Cache Size (MiB): Not Reported
        Read Look-Ahead: Enabled
        Write Cache: Enabled
        SMART Status: Good
        ATA Security Information: Not Supported
        Firmware Download Support: Full, Segmented, Deferred
        Number of Logical Units: 1
        Specifications Supported:
                SPC-4
        Features Supported:
                Protection Type 1
                Protection Type 2
                Application Client Logging
                Self Test
                Automatic Write Reassignment [Enabled]
                Automatic Read Reassignment [Enabled]
                EPC [Enabled]
                Informational Exceptions [Mode 6]
                Translate Address
                Rebuild Assist
                Format Unit
        Adapter Information:
                Vendor ID: 1000h
                Product ID: 005Bh
                Revision: 0005h