How to reformat HDD & SSD to 512B Sector Size

Notice: Page may contain affiliate links for which we may earn a small commission through services like Amazon Affiliates or Skimlinks.

merlin5

New Member
Jul 16, 2021
2
0
1
great forum here , just registered yesterday , flashed my 9341IR to 9300 IT and now "formating" my 8TB Netapp NL_SAS disks to 512 blocksize ... will take ~10hours per disk :oops:
 

merlin5

New Member
Jul 16, 2021
2
0
1
Just a single one to check if the result is as expected ( live linux CD / single shell) , if the result is fine the next 7 together ;-)
 

mnode

New Member
Jul 23, 2021
5
0
1
Since this cost me about a week to find out, I thought, I'd share some Info about the IBM-branded 300GB Seagate Savvio 15k drives and their problems. These are ST9300553SS drives with the IBM part number 45W9615 and they come out of a DS8000 storage system.

I got a few of these for really cheap (like 6€ a pop) and reformated them like described in the text. I pooled 8 drives together in ZFS but had problems with the pool degrading after it got filled above about 2/3.

After some trial and Error I found out, that some sectors in the range between 552343000 and 552345000 cannot be written to. My theory is that the firmware uses these sectors for storing some stuff and therefore it can't be reliably written to by the user. I am currently working around this issue by creating partitions that end at the sector 540000000 on each drive and use these to create the ZFS pool. So far, I had no issiues with degrading the pool anymore and apart from the about 7% of storage the pool is missing, I can't see any performance decreases by using partitions instead of the whole drive. I guess if you are really desperate for the capacity, you can create a second partition after the dead sectors and stripe the two together.

For now, I would advise to stay away from these drives but maybe I'll get bored and try to hack the drive firmware to move the affected sectors out of the space that can be accessed by the user.
No need to partition - You can tell the drive with sg3util what sector range you want it to "ignore" based on your sector size you set.
 

Fritz

Well-Known Member
Apr 6, 2015
3,371
1,375
113
69
running sg_utils from a live Linux Cd. Drive isn't seen. However, drive is visible in Windows.

Any ideas?
 

Jaket

Active Member
Jan 4, 2017
232
119
43
Seattle, New York
purevoltage.com
Hopefully you find this information useful next time you come across a drive with other than 512B sector size.
Thanks this was quite helpful.
Something that might also be good to add into this for people who have issues still with this.

"sg_format failed with
Fixed format, current; Sense key: Illegal Request
Additional sense: Parameter list length error
MODE SELECT command: Illegal request sense key, apart from Invalid opcode

I had to use setblocksize
sudo ./setblocksize -b512 -t1200 /dev/sg1"
Got this from another thread we had some HP drives which failed to work using the normal sg_format.

Downloading this GitHub - ahouston/setblocksize: Fork of setblocksize and compiling it gave us the setblocksize command quoted above which worked great.
Took a few hours for our two drives we formatted however they where 15.36TB drives.
 
  • Like
Reactions: Markess

jabuzzard

Member
Mar 22, 2021
45
18
8
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!
Missed this first time through the thread and hunted down my own serial number for these drives (for reference #Z1Z8CLYA). Only done a handful so far all successful. I tested a couple using f3write and then f3read (f3 - Fight Flash Fraud — f3 8.0 documentation) as a method of ensuring all blocks on the drives work before I commit data to them. Passed with flying colours.

Just a few hundred to go now. Yes really they came out of a large storage HGST storage system at work and we want to recycle them for other uses. I have an immediate use for ~130 of them :)
 

Fritz

Well-Known Member
Apr 6, 2015
3,371
1,375
113
69
Just picked up 4 more of the Netapp 900GB 2.5 drives. They came in the original Netapp caddy which has a circuit board between the HD connector and the backplane. Anybody know what this circuit board does?
 

Markess

Well-Known Member
May 19, 2018
1,146
761
113
Northern California
Success with HP branded HGST HUS723020ALS640 using the format command in the OP. No modifications required.

These were 520 byte formatted drives I pulled from HP StoreServ 10000 drive magazines (four drives per magazine) I found on Ebay for $32 per magazine. Drives were new, well at this point "old" I suppose, but they were unused. 2TB isn't a lot of space these days, but $8 each for drives with zero hours..not bad..

They're going into a server I'm helping my son put together for a school elective on computer science. So, another big thank you to @azev for saving me money....again.
 
Last edited:
  • Like
Reactions: Fritz and itronin

lian

New Member
Nov 14, 2016
8
0
1
34
Hi, everyone - i have custom made FW for ST9600204SS - PM for more information.
 
Last edited:

SmilinJoe

New Member
Sep 27, 2021
6
1
3
Checking here to see if my drives are borked or salvageable... I have 6x Seagate ST6000NM0034 that came with 520b sector size. Since I have been down this road, I formatted them to 512b. That part seems to work:


root@truenas[~]# diskinfo -v /dev/da0
/dev/da0
512 # sectorsize
6001175126016 # mediasize in bytes (5.5T)
11721045168 # mediasize in sectors
4096 # stripesize
0 # stripeoffset
729601 # Cylinders according to firmware.
255 # Heads according to firmware.
63 # Sectors according to firmware.
SEAGATE DKS2F-H6R0SS # Disk descr.
Z4D4QWD90000R710TMPJ # Disk ident.
id1,enc@n50016360021ef7bd/type@0/slot@7/elmdesc@DISK06 # Physical path
No # TRIM/UNMAP support
7200 # Rotation rate in RPM
Not_Zoned # Zone Mode
Trying to create a pool in TrueNAS I get this error:

middlewared.service_exception.CallError: [EFAULT] Failed to wipe disk da0: [EFAULT] Command gpart create -s gpt /dev/da0 failed (code 1):
gpart: Input/output error


and the console spits out a bunch of these:

Sep 27 14:17:38 truenas (da0:mpr0:0:13:0): WRITE(6). CDB: 0a 00 00 00 01 00
Sep 27 14:17:38 truenas (da0:mpr0:0:13:0): CAM status: SCSI Status Error
Sep 27 14:17:38 truenas (da0:mpr0:0:13:0): SCSI status: Check Condition
Sep 27 14:17:38 truenas (da0:mpr0:0:13:0): SCSI sense: HARDWARE FAILURE asc:81,0 (LA Check Failed)
Sep 27 14:17:38 truenas (da0:mpr0:0:13:0): Info: 0
Sep 27 14:17:38 truenas (da0:mpr0:0:13:0): Command Specific Info: 0x1400
Sep 27 14:17:38 truenas (da0:mpr0:0:13:0): Descriptor 0xc0: 00 00 00 00 00 00 00 00 55 aa
Sep 27 14:17:38 truenas (da0:mpr0:0:13:0): Retrying command (per sense data)
Sep 27 14:17:38 truenas (da0:mpr0:0:13:0): WRITE(6). CDB: 0a 00 00 00 01 00
Sep 27 14:17:38 truenas (da0:mpr0:0:13:0): CAM status: SCSI Status Error
Sep 27 14:17:38 truenas (da0:mpr0:0:13:0): SCSI status: Check Condition
Sep 27 14:17:38 truenas (da0:mpr0:0:13:0): SCSI sense: HARDWARE FAILURE asc:81,0 (LA Check Failed)
Sep 27 14:17:38 truenas (da0:mpr0:0:13:0): Info: 0
Sep 27 14:17:38 truenas (da0:mpr0:0:13:0): Command Specific Info: 0x1400
Sep 27 14:17:38 truenas (da0:mpr0:0:13:0): Descriptor 0xc0: 00 00 00 00 00 00 00 00 55 aa
Sep 27 14:17:38 truenas (da0:mpr0:0:13:0): Retrying command (per sense data)
Sep 27 14:17:38 truenas (da0:mpr0:0:13:0): WRITE(6). CDB: 0a 00 00 00 01 00
Sep 27 14:17:38 truenas (da0:mpr0:0:13:0): CAM status: SCSI Status Error
Sep 27 14:17:38 truenas (da0:mpr0:0:13:0): SCSI status: Check Condition
Sep 27 14:17:38 truenas (da0:mpr0:0:13:0): SCSI sense: HARDWARE FAILURE asc:81,0 (LA Check Failed)
Sep 27 14:17:38 truenas (da0:mpr0:0:13:0): Info: 0
Sep 27 14:17:38 truenas (da0:mpr0:0:13:0): Command Specific Info: 0x1400
Sep 27 14:17:38 truenas (da0:mpr0:0:13:0): Descriptor 0xc0: 00 00 00 00 00 00 00 00 55 aa
Sep 27 14:17:38 truenas (da0:mpr0:0:13:0): Retrying command (per sense data)
Sep 27 14:17:39 truenas (da0:mpr0:0:13:0): WRITE(6). CDB: 0a 00 00 00 01 00
Sep 27 14:17:39 truenas (da0:mpr0:0:13:0): CAM status: SCSI Status Error
Sep 27 14:17:39 truenas (da0:mpr0:0:13:0): SCSI status: Check Condition
Sep 27 14:17:39 truenas (da0:mpr0:0:13:0): SCSI sense: HARDWARE FAILURE asc:81,0 (LA Check Failed)
Sep 27 14:17:39 truenas (da0:mpr0:0:13:0): Info: 0
Sep 27 14:17:39 truenas (da0:mpr0:0:13:0): Command Specific Info: 0x1400
Sep 27 14:17:39 truenas (da0:mpr0:0:13:0): Descriptor 0xc0: 00 00 00 00 00 00 00 00 55 aa
Sep 27 14:17:39 truenas (da0:mpr0:0:13:0): Retrying command (per sense data)
Sep 27 14:17:40 truenas (da0:mpr0:0:13:0): WRITE(6). CDB: 0a 00 00 00 01 00
Sep 27 14:17:40 truenas (da0:mpr0:0:13:0): CAM status: SCSI Status Error
Sep 27 14:17:40 truenas (da0:mpr0:0:13:0): SCSI status: Check Condition
Sep 27 14:17:40 truenas (da0:mpr0:0:13:0): SCSI sense: HARDWARE FAILURE asc:81,0 (LA Check Failed)
Sep 27 14:17:40 truenas (da0:mpr0:0:13:0): Info: 0
Sep 27 14:17:40 truenas (da0:mpr0:0:13:0): Command Specific Info: 0x1400
Sep 27 14:17:40 truenas (da0:mpr0:0:13:0): Descriptor 0xc0: 00 00 00 00 00 00 00 00 55 aa
Sep 27 14:17:40 truenas (da0:mpr0:0:13:0): Error 5, Retries exhausted
All the drives give me the same errors. I have moved them around in the 12 slot chassis. I can build pools on other drives just fine.

Anyone seen this before?

Thanks.
 

itronin

Well-Known Member
Nov 24, 2018
1,234
794
113
Denver, Colorado
Checking here to see if my drives are borked or salvageable... I have 6x Seagate ST6000NM0034 that came with 520b sector size. Since I have been down this road, I formatted them to 512b. That part seems to work:

Trying to create a pool in TrueNAS I get this error:

middlewared.service_exception.CallError: [EFAULT] Failed to wipe disk da0: [EFAULT] Command gpart create -s gpt /dev/da0 failed (code 1):
gpart: Input/output error


Anyone seen this before?

Thanks.
First did you check smart(ctl) to make sure you do not have any protection enabled on the drive? Like type 2 protection. Even after changing the block type 2 protection will result in an input/output error when you try and write to the drive.

If you do that needs to be changed.

Did you only change the block size or did you change the block size and perform a low level format after the change?