How to reformat HDD & SSD to 512B Sector Size

Discussion in 'Hard Drives and Solid State Drives' started by azev, Mar 1, 2015.

  1. azev

    azev Active Member

    Joined:
    Jan 18, 2013
    Messages:
    596
    Likes Received:
    147
    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.
     
    #1
  2. Jeggs101

    Jeggs101 Well-Known Member

    Joined:
    Dec 29, 2010
    Messages:
    1,441
    Likes Received:
    209
    Only 4 likes? This shouldn't be here. It should be on the front page.
     
    #2
  3. NetWise

    NetWise Active Member

    Joined:
    Jun 29, 2012
    Messages:
    599
    Likes Received:
    130
    It's been 12 hours! ;).
     
    #3
  4. Patriot

    Patriot Moderator

    Joined:
    Apr 18, 2011
    Messages:
    1,252
    Likes Received:
    650
    Just made it a sticky.
     
    #4
  5. chinesestunna

    chinesestunna Active Member

    Joined:
    Jan 23, 2015
    Messages:
    516
    Likes Received:
    102
    Quick question just to keep out of trouble, is this like a "low level format" that you can do with some of the older SCSI drives directly from the controller firmware? In that case, the format takes forever and the drive can get bricked if the format is interrupted.

    If this is the case we should recommend folks to only perform this on UPS backed up systems
     
    #5
  6. azev

    azev Active Member

    Joined:
    Jan 18, 2013
    Messages:
    596
    Likes Received:
    147
    hmm my honest answer is I don't know, however though formatting 450Gb 15K HGST drive only take a few minutes. Maybe Patrick can chime in on how long it took him to format the 3par SSD.
    I remember having to do low level format in the past especially in good old SCSI days, but haven't had the need for sas or sata drives.
     
    #6
  7. chinesestunna

    chinesestunna Active Member

    Joined:
    Jan 23, 2015
    Messages:
    516
    Likes Received:
    102
    That's my thoughts too, but given you did a 450GB in a few minutes doesn't sound like low level, I remember doing a 18GB and took like 3 hours in low level formatting
     
    #7
  8. T_Minus

    T_Minus Moderator

    Joined:
    Feb 15, 2015
    Messages:
    6,640
    Likes Received:
    1,383
    Awesome post. This could save me a lot of headache and time.
     
    #8
    james23 likes this.
  9. lmk

    lmk Member

    Joined:
    Dec 11, 2013
    Messages:
    128
    Likes Received:
    20
    @azev you win.

    I decided to test it out for myself and everyone (who is waiting to do it): It works.

    I used a 400GB 6Gbps SSD for the test. @chinesestunna It took roughly 16 minutes to perform the full format - so not akin to a normal "quick format".

    Again, that was with a SSD, so I can imagine a HDD will take a long time - especially once you enter into the TB(s) size range.
     
    #9
    rnavarro and T_Minus like this.
  10. chinesestunna

    chinesestunna Active Member

    Joined:
    Jan 23, 2015
    Messages:
    516
    Likes Received:
    102
    So now I'm curious why buy these OEM drives? Are they a lot cheaper?
     
    #10
  11. Patriot

    Patriot Moderator

    Joined:
    Apr 18, 2011
    Messages:
    1,252
    Likes Received:
    650
    Enterprise SAS drives for 50c/GB ... Yeah... that is dirt cheap.
     
    #11
  12. chinesestunna

    chinesestunna Active Member

    Joined:
    Jan 23, 2015
    Messages:
    516
    Likes Received:
    102
    What search strings/make/models should I be looking for?
     
    #12
  13. Jeggs101

    Jeggs101 Well-Known Member

    Joined:
    Dec 29, 2010
    Messages:
    1,441
    Likes Received:
    209
    #13
    chinesestunna likes this.
  14. cn9amt100up

    cn9amt100up Member

    Joined:
    Feb 11, 2015
    Messages:
    41
    Likes Received:
    9
    can i sg_format the hard drive connected to raid controller?
     
    #14
  15. alex1002

    alex1002 Member

    Joined:
    Apr 9, 2013
    Messages:
    517
    Likes Received:
    17
    Can anyone advice? I installed sg_utils but the sg_scan -i nothing happens...
     
    #15
  16. Jeggs101

    Jeggs101 Well-Known Member

    Joined:
    Dec 29, 2010
    Messages:
    1,441
    Likes Received:
    209
    Is it a SAS or SATA drive? RAID controller, HBA or onboard SATA?

    Good topic for its own thread.
     
    #16
  17. alex1002

    alex1002 Member

    Joined:
    Apr 9, 2013
    Messages:
    517
    Likes Received:
    17
    Tried 4 different cards
    onboard card SAS
    LSI 9240
    LSI 9260
    Dell PERC H310

    SAS HDD
    Controllers see it as JBOD
     
    #17
  18. lpallard

    lpallard Member

    Joined:
    Aug 17, 2013
    Messages:
    204
    Likes Received:
    5
    This saved me with a pair of 15k600's from a Netapp appliance to be used with a ServeRAID M5016..

    Definitely liking it!
     
    #18
  19. JSchuricht

    JSchuricht Active Member

    Joined:
    Apr 4, 2011
    Messages:
    126
    Likes Received:
    38
    Well that kinda worked... 2 of 4 drives are normal again. One I accidentally aborted (wrong keyboard) during the format and the other never started. Now both cannot be seen by either LSI or Marvell controllers.

    If anyone has any ideas I am all ears. LSI doesn't even show a drive, Marvell says "pd not ready or unknown device type".
     
    #19
  20. R.Zoli

    R.Zoli Member

    Joined:
    Sep 5, 2015
    Messages:
    48
    Likes Received:
    3

    I have Not the same but similar problem...

    I have a HP HITX5541904-A SSD. This is truly a Hitachi HGST HUSSL4040ASS drive. I want to use it with my adaptec 71605 raid controller, but the controller initialize the drive as "not supported currently on this raid card". An LSI 9270 doesn't show the drive and freeze in the raid bios....

    What can I do? Use it with a HP Raid controller? Is there any HP raid card what work in a a non HP system? Or can I flash a new firmware to the drive? Has anyone a good idea?
     
    #20

Share This Page