How to reformat HDD & SSD to 512B Sector Size

UhClem

Active Member
Jun 26, 2012
301
160
43
NH, USA
Any wisdom or guidance on formatting a 4kn SATA drive to 512? I have 4x HGST HUH721010ALN600 10TB SATA 4Kn drives ...
Negative for drives of that "vintage".
SATA drives conform to the ATA specs, and, unlike SAS drives (SCSI spec), there is no flexibility on format, after manufacture. (The FORMAT TRACK and FORMAT UNIT commands can only duplicate/repeat the format from the factory [512, 512e, 4kn].) However, a couple of new commands were added to ATA, (circa 2016?), to "convert" a 4kn drive (with LBA size=4096) to LBA size=512, and a 512e drive (with 512 LBAs) to 4096 LBAs. I don't know whether this functionality is required, or optional, but it looks like WDC introduced it in HC530 14TB (and some lower capacity drives [e.g., HC310] of that era), and Seagate in the Exos14 series.

Fast-Format is the operative buzzword. I believe this "switch" is accessed via hdparm's --set-sector-size, Hugo's --fastformat, and some tool from Seagate. I don't believe any actual formatting is performed (though all data is lost)--it's probably just a runtime parameter in the firmware.
 
Last edited:

jdadoco

New Member
Nov 14, 2022
2
0
1
hi, i got couple of HPE HGST 10 TB SAS drives, and what ever i try, i can't format them to 512 sector size.

HGST HUH721010AL5204 , they are HPE branded drives.


even the sg_readcap is not working
Code:
sudo sg_readcap /dev/sg7
READ CAPACITY (10) failed: Device not ready
sg_readcap failed: Device not ready
sg_format -v give bit more information

Code:
Format unit:
Descriptor format, current; Sense key: Not Ready
Additional sense: Logical unit not ready, initializing command required
  Descriptor type: Field replaceable unit code: 0x0
  Descriptor type: Vendor specific [0x80]
    f5 03
Format unit command: Device not ready, type: sense key
FORMAT UNIT failed
i tired to all the variant of sg_format shown here but no success.

i used both Dell Perch H310 in IT mode and Dell Power Edge HBA 330, but with same results.

any hint, or are the drives are vender locked?

the same thing happens to me. do you know how to fix it?
 

Attachments

itronin

Well-Known Member
Nov 24, 2018
984
631
93
Denver, Colorado
the same thing happens to me. do you know how to fix it?
did you notice the type 1 protection info message (after you added -v) ??

if you perform a smartctl -a /dev/sdb my guess is you are going to see two things, (1) this drive probably has type 1 protection (2) the drive probably has 520b blocks. I like to pretty explicit with my formats including size and removing protection - its good that you added --six - a lot folks don't. The beginning of this thread has helpful information too.

post your smartctl output and let's take a look shall we?
 

jdadoco

New Member
Nov 14, 2022
2
0
1
did you notice the type 1 protection info message (after you added -v) ??

if you perform a smartctl -a /dev/sdb my guess is you are going to see two things, (1) this drive probably has type 1 protection (2) the drive probably has 520b blocks. I like to pretty explicit with my formats including size and removing protection - its good that you added --six - a lot folks don't. The beginning of this thread has helpful information too.

post your smartctl output and let's take a look shall we?
Thank you very much for your prompt response Attached capture
 

Attachments

itronin

Well-Known Member
Nov 24, 2018
984
631
93
Denver, Colorado
output helps and -

oh -

and that's a bummer.

"device becoming ready (wait)" smartctl failed

not saying it can't be done but beyond my knowledge at this time to help you - maybe someone else???

sounds very similar to issues with drives not being deprovisioned from HGST VSP storage systems.

tldr: drives are probably write protected and were not (properly) deprovisioned from the IBM storage system they lived in.

linkages:

you may want to look at this thread in the unraid forums


also here