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.

Daylight2751

New Member
Nov 17, 2022
5
6
3
psid [--skip-status] -s <serial number> -p <> [-h]

any luck with hugo?
result:
The current state of the target doesn't require this operation to be performed.

and with the --skip-status flag:
Error: The input string was sent but drive status did not change as expected.
 

Tuxprogrammer

New Member
Nov 2, 2021
2
5
3
Looks like we're in the same boat. in my case the drives are HGST ultrastar dc hc510 huh721010al5205, but declare themselves as netapp X322_HLBRE10TA07 with NA02 firmware. sg_format/wdckit/hugo fail to format or sanitize, sedutil-cli says the disks are unsupported. The only thing of note would be that running wdckit security --serial JEH6EBTN -p <PSID_HERE> returned "PSID is not activated, PSID revert is not required. Use --skip-status to revert TCG ownership." Running that command again with the given flag returned "Security PSID Revert successfully completed for disk3 User data has not been erased because the drive was not activated", however nothing has changed and i still cant reformat the drives.
I'm having the same issues, I just got in a bunch of Netapp X378 drives (exact same drive, WUS721010AL5205 SED-FIPS except firmware is NA01). I thought I had scored a great deal since they're still in warranty and very low usage. Then trying to use them, I started encountering the dreaded 520 sectors. For me, wdckit fails to format but reports back success. Resetting security with PSID works just fine on my drives. sg_format doesn't work with any combination of flags to disable protect. The only flag that works is setting count=-1 but that doesn't do anything. Drive is connected to a SAS3008 HBA in IT mode and I'm making no progress with sg_format, wdckit, hugo, setblocksize tools. Anyone with advice on disabling NETAPP read/write protect would be welcome.

At this point I might have to return these drives back to the seller because they're write-locked and nothing I do is unlocking them, even resetting the TCG with PSID.

Code:
root@node14:~/setblocksize# sg_format -v --format --size=4096 /dev/sdd --quick
    NETAPP    X378_WVAXE10TA07  NA01   peripheral_type: disk [0x0]
      PROTECT=1
      << supports protection information>>
      Unit serial number: VHGMTR3M     
      LU name: 5000cca0c823ff48
    mode sense(10) cdb: [5a 00 01 00 00 00 00 00 fc 00]
Mode Sense (block descriptor) data, prior to changes:
block count maxed out, set <<longlba>>
    mode sense(10) cdb: [5a 10 01 00 00 00 00 00 fc 00]
  <<< longlba flag set (64 bit lba) >>>
  Number of blocks=19532873728 [0x48c400000]
  Block size=512 [0x200]
    mode select(10) cdb: [55 11 00 00 00 00 00 00 24 00]
    Format unit cdb: [04 18 00 00 00 00]
Format unit:
Descriptor format, current; Sense key: Data Protect
Additional sense: Access denied - no access rights
  Descriptor type: Field replaceable unit code: 0x27
  Descriptor type: Vendor specific [0x80]
    f8 27
Format unit command: Data protect, type: sense key; write protected media?
FORMAT UNIT failed
Code:
root@node14:~# smartctl -a /dev/sdd
smartctl 7.3 2022-02-28 r5338 [x86_64-linux-6.8.12-8-pve] (local build)
Copyright (C) 2002-22, Bruce Allen, Christian Franke, www.smartmontools.org

=== START OF INFORMATION SECTION ===
Vendor:               NETAPP
Product:              X378_WVAXE10TA07
Revision:             NA01
Compliance:           SPC-4
User Capacity:        9,949,895,720,960 bytes [9.94 TB]
Logical block size:   520 bytes
Physical block size:  4160 bytes
LU is fully provisioned
Rotation Rate:        7200 rpm
Form Factor:          3.5 inches
Logical Unit id:      0x5000cca0c823ff48
Serial number:        VHGMTR3M
Device type:          disk
Transport protocol:   SAS (SPL-4)
Local Time is:        Thu Mar 20 19:16:41 2025 CDT
SMART support is:     Available - device has SMART capability.
SMART support is:     Enabled
Temperature Warning:  Enabled

=== START OF READ SMART DATA SECTION ===
SMART Health Status: OK

Grown defects during certification <not available>
Total blocks reassigned during format <not available>
Total new blocks reassigned <not available>
Power on minutes since format <not available>
Current Drive Temperature:     32 C
Drive Trip Temperature:        65 C

Accumulated power on time, hours:minutes 49:54
Manufactured in week 47 of year 2022
Specified cycle count over device lifetime:  50000
Accumulated start-stop cycles:  37
Specified load-unload count over device lifetime:  600000
Accumulated load-unload cycles:  39
Elements in grown defect list: 0

Error counter log:
           Errors Corrected by           Total   Correction     Gigabytes    Total
               ECC          rereads/    errors   algorithm      processed    uncorrected
           fast | delayed   rewrites  corrected  invocations   [10^9 bytes]  errors
read:          0        0        25         0        612         15.748           0
write:         0        0         0         0        725      19901.898           0
verify:        0        0         0         0        250          3.704           0

Non-medium error count:      329

No Self-tests have been logged
Code:
Avago Technologies SAS3 Flash Utility
Version 15.00.00.00 (2016.11.17)
Copyright 2008-2016 Avago Technologies. All rights reserved.

        Adapter Selected is a Avago SAS: SAS3008(C0)

        Controller Number              : 0
        Controller                     : SAS3008(C0)
        PCI Address                    : 00:01:00:00
        SAS Address                    : ...
        NVDATA Version (Default)       : 0a.00.30.26
        NVDATA Version (Persistent)    : 0a.00.30.26
        Firmware Product ID            : 0x2221 (IT)
        Firmware Version               : 10.00.03.00
        NVDATA Vendor                  : LSI
        NVDATA Product ID              : LSI3008-IT
        BIOS Version                   : 08.25.00.00
        UEFI BSD Version               : 12.00.00.00
        FCODE Version                  : N/A
        Board Name                     : LSI3008-IT
        Board Assembly                 : N/A
        Board Tracer Number            : N/A

        Finished Processing Commands Successfully.
        Exiting SAS3Flash.
Code:
root@node14:~/sedutil-1.49.8# ./sedutil-cli --query /dev/sdd
/dev/sdd OTHER   X378_WVAXE10TA07  NA01   NETAPP 
TPer function (0x0001)
    ACKNAK = N, ASYNC = N. BufferManagement = N, comIDManagement  = N, Streaming = Y, SYNC = Y
Locking function (0x0002)
    Locked = N, LockingEnabled = Y, MBR shadowing Not Supported = N, MBRDone = N, MBREnabled = N, MediaEncrypt = Y
Geometry function (0x0003)
    Align = Y, Alignment Granularity = 8 (4160), Logical Block size = 520, Lowest Aligned LBA = 0
Enterprise function (0x0100)
    Range crossing = N, Base comID = 0x07fe, comIDs = 2
BlockSID function (0x0402)
    BlockSIDState = N, SIDvalueState = 1, HardReset  = 0
 
Last edited:
  • Like
Reactions: Daylight2751

Tuxprogrammer

New Member
Nov 2, 2021
2
5
3
result:
The current state of the target doesn't require this operation to be performed.

and with the --skip-status flag:
Error: The input string was sent but drive status did not change as expected.
I found a solution!!!!

use this fork: GitHub - Mattiwatti/sedutil: DTA sedutil Self encrypting drive software of sedutil-cli
I built from source on a debian proxmox 8.3.5 host.
perform a psid reset like:
./sedutil-cli --yesIreallywanttoERASEALLmydatausingthePSID my20characterPSIDfromWDLabelortheQRcodeHERE /dev/sdd

then you can perform a format like:
sg_format -v --format --size=4096 /dev/sdd --quick

Code:
root@node14:~/sedutil# ./sedutil-cli --yesIreallywanttoERASEALLmydatausingthePSID redacted /dev/sdd
revertTper completed successfully
Code:
root@node14:~/sedutil# sg_format -v --format --size=4096 /dev/sdd --quick
    NETAPP    X378_WVAXE10TA07  NA01   peripheral_type: disk [0x0]
      PROTECT=1
      << supports protection information>>
      Unit serial number: VHGMTR3M       
      LU name: 5000cca0c823ff48
    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=2441609216 [0x91880000]
  Block size=4096 [0x1000]
    Format unit cdb: [04 18 00 00 00 00]
Format unit command launched without error

Format unit has started
Format unit in progress, 0.05% done
Format unit in progress, 0.22% done
Format unit in progress, 0.38% done
Format unit in progress, 0.55% done
 

ojhavary

New Member
Apr 16, 2025
2
0
1
I'm having a difficult time trying to format a 7.8TB Huawei drive to 512 format. This is the drive info:

smartctl 6.6 2016-05-31 r4324 [x86_64-linux-5.4.0-150-generic] (local build)
Copyright (C) 2002-16, Bruce Allen, Christian Franke, www.smartmontools.org

=== START OF INFORMATION SECTION ===
Vendor: HUAWEI
Product: HSSD-D7G23AN7T6N
Revision: 8308
Compliance: SPC-4
User Capacity: 7,801,524,581,760 bytes [7.80 TB]
Logical block size: 520 bytes
Physical block size: 8320 bytes
LU is resource provisioned, LBPRZ=1
Rotation Rate: Solid State Device
Form Factor: 2.5 inches
Logical Unit id: 0x500188200177e4e2
Serial number: 2102314LLJFSQ1004781
Device type: disk
Transport protocol: SAS (SPL-3)
Local Time is: Wed Apr 16 11:27:27 2025 SAST
SMART support is: Available - device has SMART capability.
SMART support is: Enabled
Temperature Warning: Enabled

=== START OF READ SMART DATA SECTION ===
SMART Health Status: OK

Percentage used endurance indicator: 0%
Current Drive Temperature: 35 C
Drive Trip Temperature: 78 C

Manufactured in week 12 of year 2023
Specified cycle count over device lifetime: 0
Accumulated start-stop cycles: 27
Specified load-unload count over device lifetime: 0
Accumulated load-unload cycles: 0
Elements in grown defect list: 0
 

ojhavary

New Member
Apr 16, 2025
2
0
1
This is the result of the sg_format. What am I missing?

sg_format --format --size=512 --six /dev/sg1 -v
HUAWEI HSSD-D7G23AN7T6N 8308 peripheral_type: disk [0x0]
PROTECT=1
<< supports protection information>>
Unit serial number: 2102314LLJFSQ1004781
LU name: 500188200177e4e2
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=15002931888 [0x37e3e92b0]
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: 0x0000000000000000
MODE SELECT command: Illegal request sense key, apart from Invalid opcode