How to reformat HDD & SSD to 512B Sector Size

BuZa

New Member
Feb 13, 2019
12
0
1
Hi, i have DKS5E-J600SS SAS 600GB 2.5 ST600MM006 - Seagate already formatted with 512b, but they drop from my array as soon as I try to format them... I wonder if they were 520b before.. Can't format under Windows with Disk Management I/O ERROR ? Do you have solutions?
In these discs, you must change the firmware. You need a HBA controller.
 

i386

Well-Known Member
Mar 18, 2016
2,103
553
113
31
Germany
I tried sg3_utils on windows and could succesfully format 4x HUSMM8020ASS200 (oem branded, probably netapp) from 512 to 4096 byte logical block size.

I put them in a hardware raid 10 and 5 for testing and so far they work without problems.
Had to format the ssds back to 512e. Adaptec software can't create a maxcache device with 4kn ssds...
 
  • Like
Reactions: Samir

Compcons

New Member
Aug 27, 2020
2
0
1
I have some netapp drives and most were reformatted using sg3_utils under Linux without problems. 2 of them got to about 98% then reported that they finished with a hardware error. After that, they don't show up in any scan at all. The devices don;t seem to exist. I actually dropped an HBA into a Windows box to try my luck there and still don;t have the drives.

Any ideas?
 

Fritz

Well-Known Member
Apr 6, 2015
2,151
508
113
66
I have some netapp drives and most were reformatted using sg3_utils under Linux without problems. 2 of them got to about 98% then reported that they finished with a hardware error. After that, they don't show up in any scan at all. The devices don;t seem to exist. I actually dropped an HBA into a Windows box to try my luck there and still don;t have the drives.

Any ideas?
Sounds like they died on the operating table.
 

Compcons

New Member
Aug 27, 2020
2
0
1
any ideas on how to recover a dead patient? Maybe some adrenaline shot to the heart or something like that?
 
Last edited:

Fritz

Well-Known Member
Apr 6, 2015
2,151
508
113
66
Dunno. If nothing sees them there's not much you can do.

I have several netapp drives I've reformatted with SG_Utils and haven't run into a problem.
 

alexcirce

New Member
Sep 3, 2020
1
0
1
Seriously, thanks a bunch for the post, solved a Wacky IBM/HGST drive that wouldn't initialize, took a good 7 hours for the low level format but did the trick none the less.
 

lpayne

New Member
Sep 13, 2020
1
1
3
Cape Canaveral
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
 
Last edited:
  • Like
Reactions: Fritz

Derwood

Member
May 22, 2019
48
0
6
My LSI MegaRAID SAS 9285CV-8e in typical RAID mode cleared fine all the way when connected to an NetApp DS2246 with a full compliment of 450GB 10K SAS (520B) drives, right up until you press [START] to enter the WebBIOS configuration. Just a complete halt until you CTRL-ALT-DEL and this was in part due to the 520Byte sector notion utilised by NetApp.
However connecting the same array to an NetApp HBA, an Ubuntu Live USB install running this command:

sg_format --format --size=512 /dev/sgX (where X is drive number)

Worked out all just fine in the end after being connected to either the NetApp/PMC 111-00341+F2 & B2 HBAs or the LSI MegaRAID SAS 9285CV-8e on various servers I have here, the IBM x3950x5 2-node, R810 & 710, CS24s even an rather old Alienware box.

Some issues which arose to be false positives were in this order.
-IRQ issue, I had it down to that because I had a RAID card, HBA and an HCA in the same x16 riser of a few machines.. Wrong!
-Halt caused possibly by USB > PS2 lagecy issues at the BIOS or UFEI level.. Wrong!
-PCIe versions.. Wrong!
and lastly.. Firmware.. Wrong!

it's all about the bytes folks! I had fun though and you will too!
 

Derwood

Member
May 22, 2019
48
0
6
Oh.. This is a great post.. I should have read it sooner, thanks very much to the creator of this post.
 

opasha

New Member
Aug 13, 2020
4
0
1
If anyone wants to take a crack at it, the key for flashing firmware to drives is the logical and physical sector matching - for example, it needs to be 512 / 512 (logical sectors / physical sectors) and not 512 / ---- .

If anyone knows how to make a SAS drive show physical sectors, that would help. After a flash, the physical sector disappears. Anyone know why or how to bring up a drive's physical sector or modify it? Thanks.
 

Raice

Member
Jul 12, 2017
45
6
8
38
Guangzhou, China
For those who experience
Code:
MODE SELECT command: Data protect, type: sense key; write protected media
Your drive is SED (self-encrypted). You need sedutil to erase it, unfortunately, linux version does not work. You need to use FreeNAS/TrueNAS


Code:
sedutil-cli --yesIreallywanttoERASEALLmydatausingthePSID <PSINODASHED> </dev/device>
Just made it with NETAPP X358 (Samsung PM1633)
 

soccrstar

New Member
Jul 12, 2020
7
0
1
For those who experience
Code:
MODE SELECT command: Data protect, type: sense key; write protected media
Your drive is SED (self-encrypted). You need sedutil to erase it, unfortunately, linux version does not work. You need to use FreeNAS/TrueNAS


Code:
sedutil-cli --yesIreallywanttoERASEALLmydatausingthePSID <PSINODASHED> </dev/device>
Just made it with NETAPP X358 (Samsung PM1633)
I tried and was successful in using the psid. I can format it to current format but I can't change sector size. I get the same error.

I can size 528 all day but 512 errors.

Am I missing something?

Any help appreciated