How to reformat HDD & SSD to 512B Sector Size

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

  1. dtrv

    dtrv Member

    Joined:
    Nov 23, 2016
    Messages:
    130
    Likes Received:
    21
    #101
  2. dmitryvd

    dmitryvd New Member

    Joined:
    Nov 28, 2017
    Messages:
    2
    Likes Received:
    0
    I meant the MSID, of course.
     
    #102
  3. dtrv

    dtrv Member

    Joined:
    Nov 23, 2016
    Messages:
    130
    Likes Received:
    21
    Thought there is a master password or something like that :)

    Thanks alot for linking to sedutil!
     
    #103
  4. frogtech

    frogtech Well-Known Member

    Joined:
    Jan 4, 2016
    Messages:
    1,212
    Likes Received:
    141
    Are there any NetApp HGST SAS disks out there that simply are not compatible with any other system even if you format them to the 512 byte block? Maybe perhaps due to the firmware loaded on the disk itself?

    Trying to avoid any potential gotchas with buying 25-30 disks at once and them not working even after re-formatting them.
     
    #104
  5. BLinux

    BLinux cat lover server enthusiast

    Joined:
    Jul 7, 2016
    Messages:
    2,348
    Likes Received:
    815
    is it possible to reformat HGST SAS drives that are have native 512 blocks to 4k blocks?
     
    #105
  6. dtrv

    dtrv Member

    Joined:
    Nov 23, 2016
    Messages:
    130
    Likes Received:
    21
    I have seen HGST SSDs that firmware only supports 512, 520 or 528 byte blocksize.
     
    #106
  7. BLinux

    BLinux cat lover server enthusiast

    Joined:
    Jul 7, 2016
    Messages:
    2,348
    Likes Received:
    815
    did you mean HDD or SSDs?
     
    #107
  8. Adeel Akram

    Adeel Akram New Member

    Joined:
    Nov 11, 2017
    Messages:
    4
    Likes Received:
    0
    Well we can't rule that out. I am currently stuck with 400 HGST 450GB 15K disks that are already formatted 512 bytes but refuse to work in any system that I have.
    I have tried dozens of serves and expansions so far. Tried Every tool i can think of and so far nothing has worked.

    I even have a 500$ reward for anyone who can break them. But so far no one has been able to crack them. :-(
     
    #108
  9. Oddworld

    Oddworld Member

    Joined:
    Jan 16, 2018
    Messages:
    35
    Likes Received:
    9
    Any progress on this? I have about 20x HGST drives that have been formatted from 520 to 512, but cannot write to them. I'm using 3x dell H310 cross-flashed to IT mode. I've tried:

    Commands
    /home/user/setblocksize -b512 /dev/sg11
    sg_format --format --size=512 /dev/sg13 -v
    sg_format --format --size=512 --six -v /dev/sg2

    sginfo
    Device Type 0
    Vendor: SE_HGST
    Product: DKR5D-J900SS
    Revision level: B8B8​

    sg_scan -i

    dev/sg2: scsi0 channel=0 id=0 lun=0
    SE_HGST DKR5D-J900SS B8B8 [rmb=0 cmdq=1 pqual=0 pdev=0x0]
    /dev/sg3: scsi0 channel=0 id=1 lun=0
    SE_HGST DKR5D-J900SS B8B8 [rmb=0 cmdq=1 pqual=0 pdev=0x0]
    /dev/sg4: scsi0 channel=0 id=2 lun=0
    SE_HGST DKR5D-J900SS B8B8 [rmb=0 cmdq=1 pqual=0 pdev=0x0]
    /dev/sg5: scsi0 channel=0 id=3 lun=0
    SE_HGST DKR5D-J900SS B8B8 [rmb=0 cmdq=1 pqual=0 pdev=0x0]
    /dev/sg6: scsi0 channel=0 id=4 lun=0
    SE_HGST DKR5D-J900SS B8B8 [rmb=0 cmdq=1 pqual=0 pdev=0x0]
    /dev/sg7: scsi2 channel=0 id=0 lun=0
    SE_HGST DKR5D-J900SS B8B8 [rmb=0 cmdq=1 pqual=0 pdev=0x0]
    /dev/sg8: scsi2 channel=0 id=1 lun=0
    SE_HGST DKR5D-J900SS B8B8 [rmb=0 cmdq=1 pqual=0 pdev=0x0]
    /dev/sg9: scsi2 channel=0 id=2 lun=0
    SE_HGST DKR5D-J900SS B8B8 [rmb=0 cmdq=1 pqual=0 pdev=0x0]
    /dev/sg10: scsi2 channel=0 id=3 lun=0
    SE_HGST DKR5D-J900SS B8B8 [rmb=0 cmdq=1 pqual=0 pdev=0x0]
    /dev/sg11: scsi2 channel=0 id=4 lun=0
    SE_HGST DKR5D-J900SS B8B8 [rmb=0 cmdq=1 pqual=0 pdev=0x0]
    </code>​
     
    #109
  10. Terry Kennedy

    Terry Kennedy Well-Known Member

    Joined:
    Jun 25, 2015
    Messages:
    1,020
    Likes Received:
    474
    I don't know of any HGST drive that comes in both 512n and 4Kn variants - it is usually 512e and 4Kn. These have different model numbers, so if it is possible to go from one to the other it would likely involve loading new firmware - and if people could get the firmware, you wouldn't see posts from people with 100's of unusable drives asking for firmware. The confusion probably stems from a typo on some HGST 4Kn drive labels where it says "This HDD has reduced LBA counts if formatted as 512 bytes + T10 PI (8 bytes)." That should be "...formatted as 4096 bytes + T10 PI..."
     
    #110
  11. Mirabis

    Mirabis Member

    Joined:
    Mar 18, 2016
    Messages:
    122
    Likes Received:
    6
    Months later finally trying again....

    sg3_utils does not see the disks (sg_scan), but storcli does. However I can't format from there ; (
     
    #111
  12. ceorl yip

    ceorl yip New Member

    Joined:
    May 4, 2017
    Messages:
    4
    Likes Received:
    0
    Thank you Pete.
    I bought the h310 controller... I'm in the process of formatting all my hus156045vls600 netapp to 512. So far, i was able to initialize one drive and tested moving and deleting some files... seems to work fine.

    Has anyone run into reliability issues with these formatted netapp hdds?


     
    #112
  13. mrcico

    mrcico New Member

    Joined:
    May 9, 2017
    Messages:
    1
    Likes Received:
    0
    Seems your raid card blocking your access. Use pass-through (like h200) raid card for format.
     
    #113
  14. minzak

    minzak New Member

    Joined:
    Mar 23, 2018
    Messages:
    1
    Likes Received:
    0
    I have same problem with no Access when format my test ST3600957SS. (((
    Can you tell detailed about it. how to find MSID for my HDD ST3600957SS, and how to erased all bands (0-3)?
    Which one command i must run to erase that bands? Thanks.
    Alexandr
    styxx@i.ua
     
    #114
  15. LarsM

    LarsM New Member

    Joined:
    Apr 3, 2018
    Messages:
    1
    Likes Received:
    0
    Hi

    I am having some issues with formatting drives from 512 to 520. At work I wipe storage systems with certified erasure software and the problem is that the software we use, have to format the drive from 520b (HP 3par storage, EMC etc) to 512b in order to erase the drive. Afterwards i have to manually format the drives back to 520b for the storage systems to recognize the drive again.

    I have done it succesfully with various drives (300GB, 450GB, 600GB, 900GB, 400GB SSD 1,92TB SSD - ALL SAS) but now i have the issue below.
    I am using the same syntax as with the other drives

    Anyone know what the problem is?

    sg_format --format --size=520 -6 -v -e /dev/sg1
    HGST HMRP3000S5xnN7.2 3P00 peripheral_type: disk [0x0]
    PROTECT=1
    << supports protection information>>
    Unit serial number: P9GB09AW
    LU name: 5000cca0581404d8
    mode sense (6) cdb: 1a 00 01 00 fc 00
    Mode Sense (block descriptor) data, prior to changes:
    Mode sense number of blocks maxed out, set longlba
    mode sense (10) cdb: 5a 10 01 00 00 00 00 00 fc 00
    Mode Sense (block descriptor) data, prior to changes:
    <<< longlba flag set (64 bit lba) >>>
    Number of blocks=5860533168 [0x15d50a3b0]
    Block size=512 [0x200]
    mode select (10) cdb: 55 11 00 00 00 00 00 00 22 00
    mode select (10):
    Fixed format, current; Sense key: Illegal Request
    Additional sense: Parameter list length error
    Sense Key Specific: Error in Command: byte 7
    MODE SELECT command: Illegal request sense key, apart from Invalid opcode
     
    #115
  16. Mirabis

    Mirabis Member

    Joined:
    Mar 18, 2016
    Messages:
    122
    Likes Received:
    6
    Ended up buying a PERC200 flashed to IT and managed to format the HDD's :)
     
    #116
  17. oxi

    oxi New Member

    Joined:
    Apr 26, 2018
    Messages:
    1
    Likes Received:
    0
    Did you check the size from the firmware-chip? I saw that the HP HDD have 2MB and same model from HGST only 512KB.
     
    #117
  18. Allan Houston

    Allan Houston New Member

    Joined:
    Jun 18, 2018
    Messages:
    1
    Likes Received:
    6
    Hoping this will help someone as it took me ages to get a working solution...

    I couldn't get sg_format to work with my EMC formatted HGST HUS72303CLAR3000 3TB drives, tried all the combinations of command line arguments mentioned here, but nada:

    root@ubuntu:~# sg_format --format --size=512 -v /dev/sg2
    HITACHI HUS72303CLAR3000 C442 peripheral_type: disk [0x0]
    PROTECT=1
    << supports protection information>>
    Unit serial number: YXGMGGTK
    LU name: 5000cca046236594
    mode sense (10) cdb: 5a 00 01 00 00 00 00 00 fc 00
    Mode Sense (block descriptor) data, prior to changes:
    Mode sense number of blocks maxed out, set longlba
    mode sense (10) cdb: 5a 10 01 00 00 00 00 00 fc 00
    Mode Sense (block descriptor) data, prior to changes:
    <<< longlba flag set (64 bit lba) >>>
    Number of blocks=5770371118 [0x157f0e02e]
    Block size=520 [0x208]
    mode select (10) cdb: 55 11 00 00 00 00 00 00 22 00
    mode select (10):
    Descriptor format, current; Sense key: Illegal Request
    Additional sense: Parameter list length error
    Descriptor type: Information: >> descriptor too short
    00 00 00 00 00 00 00 00 00 00
    Descriptor type: Sense key specific: Field pointer:
    Error in Command: byte 7
    Descriptor type: Field replaceable unit code: 0x0
    Descriptor type: Block commands: Incorrect Length Indicator (ILI) clear
    Descriptor type: Vendor specific [0x80]
    f8 20
    Descriptor type: Vendor specific [0x81]
    00 0MODE SELECT command: Illegal request sense key, apart from Invalid opcode


    ...but I did have success with the setblocksize util!

    I've put together a very slightly modded version of setblocksize here with higher possible and default timeouts (the default is way to low for bigger drives) as well as the instructions on how to compile it etc. etc.

    ahouston/setblocksize

    So far I've rescued 7 of my EMC 3TB HGST drives, waiting on the last batch to finish up :)
     
    #118
    ecosse, rnavarro, kurbler and 3 others like this.
  19. Wingman5

    Wingman5 New Member

    Joined:
    Jul 16, 2018
    Messages:
    3
    Likes Received:
    0
    Hello all, I got the same...

    I have 4 100GB Samsung SSD's from an EMC storage formatted at 520B/sector.

    I tried all of the commands mentioned here at the forum, but I keep getting the following error:
    A FORMAT UNIT will commence in 5 seconds
    ALL data on /dev/sg4 will be DESTROYED
    Press control-C to abort
    format unit cdb: 04 18 00 00 00 00
    format unit:
    Fixed format, current; Sense key: Illegal Request
    Additional sense: Invalid command operation code
    Format unit command: Illegal request, invalid opcode sense key
    FORMAT UNIT failed

    I tried it as mentioned with the option --six but no luck.

    does anyone have a good suggestion?
     
    #119
  20. neggles

    neggles Member

    Joined:
    Sep 2, 2017
    Messages:
    34
    Likes Received:
    2
    Try sg_format with the -S (secure erase mode) flag. May work better.

    Can someone try to solve this riddle for me?

    I have four HUSMR1610ASS204s that presumably came out of a 3PAR. They report themselves as being an HP-specific part number, HSCP0920S5xnNMRI, unlike the HUSMR1010ASS204 model units (same HP P/N) I have from the same seller. When I did my first sg_format -F -6 /dev/sgX to them, they mysteriously lost 70GB of capacity/blocks???

    Screenshot below contains 3 drives, a 1010 and two 1610s. the 1010 (sg2) happily reformatted from 1015GB of 520b sectors to 1000GB of 512b, with the block count remaining unchanged. As you can see it has the same number of blocks as sg4, which is an un-sg_formatted 1610.

    [​IMG]

    But sg3, the 1610 which I'd already formatted to 512b, has gone from 1,953,525,168 blocks to 1,788,974,512 blocks - 164,550,656 blocks have disappeared entirely! sg4 did this also after I formatted it;

    [​IMG]

    What the heck is going on here? Smartmontools reports 0% write endurance used and <35TB lifetime writes - nothing for a drive of this size and rating. Even reformatting back to 520 bytes (which I did before the screenshot above) hasn't given me back the 70GB, nor has an sg_sanitize or running sg_format with the -S (secure erase) flag.

    Anyone have a clue what's going on here?

    Edit: quick update to this, took me less time to fix than to make the original post... oops. If I run an sg_format -r --count=1953525168 /dev/sgX (command the device to resize itself) after changing the block size, the capacity comes back and the drive seems to be totally OK with it;

    [​IMG]

    I suspect this has to do with the HP firmware and the fact that these are labelled as "920GB" when they're actually 1000GB units internally (HUSMR1010ASS20 / HUSMR1610ASS20 parts are 1000GB parts) - the HP firmware appears to recommend a 930GB capacity instead of 1000, even though they were reporting 1000GB of capacity out of the box.

    Weird.
    Anyway, hopefully that helps someone who bought one of these weird 1610s.
     
    #120
    Last edited: Aug 12, 2018

Share This Page