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.

Jeff504

New Member
Jul 31, 2017
3
0
1
32
The PERC H700 is a RAID controller and doesn't provide a full passthru interface for sg3_utils. You will need to attach the drives to a non-RAID controller (in LSI speak, "IT mode"). This can be a bit of a pain in an Rx10 as the H700 is in a dedicated slot that complains about non-Dell cards, and the backplane cables aren't long enough to reach the regular expansion slot area where you'd temporarily install an IT-mode controller.
OK that being said, what would be my best plan of approach? Sell these drives and buy some different ones? Thanks for the info also!
 

MikeJ

New Member
Jul 27, 2017
5
1
3
68
Help needed:
I have a lot of Hitachi sas 300gb 10k 2.5" Model: DKR5C-J30SS P/N: 0B25660 CONFIG CODE: 105
I have successfully reformatted it to 512b by sg3 utility, but windows disk manager still can't create partition on it, it reported " disk I/O error"
Could it be the firmware caused the problem?
Anyone has a solution for it?
Reward provided if anyone could help me to solve this problem.
TIA.
These DKR5x drives have some very strange firmware in them which messes up all WRITE commands.
It doesn't matter if they are formatted to 512 or 520 bps - WRITE commands will mostly fail, and the conditions to make them not fail are unrealistic. I
have no idea why HGST has them working like this.
Also, I have not had any luck downloading any "generic" firmware into these.

I second the offer for a reward for any help getting these drives to work normally.
I anyone wants the details of the testing we've done and the results feel free to ask.
mikej@stbsuite.com
 

MikeJ

New Member
Jul 27, 2017
5
1
3
68
These DKR5x drives have some very strange firmware in them which messes up all WRITE commands.
It doesn't matter if they are formatted to 512 or 520 bps - WRITE commands will mostly fail, and the conditions to make them not fail are unrealistic. I
have no idea why HGST has them working like this.
Also, I have not had any luck downloading any "generic" firmware into these.

I second the offer for a reward for any help getting these drives to work normally.
I anyone wants the details of the testing we've done and the results feel free to ask.
mikej@stbsuite.com
Thought i'd pst the details of the particular drives I'm working with:
Interface = 6G SAS
VENDOR = SE_HGST
PRODUCT = DKR5D-J600SS
FIRMWARE = B8B8

From label:
Model: HUC10960CSS600
Config Code: 004
 

Jeff504

New Member
Jul 31, 2017
3
0
1
32
The PERC H700 is a RAID controller and doesn't provide a full passthru interface for sg3_utils. You will need to attach the drives to a non-RAID controller (in LSI speak, "IT mode"). This can be a bit of a pain in an Rx10 as the H700 is in a dedicated slot that complains about non-Dell cards, and the backplane cables aren't long enough to reach the regular expansion slot area where you'd temporarily install an IT-mode controller.
Thanks for your help! I purchased an H310 flashed it to IT mode and it worked like a champ.
 

chandrabhan maktal

New Member
Aug 8, 2017
1
0
1
31
For those of you who have purchased OEM rebranded HDD or SSD from major storage vendor such as NetApp, EMC, or even HP, you might find out that the drive that you've purchased will not initialized in windows. The main reason is that the drive come formatted from the factory with a non standard sector size of 520B or 528B, and windows refused to initialized drive other than the normal 512B or 4Kb. I read online the reason that these drive are formatted that way is due to some proprietary software that these vendor uses needs the additional sector size for some fancy parity stuff.

Anyway, you probably think that you are SOL after trying every possible means to use the drive.
Luckily there is a way to change the drive sector back to 512B. It require that you install centOS linux and follow the instruction below

Look in /var/log/messages after reboot, and you will see useful information:

Mar 9 08:08:54 vhc-carthage kernel: sd 6:0:7:0: [sdh] Attached SCSI disk
Mar 9 08:08:57 vhc-carthage kernel: ...ready
Mar 9 08:08:57 vhc-carthage kernel: sd 6:0:8:0: [sdi] Unsupported sector size 520.
Mar 9 08:08:57 vhc-carthage kernel: sd 6:0:8:0: [sdi] 0 512-byte logical blocks: (0 B/0 B)
Mar 9 08:08:57 vhc-carthage kernel: sd 6:0:8:0: [sdi] 520-byte physical blocks
Mar 9 08:08:57 vhc-carthage kernel: sd 6:0:8:0: [sdi] Write Protect is off
Mar 9 08:08:57 vhc-carthage kernel: sd 6:0:8:0: [sdi] Write cache: disabled, read cache: enabled, supports DPO and FUA
Mar 9 08:08:57 vhc-carthage kernel: sd 6:0:8:0: [sdi] Unsupported sector size 520.
Mar 9 08:08:57 vhc-carthage kernel: sd 6:0:8:0: [sdi] Attached SCSI disk

# yum install sg3_utils

# sg_scan -i
/dev/sg8: scsi6 channel=0 id=7 lun=0
NETAPP X287_S15K5288A15 NA00 [rmb=0 cmdq=1 pqual=0 pdev=0x0]
/dev/sg9: scsi6 channel=0 id=8 lun=0
NETAPP X287_S15K5288A15 NA00 [rmb=0 cmdq=1 pqual=0 pdev=0x0]

Now you should format the offending drive using the "sg_format" command.
[root@azev /]# sg_format --format --size=512 /dev/sg8

NETAPP X287_S15K5288A15 NA00 peripheral_type: disk [0x0]
Mode Sense (block descriptor) data, prior to changes:
Number of blocks=573653847 [0x22314357]
Block size=520 [0x208]

A FORMAT will commence in 10 seconds
ALL data on /dev/sg8 will be DESTROYED
Press control-C to abort

It is pretty simple, and after the format is completed, you should have no problem initializing the drive in Windows. However, per Patrick, some drive might require that you've bring the drive offline and then online before it would allow you to format it.

Some people argue that the custom firmware on the drive is set to work with sector size 520B or 528B, but during my benchmark, the drive performance was pretty much on par with the normal retail channel.

Hopefully you find this information useful next time you come across a drive with other than 512B sector size.
Thank you for providing the most useful information.IT helps me a lot.
 

Konstantun

New Member
Aug 21, 2017
1
0
1
48
I have used this method in the past a ton and it has worked. However I have run into a problem with some new drives I have received. I am trying to change the block size of some disks I received from an auction but I can't use them because they are formatted with a block size of 520. No big deal, in the past all I have had to do is use sg_util (sg_format) to change the block size from 520 to 512. However, for these particular Samsung SSD drives it doesn't appear to work.

# sg_format -v --format --size=512 /dev/sdg
ATA SS160511 4C3Q peripheral_type: disk [0x0]
PROTECT=0
Unit serial number: XXXXXXX
LU name: XXXXXXXXX
mode sense (10) cdb: 5a 00 01 00 00 00 00 00 fc 00
Mode Sense (block descriptor) data, prior to changes:
Number of blocks=0 [0x0]
Block size=512 [0x200]
format cdb: 04 18 00 00 00 00
format unit: Fixed format, current; Sense key: Illegal Request
Additional sense: Invalid field in cdb
Format command: Illegal request sense key, apart from Invalid opcode
FORMAT failed

Regards
I have the same problem with my Samsung SSD 200 GB.
But here: '[Smartmontools-database] Samsung 3.5" 200GB SSD info' - MARC i see:
Device Model: SAMSUNG MCCPE2HGGAXP-0VCC3
Serial Number: S0HTNEAZ501608
LU WWN Device Id: 5 002538 1500021a2
Firmware Version: VCC16C4Q
User Capacity: 200,049,647,616 bytes [200 GB]
Sector Size: 512 bytes logical/physical

It looks like reformated to 512 bytes. May be it depends on FW version? What is your SSD FW version? My is VCC13C3Q.
 

salim

New Member
Sep 21, 2017
2
0
1
50
For those of you who have purchased OEM rebranded HDD or SSD from major storage vendor such as NetApp, EMC, or even HP, you might find out that the drive that you've purchased will not initialized in windows. The main reason is that the drive come formatted from the factory with a non standard sector size of 520B or 528B, and windows refused to initialized drive other than the normal 512B or 4Kb. I read online the reason that these drive are formatted that way is due to some proprietary software that these vendor uses needs the additional sector size for some fancy parity stuff.

Anyway, you probably think that you are SOL after trying every possible means to use the drive.
Luckily there is a way to change the drive sector back to 512B. It require that you install centOS linux and follow the instruction below

Look in /var/log/messages after reboot, and you will see useful information:

Mar 9 08:08:54 vhc-carthage kernel: sd 6:0:7:0: [sdh] Attached SCSI disk
Mar 9 08:08:57 vhc-carthage kernel: ...ready
Mar 9 08:08:57 vhc-carthage kernel: sd 6:0:8:0: [sdi] Unsupported sector size 520.
Mar 9 08:08:57 vhc-carthage kernel: sd 6:0:8:0: [sdi] 0 512-byte logical blocks: (0 B/0 B)
Mar 9 08:08:57 vhc-carthage kernel: sd 6:0:8:0: [sdi] 520-byte physical blocks
Mar 9 08:08:57 vhc-carthage kernel: sd 6:0:8:0: [sdi] Write Protect is off
Mar 9 08:08:57 vhc-carthage kernel: sd 6:0:8:0: [sdi] Write cache: disabled, read cache: enabled, supports DPO and FUA
Mar 9 08:08:57 vhc-carthage kernel: sd 6:0:8:0: [sdi] Unsupported sector size 520.
Mar 9 08:08:57 vhc-carthage kernel: sd 6:0:8:0: [sdi] Attached SCSI disk

# yum install sg3_utils

# sg_scan -i
/dev/sg8: scsi6 channel=0 id=7 lun=0
NETAPP X287_S15K5288A15 NA00 [rmb=0 cmdq=1 pqual=0 pdev=0x0]
/dev/sg9: scsi6 channel=0 id=8 lun=0
NETAPP X287_S15K5288A15 NA00 [rmb=0 cmdq=1 pqual=0 pdev=0x0]

Now you should format the offending drive using the "sg_format" command.
[root@azev /]# sg_format --format --size=512 /dev/sg8

NETAPP X287_S15K5288A15 NA00 peripheral_type: disk [0x0]
Mode Sense (block descriptor) data, prior to changes:
Number of blocks=573653847 [0x22314357]
Block size=520 [0x208]

A FORMAT will commence in 10 seconds
ALL data on /dev/sg8 will be DESTROYED
Press control-C to abort

It is pretty simple, and after the format is completed, you should have no problem initializing the drive in Windows. However, per Patrick, some drive might require that you've bring the drive offline and then online before it would allow you to format it.

Some people argue that the custom firmware on the drive is set to work with sector size 520B or 528B, but during my benchmark, the drive performance was pretty much on par with the normal retail channel.

Hopefully you find this information useful next time you come across a drive with other than 512B sector size.
 

MikeJ

New Member
Jul 27, 2017
5
1
3
68
You're working with a different drive model.
I'm talking about a DKR5D-J600SS, and it seems to be a problem with any of the DKR5D family.
Yes, they can be reformatted to any block size you want, but all WRITE CDBs are broken.

The drive you're working on apparently doesn't have this problem.
But these DKR5D drives definately have it.
 

HPuser

New Member
Sep 23, 2017
1
0
1
28
I need some help too, the whole story of formatting towards 512B is going fine and without a problem.
However, when I enter de discs in a server (HP g8 servers), they see the discs, but as soon as I create a raid array, the p420i controller gives a fatal error. All drives are marked failed after that, until the reboot, then they are visible without problems until I try to create a raid array again.

Many thanks in advance!

Edit: I have also tried with an HP H222 hba controller, same results.
I'm working with Hitachi DKR5c-J600SS drives (same drives as MikeJ...)
 
Last edited:

MOHdennisNL

New Member
Sep 30, 2017
2
0
1
38
Hi

I found this guide trough YouTube,
but i seem to be having an error and was hoping you guys could help me.

I currently own a Netapp MKII ATA.
When hooked up to the fibrechannel cards the 15 discs all showupm but when i want to format them to 512sector i get the following error:

Used Command:
# sg_format --format size=512 /dev/sg4
MAXTOR 5A320J0 SX R5VV

Output:
format unit: transport: Host_status=0x07 [DID+ERROR]
Driver_status=0x08 [DRIVER_SENSE, SUGGEST_OK]

Format command not supported
FORMAT failed

extra found trough using the -v option:
mode sense (10) : pass-trough requested 252 bytes but got 28 bytes


So should i format them all seperate trough an ordinary ATA port, of does anyone knows an way to force this?
 

Terry Kennedy

Well-Known Member
Jun 25, 2015
1,140
594
113
New York City
www.glaver.org
MAXTOR 5A320J0 SX R5VV

So should i format them all seperate trough an ordinary ATA port, of does anyone knows an way to force this?
If this is the 320GB PATA drive, I really have to ask... WHY?

Those drives are (at best) well over 10 years old, 5400 RPM, 2MB cache, 44MB/sec maximum transfer rate. Not to mention finding a controller that will actually talk to a bunch of them - you're limited to things like the 3Ware 7000/7500 series, which is also over 10 years old and requires a 64-bit/66MHz legacy PCI slot.
 
  • Like
Reactions: dswartz

MOHdennisNL

New Member
Sep 30, 2017
2
0
1
38
why?
cheap off-shelf disc cabinets.

and it now works with an EMC LPe1150-E instead of an 3ware 7000/7500 (and it isnt even supported)

and i have swapped out the MKII with an MKVI board to achieve 4gb fiber incl the ESH4 controller.

This all works, exept the MKVI doesnt init the ata drives.

but i happen to got 1 other pcb in the shelf, P/N65695-02 and this one is sata flavour.

and according to the NepApp site this should work.
 

alyin

New Member
Dec 7, 2016
3
0
1
61
Just a reminder for someone who use Sg3 ultility in Windows CMD environment, you must run CMD with administrator right, otherwise you won't see your SAS drive.
 

dtrv

Member
Nov 23, 2016
132
21
18
Need some help reformating HGST SSDs. These are HUSML404AS601 devices.

The problem is that these devices pretend that they are write protected and every write operation on these drives fails.

Code:
root@sc113m:~# sg_format --size 512 --format --verbose  /dev/sg2
    inquiry cdb: 12 00 00 00 24 00
    HITACHI   HRLP0400S5xnEMLC  3P01   peripheral_type: disk [0x0]
      PROTECT=1
      << supports protection information>>
    mode sense (10) cdb: 5a 00 01 00 00 00 00 00 fc 00
Mode Sense (block descriptor) data, prior to changes:
  Number of blocks=781422768 [0x2e9390b0]
  Block size=512 [0x200]

... the usual countdown ...

    format cdb: 04 18 00 00 00 00
format unit:  Fixed format, current;  Sense key: Data Protect
 Additional sense: Access denied - no access rights
Format command: Data protect sense key, write protected media?
FORMAT failed
I tried every combination of --fmtpinfo and --pfu with/without --six ... but with no luck. The device behaves as it has a physical switch for write protection - like tapes or disks have.

I also tried to change the SENSE MODES with the sdparm tool and other tools like setblocksize ... but all fails. Without help I don't think I can get these drives to 512b blocksize :-(

Any help and ideas appreciated!

Here are some more infos:
Code:
root@sc113m:~# sg_inq /dev/sg2
standard INQUIRY:
  PQual=0  Device_type=0  RMB=0  LU_CONG=0  version=0x06  [SPC-4]
  [AERC=0]  [TrmTsk=0]  NormACA=0  HiSUP=1  Resp_data_format=2
  SCCS=0  ACC=0  TPGS=0  3PC=0  Protect=1  [BQue=0]
  EncServ=0  MultiP=1 (VS=0)  [MChngr=0]  [ACKREQQ=0]  Addr16=0
  [RelAdr=0]  WBus16=0  Sync=0  [Linked=0]  [TranDis=0]  CmdQue=1
  [SPI: Clocking=0x0  QAS=0  IUS=0]
    length=164 (0xa4)   Peripheral device type: disk
 Vendor identification: HITACHI
 Product identification: HRLP0400S5xnEMLC
 Product revision level: 3P01
 Unit serial number:         XYV8YRZA
 

Sorin Bidian

New Member
Jan 13, 2016
20
3
3
53
I have some Samsung MZ-3S9200T/oC3 200 gb SSD with firmware VCC3EC3Q. I try to reformat with multiple HBA and different OS and now luck. Today I put one one on Dell H310 in IT mode and boot ESXI 6.0. Strange but I can use it for datastore. If I pass-through the controller H310 to other VM with Ubuntu I can't use de disc. I try on Xpenology but not working. Maybe help some one to use disks. I put the disk on some shelf for three months and don't think to ue this anymore.
 

Adeel Akram

New Member
Nov 11, 2017
8
0
1
42
Hi Guys,

I bought some used Hitachi Disks (Model: HUS154545VLS300) from a local supplier.

I knew that they were storage disks and were formatted 520bytes, but i was not worried since i have previously used sg_utils to format storage disks and use them in servers. But these drives are some tough cookies.

I have almost tried everything i can think of but have so far failed to make them useful.

I have tried different servers, different RAID/SAS cards, integrated SAS ports on dell workstations, Installing the disks in Fiber & SAS Disk storage expansions from different vendors.… a tone of Low Level format tools…

I even bought the Hitachi Disk Expansion in which these drives were originally installed and hooked up with a SAS controller to Dell PE2950.

So far nothing has been able to get these working.

sg_util which has not let me down so far also failed here with the below error.

[root@localhost admin]# sg_format -v --format --size=512 /dev/sg3
inquiry cdb: 12 00 00 00 24 00
HITACHI DKR2H-K450SS D017 peripheral_type: disk [0x0]
PROTECT=0
mode sense (10) cdb: 5a 00 01 00 00 00 00 00 fc 00
mode sense (10): pass-through requested 252 bytes but got 28 bytes
Mode Sense (block descriptor) data, prior to changes:
Number of blocks=879097968 [0x3465f870]
Block size=512 [0x200]

A FORMAT will commence in 10 seconds
ALL data on /dev/sg3 will be DESTROYED
Press control-C to abort
A FORMAT will commence in 5 seconds
ALL data on /dev/sg3 will be DESTROYED
Press control-C to abort
format cdb: 04 18 00 00 00 00
format unit: Fixed format, current; Sense key: Not Ready
Additional sense: Logical unit not ready, notify (enable spinup) required
Format command, device not ready
FORMAT failed


I am desperate at this stage... If anyone who can help me sort this out I would be happy to compensate him for his efforts. :)
 

Adeel Akram

New Member
Nov 11, 2017
8
0
1
42
Looking at the su_utils output, MukeJ suggested that the drive was not spinning up.

I tried using "sdparm" to force the drive to spin up, but even sdparm is not able to make the drive spin up. It times out. :-(

[root@localhost ~]# sdparm --command=start --six -v /dev/sg2
>>> about to open device name: /dev/sg2
/dev/sg2: HITACHI DKR2H-K450SS D017
Start stop unit command: 1b 00 00 00 01 00
start stop unit: transport: Host_status=0x03 [DID_TIME_OUT]
Driver_status=0x00 [DRIVER_OK, SUGGEST_OK]

[root@localhost ~]# sdparm --command=start /dev/sg2
/dev/sg2: HITACHI DKR2H-K450SS D017
start stop unit: transport: Host_status=0x03 [DID_TIME_OUT]
Driver_status=0x00 [DRIVER_OK, SUGGEST_OK]
 

dmitryvd

New Member
Nov 28, 2017
2
0
1
53
Need some help reformating HGST SSDs. These are HUSML404AS601 devices.

The problem is that these devices pretend that they are write protected and every write operation on these drives fails.

Code:
root@sc113m:~# sg_format --size 512 --format --verbose  /dev/sg2
    inquiry cdb: 12 00 00 00 24 00
    HITACHI   HRLP0400S5xnEMLC  3P01   peripheral_type: disk [0x0]
      PROTECT=1
      << supports protection information>>
    mode sense (10) cdb: 5a 00 01 00 00 00 00 00 fc 00
Mode Sense (block descriptor) data, prior to changes:
  Number of blocks=781422768 [0x2e9390b0]
  Block size=512 [0x200]

... the usual countdown ...

    format cdb: 04 18 00 00 00 00
format unit:  Fixed format, current;  Sense key: Data Protect
 Additional sense: Access denied - no access rights
Format command: Data protect sense key, write protected media?
FORMAT failed
Hi!
I solved the problem with sedutil for TCG Enterprise - GitHub - scaledata/sedutil: Fork of DTA sedutil Self encrypting drive software
First I erased all bands (0-3) using the MSI password, then I was able to format the disk.