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.

masterchief07

New Member
Feb 18, 2020
29
0
1
Yeah, no go here. I installed Windows and still can't get the drives to show. Last ditch effort I am going to scoop an HP H220 HBA and try that way. Hopefully they'll pass through and reformatting to 512b via that will allow them to show via the P408i so I can get them into a RAID array.
 

bandit8623

Member
May 25, 2021
63
19
8
so looks like jbod only likes 4k or 512 at least for lsi as well. once formatted to 520 all the drives show up as unsupported and wont pass any info to the os. hdsentinel no longer can grab any smart info. pic attached.

my guess is once u have drives formatted to 4k or 512 they will pass through. unless u want to use a raid then no need :)

in your case 4kn would be your best bet if the controller supports.
 

Attachments

Mithril

Active Member
Sep 13, 2019
354
106
43
Trying and failing to reformat 2 HUH728080AL5201 (HGST Ultrastar He8) to actual 512. They seem to have protection enabled so they are showing lower than normal capacity. I have multiple of this model and the rest are showing 8TB (in base 10) on the nose (more or less). 8001563222016 vs 7865536647168
I've done a few passes of sg_format, with and without the "no disk level protection/extra bits" flags, such as " sg_format -v --format --fmtpinfo=0 --pfu=0 --size=512". Tried power cycling the machine just in case, still no change.

They were in use "as is" and function fine, but it bothers me :)
 

itronin

Well-Known Member
Nov 24, 2018
1,233
793
113
Denver, Colorado
@Mithril

my recollection is (1) get rid of the protection (2) I formatted to 4k blocks then I saw the correct size... I use 4K blocks. its possible that taking it back down to 512 at that point will report the correct size then again... long wait time for the experiment to complete though.

I also recall a post somewhere - so let me look.

yeah over at serverbuilds.net

 

Mithril

Active Member
Sep 13, 2019
354
106
43
@Mithril

my recollection is (1) get rid of the protection (2) I formatted to 4k blocks then I saw the correct size... I use 4K blocks. its possible that taking it back down to 512 at that point will report the correct size then again... long wait time for the experiment to complete though.

I also recall a post somewhere - so let me look.

yeah over at serverbuilds.net

Formatting to 4k did the trick! Not sure if that would have worked as the first step or if it was a combo of steps, but regardless all drives now show 8,001,563,222,016 :D
 
  • Like
Reactions: itronin

eptesicus

Active Member
Jun 25, 2017
151
37
28
35
Any wisdom or guidance on formatting a 4kn SATA drive to 512? I have 4x HGST HUH721010ALN600 10TB SATA 4Kn drives (from GoHardDrive on ebay), and am struggling to get them formatted to 512. I've tried the WD HUGO tool, sg utils, hdparm, and none have been successful, all failing.

I need these formatted to 512 to pass them through as RDM disks on one of my ESXi hosts, and long term, I want to get more of these if I can find a successful formatting method so that I can extend my TrueNAS backup pool that has 512 formatted shucked Easystores, and not have mixed formats if I can help it. Otherwise, I'll need to source some different drives.
 

itronin

Well-Known Member
Nov 24, 2018
1,233
793
113
Denver, Colorado
@eptesicus some additional information may be useful while trying to help you. can you provide full smartctl -a output and a full pic of a label for an example drive that is giving you difficulties?

edit
also the specific commands you have tried and the corresponding error output
 
Last edited:

Samir

Post Liker and Deal Hunter Extraordinaire!
Jul 21, 2017
3,257
1,447
113
49
HSV and SFO
Any wisdom or guidance on formatting a 4kn SATA drive to 512? I have 4x HGST HUH721010ALN600 10TB SATA 4Kn drives (from GoHardDrive on ebay), and am struggling to get them formatted to 512. I've tried the WD HUGO tool, sg utils, hdparm, and none have been successful, all failing.

I need these formatted to 512 to pass them through as RDM disks on one of my ESXi hosts, and long term, I want to get more of these if I can find a successful formatting method so that I can extend my TrueNAS backup pool that has 512 formatted shucked Easystores, and not have mixed formats if I can help it. Otherwise, I'll need to source some different drives.
One thing that may kinda work is putting one of the drives in the easystore enclosure and using the wd utility to format for 'xp compatibility' and then back. This supposedly activates/deactivates the 4k/512k of the drive installed, but I'm not sure if it will behave this way outside of the enclosure, also it may not even work with the drive as an HGST didn't work, whereas a WD black did (only used in the enclosure though).
 

eptesicus

Active Member
Jun 25, 2017
151
37
28
35
@eptesicus some additional information may be useful while trying to help you. can you provide full smartctl -a output and a full pic of a label for an example drive that is giving you difficulties?

edit
also the specific commands you have tried and the corresponding error output


smartctl -a /dev/sdr:
Code:
smartctl 7.2 2020-12-30 r5155 [x86_64-linux-5.10.131+truenas] (local build)
Copyright (C) 2002-20, Bruce Allen, Christian Franke, www.smartmontools.org

=== START OF INFORMATION SECTION ===
Model Family:     HGST Ultrastar He10
Device Model:     HGST HUH721010ALN600
Serial Number:    7PH2RTBC
LU WWN Device Id: 5 000cca 251cf55c8
Firmware Version: LHGNT21D
User Capacity:    10,000,831,348,736 bytes [10.0 TB]
Sector Size:      4096 bytes logical/physical
Rotation Rate:    7200 rpm
Form Factor:      3.5 inches
Device is:        In smartctl database [for details use: -P show]
ATA Version is:   ACS-2, ATA8-ACS T13/1699-D revision 4
SATA Version is:  SATA 3.2, 6.0 Gb/s (current: 6.0 Gb/s)
Local Time is:    Mon Sep 12 10:15:01 2022 CDT
SMART support is: Available - device has SMART capability.
SMART support is: Enabled

=== START OF READ SMART DATA SECTION ===
SMART overall-health self-assessment test result: PASSED

General SMART Values:
Offline data collection status:  (0x80) Offline data collection activity
                                        was never started.
                                        Auto Offline Data Collection: Enabled.
Self-test execution status:      (   0) The previous self-test routine completed
                                        without error or no self-test has ever
                                        been run.
Total time to complete Offline
data collection:                (   93) seconds.
Offline data collection
capabilities:                    (0x5b) SMART execute Offline immediate.
                                        Auto Offline data collection on/off support.
                                        Suspend Offline collection upon new
                                        command.
                                        Offline surface scan supported.
                                        Self-test supported.
                                        No Conveyance Self-test supported.
                                        Selective Self-test supported.
SMART capabilities:            (0x0003) Saves SMART data before entering
                                        power-saving mode.
                                        Supports SMART auto save timer.
Error logging capability:        (0x01) Error logging supported.
                                        General Purpose Logging supported.
Short self-test routine
recommended polling time:        (   2) minutes.
Extended self-test routine
recommended polling time:        (1115) minutes.
SCT capabilities:              (0x003d) SCT Status supported.
                                        SCT Error Recovery Control supported.
                                        SCT Feature Control supported.
                                        SCT Data Table supported.

SMART Attributes Data Structure revision number: 16
Vendor Specific SMART Attributes with Thresholds:
ID# ATTRIBUTE_NAME          FLAG     VALUE WORST THRESH TYPE      UPDATED  WHEN_FAILED RAW_VALUE
  1 Raw_Read_Error_Rate     0x000b   100   100   016    Pre-fail  Always       -       0
  2 Throughput_Performance  0x0005   134   134   054    Pre-fail  Offline      -       96
  3 Spin_Up_Time            0x0007   154   154   024    Pre-fail  Always       -       440 (Average 416)
  4 Start_Stop_Count        0x0012   100   100   000    Old_age   Always       -       10
  5 Reallocated_Sector_Ct   0x0033   100   100   005    Pre-fail  Always       -       0
  7 Seek_Error_Rate         0x000b   100   100   067    Pre-fail  Always       -       0
  8 Seek_Time_Performance   0x0005   128   128   020    Pre-fail  Offline      -       18
  9 Power_On_Hours          0x0012   094   094   000    Old_age   Always       -       43801
10 Spin_Retry_Count        0x0013   100   100   060    Pre-fail  Always       -       0
12 Power_Cycle_Count       0x0032   100   100   000    Old_age   Always       -       10
22 Helium_Level            0x0023   100   100   025    Pre-fail  Always       -       100
192 Power-Off_Retract_Count 0x0032   099   099   000    Old_age   Always       -       1783
193 Load_Cycle_Count        0x0012   099   099   000    Old_age   Always       -       1783
194 Temperature_Celsius     0x0002   176   176   000    Old_age   Always       -       34 (Min/Max 19/40)
196 Reallocated_Event_Count 0x0032   100   100   000    Old_age   Always       -       0
197 Current_Pending_Sector  0x0022   100   100   000    Old_age   Always       -       0
198 Offline_Uncorrectable   0x0008   100   100   000    Old_age   Offline      -       0
199 UDMA_CRC_Error_Count    0x000a   200   200   000    Old_age   Always       -       0

SMART Error Log Version: 1
No Errors Logged

SMART Self-test log structure revision number 1
Num  Test_Description    Status                  Remaining  LifeTime(hours)  LBA_of_first_error
# 1  Short offline       Completed without error       00%     43787         -
# 2  Extended offline    Aborted by host               10%     19390         -
# 3  Extended offline    Aborted by host               10%     19376         -
# 4  Extended offline    Completed without error       00%     19329         -
# 5  Extended offline    Completed without error       00%     19286         -
# 6  Extended offline    Completed without error       00%     19237         -
# 7  Extended offline    Completed without error       00%     19190         -
# 8  Extended offline    Completed without error       00%     19141         -
# 9  Extended offline    Completed without error       00%     19090         -
#10  Extended offline    Completed without error       00%     19045         -
#11  Extended offline    Completed without error       00%     18999         -
#12  Extended offline    Completed without error       00%     18948         -
#13  Extended offline    Completed without error       00%     18920         -
#14  Extended offline    Completed without error       00%     18893         -
#15  Extended offline    Completed without error       00%     18632         -
#16  Extended offline    Completed without error       00%     18588         -
#17  Extended offline    Completed without error       00%     18539         -
#18  Extended offline    Completed without error       00%     18505         -
#19  Extended offline    Completed without error       00%     18442         -
#20  Extended offline    Completed without error       00%     18398         -
#21  Extended offline    Completed without error       00%     18353         -

SMART Selective self-test log data structure revision number 1
SPAN  MIN_LBA  MAX_LBA  CURRENT_TEST_STATUS
    1        0        0  Not_testing
    2        0        0  Not_testing
    3        0        0  Not_testing
    4        0        0  Not_testing
    5        0        0  Not_testing
Selective self-test flags (0x0):
  After scanning selected spans, do NOT read-scan remainder of disk.
If Selective self-test is pending on power-up, resume after 0 minute delay.


hdparm -I /dev/sdr:
Code:
/dev/sdr:

ATA device, with non-removable media
        Model Number:       HGST HUH721010ALN600                   
        Serial Number:      7PH2RTBC           
        Firmware Revision:  LHGNT21D
        Transport:          Serial, ATA8-AST, SATA 1.0a, SATA II Extensions, SATA Rev 2.5, SATA Rev 2.6, SATA Rev 3.0; Revision: ATA8-AST T13 Project D1697 Revision 0b
Standards:
        Used: unknown (minor revision code 0x0029)
        Supported: 9 8 7 6 5
        Likely used: 9
Configuration:
        Logical         max     current
        cylinders       16383   16383
        heads           16      16
        sectors/track   63      63
        --
        CHS current addressable sectors:    16514064
        LBA    user addressable sectors:   268435455
        LBA48  user addressable sectors:  2441609216
        Logical  Sector size:                  4096 bytes
        Physical Sector size:                  4096 bytes
        device size with M = 1024*1024:     9537536 MBytes
        device size with M = 1000*1000:    10000831 MBytes (10000 GB)
        cache/buffer size  = unknown
        Form Factor: 3.5 inch
        Nominal Media Rotation Rate: 7200
Capabilities:
        LBA, IORDY(can be disabled)
        Queue depth: 32
        Standby timer values: spec'd by Standard, no device specific minimum
        R/W multiple sector transfer: Max = 2   Current = 0
        Advanced power management level: disabled
        DMA: mdma0 mdma1 mdma2 udma0 udma1 udma2 udma3 udma4 udma5 *udma6
             Cycle time: min=120ns recommended=120ns
        PIO: pio0 pio1 pio2 pio3 pio4
             Cycle time: no flow control=120ns  IORDY flow control=120ns
Commands/features:
        Enabled Supported:
           *    SMART feature set
                Security Mode feature set
           *    Power Management feature set
           *    Write cache
           *    Look-ahead
           *    Host Protected Area feature set
           *    WRITE_BUFFER command
           *    READ_BUFFER command
           *    NOP cmd
           *    DOWNLOAD_MICROCODE
                Advanced Power Management feature set
                Power-Up In Standby feature set
           *    SET_FEATURES required to spinup after power up
                SET_MAX security extension
           *    48-bit Address feature set
           *    Device Configuration Overlay feature set
           *    Mandatory FLUSH_CACHE
           *    FLUSH_CACHE_EXT
           *    SMART error logging
           *    SMART self-test
           *    Media Card Pass-Through
           *    General Purpose Logging feature set
           *    WRITE_{DMA|MULTIPLE}_FUA_EXT
           *    64-bit World wide name
           *    URG for READ_STREAM[_DMA]_EXT
           *    URG for WRITE_STREAM[_DMA]_EXT
           *    WRITE_UNCORRECTABLE_EXT command
           *    {READ,WRITE}_DMA_EXT_GPL commands
           *    Segmented DOWNLOAD_MICROCODE
                unknown 119[6]
                unknown 119[7]
           *    Gen1 signaling speed (1.5Gb/s)
           *    Gen2 signaling speed (3.0Gb/s)
           *    Gen3 signaling speed (6.0Gb/s)
           *    Native Command Queueing (NCQ)
           *    Host-initiated interface power management
           *    Phy event counters
           *    NCQ priority information
           *    READ_LOG_DMA_EXT equivalent to READ_LOG_EXT
                Non-Zero buffer offsets in DMA Setup FIS
           *    DMA Setup Auto-Activate optimization
                Device-initiated interface power management
                In-order data delivery
           *    Software settings preservation
                unknown 78[7]
                unknown 78[10]
                unknown 78[11]
           *    SMART Command Transport (SCT) feature set
           *    SCT Write Same (AC2)
           *    SCT Error Recovery Control (AC3)
           *    SCT Features Control (AC4)
           *    SCT Data Tables (AC5)
           *    SANITIZE feature set
           *    CRYPTO_SCRAMBLE_EXT command
           *    OVERWRITE_EXT command
           *    Extended number of user addressable sectors
           *    Device encrypts all user data
           *    WRITE BUFFER DMA command
           *    READ BUFFER DMA command
Security:
        Master password revision code = 65534
                supported
        not     enabled
        not     locked
        not     frozen
        not     expired: security count
        not     supported: enhanced erase
        968min for SECURITY ERASE UNIT.
Logical Unit WWN Device Identifier: 5000cca251cf55c8
        NAA             : 5
        IEEE OUI        : 000cca
        Unique ID       : 251cf55c8
Checksum: correct


hdparm --set-sector-size 512 --please-destroy-my-drive /dev/sdr:
Code:
/dev/sdr:
READ_LOG_EXT(SECTOR_CONFIGURATION) failed: No such file or directory


sg_readcap -l /dev/sdr:
Code:
Read Capacity results:
   Protection: prot_en=0, p_type=0, p_i_exponent=0
   Logical block provisioning: lbpme=0, lbprz=0
   Last LBA=2441609215 (0x9187ffff), Number of logical blocks=2441609216
   Logical block length=4096 bytes
   Logical blocks per physical block exponent=0
   Lowest aligned LBA=0
Hence:
   Device size: 10000831348736 bytes, 9537536.0 MiB, 10000.83 GB, 10.00 TB


sg_format --format --size=512 /dev/sdr:
Code:
    ATA       HGST HUH721010AL  T21D   peripheral_type: disk [0x0]
      Unit serial number: 7PH2RTBC           
      LU name: 5000cca251cf55c8
Mode Sense (block descriptor) data, prior to changes:
  Number of blocks=0 [0x0]
  Block size=4096 [0x1000]
Try MODE SELECT again with SP=0 this time

A FORMAT UNIT will commence in 15 seconds
    ALL data on /dev/sdr will be DESTROYED
        Press control-C to abort

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

A FORMAT UNIT will commence in 5 seconds
    ALL data on /dev/sdr will be DESTROYED
        Press control-C to abort
Format unit command: Illegal request
FORMAT UNIT failed
    try '-v' for more information
sg_format failed: Illegal request


HUGO on Windows:
Code:
C:\Program Files\WDC\HUGO\bin>[B]hugo s[/B]

     Manuf.       Model               Serial                Interface       Capacity  Type  Firmware
----------------------------------------------------------------------------------------------------
  1) HGST         HUH721010ALN600     7PH2GANC              SATA            10000 GB  HDD   LHGNT38L


C:\Program Files\WDC\HUGO\bin>[B]hugo s --device[/B]

     Manuf.       Model               Serial                Interface       Capacity  Type  Firmware
----------------------------------------------------------------------------------------------------
  1) HGST         HUH721010ALN600     7PH2GANC              SATA            10000 GB  HDD   LHGNT38L
        Device handles: \\.\PhysicalDrive1

C:\Program Files\WDC\HUGO\bin>[B]hugo format -g \\.\PhysicalDrive1 -b 512 --fastformat[/B]

        ******************************** WARNING **********************************

           The Format command will result in loss of data on the specified device.

           This device might be your boot device and it won't be protected.

        ******************************** WARNING **********************************

                Are you sure you want to Format this device? (Y/N) y

Format device on 1 Device(s)...
Failed: Format command Failed on device 7PH2GANC.
        Device will not be formatted.
 
  • Like
Reactions: itronin and Samir

eptesicus

Active Member
Jun 25, 2017
151
37
28
35
One thing that may kinda work is putting one of the drives in the easystore enclosure and using the wd utility to format for 'xp compatibility' and then back. This supposedly activates/deactivates the 4k/512k of the drive installed, but I'm not sure if it will behave this way outside of the enclosure, also it may not even work with the drive as an HGST didn't work, whereas a WD black did (only used in the enclosure though).
I connected the disk to the board in the Easystore enclosure, but the system wouldn't see the drives for me.
 

itronin

Well-Known Member
Nov 24, 2018
1,233
793
113
Denver, Colorado
@eptesicus

Any wisdom or guidance on formatting a 4kn SATA drive to 512?
edit Sorry posted before I was ready.


I had to read up as my memory has been failing of late and I wanted to get a source link for your drive part #

Its 4kn without 512e support. part # 0f27607 (source)

4k n as in native. that can't be changed. 512e e as in emulation. fakes out the host os to think the drive has 512 byte blocks.

you can't low level format it down to physical 512 byte blocks.

Even if it supported 512e you still would not be able to force a low level format to 512 and I don't think the firmware would fake those commands back to the OS.
 
  • Like
Reactions: eptesicus

eptesicus

Active Member
Jun 25, 2017
151
37
28
35
@eptesicus



edit Sorry posted before I was ready.


I had to read up as my memory has been failing of late and I wanted to get a source link for your drive part #

Its 4kn without 512e support. part # 0f27607 (source)

4k n as in native. that can't be changed. 512e e as in emulation. fakes out the host os to think the drive has 512 byte blocks.

you can't low level format it down to physical 512 byte blocks.

Even if it supported 512e you still would not be able to force a low level format to 512 and I don't think the firmware would fake those commands back to the OS.
Thanks for the findings and information. That's certainly disheartening. The price and warranty for these refurbished was hard to pass up, but I can understand now why they're priced how they are. I'll have to figure something else out.
 

itronin

Well-Known Member
Nov 24, 2018
1,233
793
113
Denver, Colorado
Thanks for the findings and information. That's certainly disheartening. The price and warranty for these refurbished was hard to pass up, but I can understand now why they're priced how they are. I'll have to figure something else out.
FWIW have you looked at the use case of your data and whether using 4k blocks would be that bad? (nb: I'm biased as I use 4k blocks on all my big disks). Are you in a position to reblock your 512 byte sector disks (and do they support it)?

I'm no expert here on the finer mechanics of tuning up the filesystem however the truenas forums have some guidance:

 
  • Like
Reactions: eptesicus

bandit8623

Member
May 25, 2021
63
19
8
smartctl -a /dev/sdr:
Code:
smartctl 7.2 2020-12-30 r5155 [x86_64-linux-5.10.131+truenas] (local build)
Copyright (C) 2002-20, Bruce Allen, Christian Franke, www.smartmontools.org

=== START OF INFORMATION SECTION ===
Model Family:     HGST Ultrastar He10
Device Model:     HGST HUH721010ALN600
Serial Number:    7PH2RTBC
LU WWN Device Id: 5 000cca 251cf55c8
Firmware Version: LHGNT21D
User Capacity:    10,000,831,348,736 bytes [10.0 TB]
Sector Size:      4096 bytes logical/physical
Rotation Rate:    7200 rpm
Form Factor:      3.5 inches
Device is:        In smartctl database [for details use: -P show]
ATA Version is:   ACS-2, ATA8-ACS T13/1699-D revision 4
SATA Version is:  SATA 3.2, 6.0 Gb/s (current: 6.0 Gb/s)
Local Time is:    Mon Sep 12 10:15:01 2022 CDT
SMART support is: Available - device has SMART capability.
SMART support is: Enabled

=== START OF READ SMART DATA SECTION ===
SMART overall-health self-assessment test result: PASSED

General SMART Values:
Offline data collection status:  (0x80) Offline data collection activity
                                        was never started.
                                        Auto Offline Data Collection: Enabled.
Self-test execution status:      (   0) The previous self-test routine completed
                                        without error or no self-test has ever
                                        been run.
Total time to complete Offline
data collection:                (   93) seconds.
Offline data collection
capabilities:                    (0x5b) SMART execute Offline immediate.
                                        Auto Offline data collection on/off support.
                                        Suspend Offline collection upon new
                                        command.
                                        Offline surface scan supported.
                                        Self-test supported.
                                        No Conveyance Self-test supported.
                                        Selective Self-test supported.
SMART capabilities:            (0x0003) Saves SMART data before entering
                                        power-saving mode.
                                        Supports SMART auto save timer.
Error logging capability:        (0x01) Error logging supported.
                                        General Purpose Logging supported.
Short self-test routine
recommended polling time:        (   2) minutes.
Extended self-test routine
recommended polling time:        (1115) minutes.
SCT capabilities:              (0x003d) SCT Status supported.
                                        SCT Error Recovery Control supported.
                                        SCT Feature Control supported.
                                        SCT Data Table supported.

SMART Attributes Data Structure revision number: 16
Vendor Specific SMART Attributes with Thresholds:
ID# ATTRIBUTE_NAME          FLAG     VALUE WORST THRESH TYPE      UPDATED  WHEN_FAILED RAW_VALUE
  1 Raw_Read_Error_Rate     0x000b   100   100   016    Pre-fail  Always       -       0
  2 Throughput_Performance  0x0005   134   134   054    Pre-fail  Offline      -       96
  3 Spin_Up_Time            0x0007   154   154   024    Pre-fail  Always       -       440 (Average 416)
  4 Start_Stop_Count        0x0012   100   100   000    Old_age   Always       -       10
  5 Reallocated_Sector_Ct   0x0033   100   100   005    Pre-fail  Always       -       0
  7 Seek_Error_Rate         0x000b   100   100   067    Pre-fail  Always       -       0
  8 Seek_Time_Performance   0x0005   128   128   020    Pre-fail  Offline      -       18
  9 Power_On_Hours          0x0012   094   094   000    Old_age   Always       -       43801
10 Spin_Retry_Count        0x0013   100   100   060    Pre-fail  Always       -       0
12 Power_Cycle_Count       0x0032   100   100   000    Old_age   Always       -       10
22 Helium_Level            0x0023   100   100   025    Pre-fail  Always       -       100
192 Power-Off_Retract_Count 0x0032   099   099   000    Old_age   Always       -       1783
193 Load_Cycle_Count        0x0012   099   099   000    Old_age   Always       -       1783
194 Temperature_Celsius     0x0002   176   176   000    Old_age   Always       -       34 (Min/Max 19/40)
196 Reallocated_Event_Count 0x0032   100   100   000    Old_age   Always       -       0
197 Current_Pending_Sector  0x0022   100   100   000    Old_age   Always       -       0
198 Offline_Uncorrectable   0x0008   100   100   000    Old_age   Offline      -       0
199 UDMA_CRC_Error_Count    0x000a   200   200   000    Old_age   Always       -       0

SMART Error Log Version: 1
No Errors Logged

SMART Self-test log structure revision number 1
Num  Test_Description    Status                  Remaining  LifeTime(hours)  LBA_of_first_error
# 1  Short offline       Completed without error       00%     43787         -
# 2  Extended offline    Aborted by host               10%     19390         -
# 3  Extended offline    Aborted by host               10%     19376         -
# 4  Extended offline    Completed without error       00%     19329         -
# 5  Extended offline    Completed without error       00%     19286         -
# 6  Extended offline    Completed without error       00%     19237         -
# 7  Extended offline    Completed without error       00%     19190         -
# 8  Extended offline    Completed without error       00%     19141         -
# 9  Extended offline    Completed without error       00%     19090         -
#10  Extended offline    Completed without error       00%     19045         -
#11  Extended offline    Completed without error       00%     18999         -
#12  Extended offline    Completed without error       00%     18948         -
#13  Extended offline    Completed without error       00%     18920         -
#14  Extended offline    Completed without error       00%     18893         -
#15  Extended offline    Completed without error       00%     18632         -
#16  Extended offline    Completed without error       00%     18588         -
#17  Extended offline    Completed without error       00%     18539         -
#18  Extended offline    Completed without error       00%     18505         -
#19  Extended offline    Completed without error       00%     18442         -
#20  Extended offline    Completed without error       00%     18398         -
#21  Extended offline    Completed without error       00%     18353         -

SMART Selective self-test log data structure revision number 1
SPAN  MIN_LBA  MAX_LBA  CURRENT_TEST_STATUS
    1        0        0  Not_testing
    2        0        0  Not_testing
    3        0        0  Not_testing
    4        0        0  Not_testing
    5        0        0  Not_testing
Selective self-test flags (0x0):
  After scanning selected spans, do NOT read-scan remainder of disk.
If Selective self-test is pending on power-up, resume after 0 minute delay.


hdparm -I /dev/sdr:
Code:
/dev/sdr:

ATA device, with non-removable media
        Model Number:       HGST HUH721010ALN600                  
        Serial Number:      7PH2RTBC          
        Firmware Revision:  LHGNT21D
        Transport:          Serial, ATA8-AST, SATA 1.0a, SATA II Extensions, SATA Rev 2.5, SATA Rev 2.6, SATA Rev 3.0; Revision: ATA8-AST T13 Project D1697 Revision 0b
Standards:
        Used: unknown (minor revision code 0x0029)
        Supported: 9 8 7 6 5
        Likely used: 9
Configuration:
        Logical         max     current
        cylinders       16383   16383
        heads           16      16
        sectors/track   63      63
        --
        CHS current addressable sectors:    16514064
        LBA    user addressable sectors:   268435455
        LBA48  user addressable sectors:  2441609216
        Logical  Sector size:                  4096 bytes
        Physical Sector size:                  4096 bytes
        device size with M = 1024*1024:     9537536 MBytes
        device size with M = 1000*1000:    10000831 MBytes (10000 GB)
        cache/buffer size  = unknown
        Form Factor: 3.5 inch
        Nominal Media Rotation Rate: 7200
Capabilities:
        LBA, IORDY(can be disabled)
        Queue depth: 32
        Standby timer values: spec'd by Standard, no device specific minimum
        R/W multiple sector transfer: Max = 2   Current = 0
        Advanced power management level: disabled
        DMA: mdma0 mdma1 mdma2 udma0 udma1 udma2 udma3 udma4 udma5 *udma6
             Cycle time: min=120ns recommended=120ns
        PIO: pio0 pio1 pio2 pio3 pio4
             Cycle time: no flow control=120ns  IORDY flow control=120ns
Commands/features:
        Enabled Supported:
           *    SMART feature set
                Security Mode feature set
           *    Power Management feature set
           *    Write cache
           *    Look-ahead
           *    Host Protected Area feature set
           *    WRITE_BUFFER command
           *    READ_BUFFER command
           *    NOP cmd
           *    DOWNLOAD_MICROCODE
                Advanced Power Management feature set
                Power-Up In Standby feature set
           *    SET_FEATURES required to spinup after power up
                SET_MAX security extension
           *    48-bit Address feature set
           *    Device Configuration Overlay feature set
           *    Mandatory FLUSH_CACHE
           *    FLUSH_CACHE_EXT
           *    SMART error logging
           *    SMART self-test
           *    Media Card Pass-Through
           *    General Purpose Logging feature set
           *    WRITE_{DMA|MULTIPLE}_FUA_EXT
           *    64-bit World wide name
           *    URG for READ_STREAM[_DMA]_EXT
           *    URG for WRITE_STREAM[_DMA]_EXT
           *    WRITE_UNCORRECTABLE_EXT command
           *    {READ,WRITE}_DMA_EXT_GPL commands
           *    Segmented DOWNLOAD_MICROCODE
                unknown 119[6]
                unknown 119[7]
           *    Gen1 signaling speed (1.5Gb/s)
           *    Gen2 signaling speed (3.0Gb/s)
           *    Gen3 signaling speed (6.0Gb/s)
           *    Native Command Queueing (NCQ)
           *    Host-initiated interface power management
           *    Phy event counters
           *    NCQ priority information
           *    READ_LOG_DMA_EXT equivalent to READ_LOG_EXT
                Non-Zero buffer offsets in DMA Setup FIS
           *    DMA Setup Auto-Activate optimization
                Device-initiated interface power management
                In-order data delivery
           *    Software settings preservation
                unknown 78[7]
                unknown 78[10]
                unknown 78[11]
           *    SMART Command Transport (SCT) feature set
           *    SCT Write Same (AC2)
           *    SCT Error Recovery Control (AC3)
           *    SCT Features Control (AC4)
           *    SCT Data Tables (AC5)
           *    SANITIZE feature set
           *    CRYPTO_SCRAMBLE_EXT command
           *    OVERWRITE_EXT command
           *    Extended number of user addressable sectors
           *    Device encrypts all user data
           *    WRITE BUFFER DMA command
           *    READ BUFFER DMA command
Security:
        Master password revision code = 65534
                supported
        not     enabled
        not     locked
        not     frozen
        not     expired: security count
        not     supported: enhanced erase
        968min for SECURITY ERASE UNIT.
Logical Unit WWN Device Identifier: 5000cca251cf55c8
        NAA             : 5
        IEEE OUI        : 000cca
        Unique ID       : 251cf55c8
Checksum: correct


hdparm --set-sector-size 512 --please-destroy-my-drive /dev/sdr:
Code:
/dev/sdr:
READ_LOG_EXT(SECTOR_CONFIGURATION) failed: No such file or directory


sg_readcap -l /dev/sdr:
Code:
Read Capacity results:
   Protection: prot_en=0, p_type=0, p_i_exponent=0
   Logical block provisioning: lbpme=0, lbprz=0
   Last LBA=2441609215 (0x9187ffff), Number of logical blocks=2441609216
   Logical block length=4096 bytes
   Logical blocks per physical block exponent=0
   Lowest aligned LBA=0
Hence:
   Device size: 10000831348736 bytes, 9537536.0 MiB, 10000.83 GB, 10.00 TB


sg_format --format --size=512 /dev/sdr:
Code:
    ATA       HGST HUH721010AL  T21D   peripheral_type: disk [0x0]
      Unit serial number: 7PH2RTBC          
      LU name: 5000cca251cf55c8
Mode Sense (block descriptor) data, prior to changes:
  Number of blocks=0 [0x0]
  Block size=4096 [0x1000]
Try MODE SELECT again with SP=0 this time

A FORMAT UNIT will commence in 15 seconds
    ALL data on /dev/sdr will be DESTROYED
        Press control-C to abort

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

A FORMAT UNIT will commence in 5 seconds
    ALL data on /dev/sdr will be DESTROYED
        Press control-C to abort
Format unit command: Illegal request
FORMAT UNIT failed
    try '-v' for more information
sg_format failed: Illegal request


HUGO on Windows:
Code:
C:\Program Files\WDC\HUGO\bin>[B]hugo s[/B]

     Manuf.       Model               Serial                Interface       Capacity  Type  Firmware
----------------------------------------------------------------------------------------------------
  1) HGST         HUH721010ALN600     7PH2GANC              SATA            10000 GB  HDD   LHGNT38L


C:\Program Files\WDC\HUGO\bin>[B]hugo s --device[/B]

     Manuf.       Model               Serial                Interface       Capacity  Type  Firmware
----------------------------------------------------------------------------------------------------
  1) HGST         HUH721010ALN600     7PH2GANC              SATA            10000 GB  HDD   LHGNT38L
        Device handles: \\.\PhysicalDrive1

C:\Program Files\WDC\HUGO\bin>[B]hugo format -g \\.\PhysicalDrive1 -b 512 --fastformat[/B]

        ******************************** WARNING **********************************

           The Format command will result in loss of data on the specified device.

           This device might be your boot device and it won't be protected.

        ******************************** WARNING **********************************

                Are you sure you want to Format this device? (Y/N) y

Format device on 1 Device(s)...
Failed: Format command Failed on device 7PH2GANC.
        Device will not be formatted.
parted magic and use the security removal? using the qr code with a scanner or type it out
 

UhClem

just another Bozo on the bus
Jun 26, 2012
435
249
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:
  • Like
Reactions: Samir

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
1,233
793
113
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