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.

DoDo

New Member
Jan 7, 2025
8
0
1
I would be happy to try sedutil-cli, but I cannot find the PSIDs on my drive labels :(

Drive.png
 

DoDo

New Member
Jan 7, 2025
8
0
1
Some interesting info from this drive product manual:
Per TCG SSC specification, the PIN (PSID) is set to the MSID at manufacturing time.
WDC has specified the MSID to be the serial number of the drive concatenated 4x.
So now I have the PSID, but sedutil-cli complains: Invalid or unsupported disk
 

chinesestunna

Active Member
Jan 23, 2015
657
222
43
57
Some interesting info from this drive product manual:
Per TCG SSC specification, the PIN (PSID) is set to the MSID at manufacturing time.
WDC has specified the MSID to be the serial number of the drive concatenated 4x.
So now I have the PSID, but sedutil-cli complains: Invalid or unsupported disk
Did you try sed-util with the MSID (as you pointed out in the manual) or PSID?
 

DoDo

New Member
Jan 7, 2025
8
0
1
chinesestunna: Thank you - I thought that the PSID ranges from 32 to 64 characters in length.
This one in the right corner is only 20 characters long, so I assumed it is something else.
But still no joy - the sedutil-cli complains that my drive is unsupported.
Which is strange, baceause it is officially said that HC530 drives conform to the TCG-OPAL 2.0 specification.
 

DoDo

New Member
Jan 7, 2025
8
0
1
smartctl 7.4 2023-08-01 r5530 [x86_64-w64-mingw32-w11-b26100] (sf-7.4-1)
=== START OF INFORMATION SECTION ===
Vendor: WDC
Product: WUH721414AL5204
Revision: C240
Compliance: SPC-4
LU is fully provisioned
Rotation Rate: 7200 rpm
Form Factor: 3.5 inches
Logical Unit id: 0x5000cca2a3879324
Serial number: QBJDKDGT
Device type: disk
Transport protocol:SAS (SPL-4)
Local Time is: Sat Jan 11 05:21:58 2025
device is NOT READY (e.g. spun down, busy)
A mandatory SMART command failed: exiting. To continue, add one or more '-T permissive' options.
 

bandit8623

Member
May 25, 2021
72
20
8
device is NOT READY (e.g. spun down, busy)
A mandatory SMART command failed: exiting. To continue, add one or more '-T permissive' options.
how are these connected to your system? expansion enclosure or those adapter cables?
 

DoDo

New Member
Jan 7, 2025
8
0
1
how are these connected to your system? expansion enclosure or those adapter cables?
The drives seem to be spinning - at least for some time after power-on and then when I try to communicate with them.
There is no clicking nor any other strange sounds.
I tried the drives in ProLiant DL380G9, Dell T330 and also in a normal desktop using fan-out cable with Molex power.
All of them were using LSI HBA controllers.
I also tried to cover the 3rd pin - no effect.
When my Dell T330 starts, the drive power-on led goes green and the other one (connected status) blinks for a minute or so and then goes off.
If I then try to communicate with a drive - it will start to blink again for some time.
No-problem drives would light the "Connection LED" up and it would stay lit.
 
Last edited:

gardar

Member
Nov 15, 2012
48
31
18
Has anyone here tried to make use of the 520/528b sectors rather than reformatting to 512b?

There are are Linux kernel config flags CONFIG_BLK_DEV_INTEGRITY and CONFIG_BLK_DEV_INTEGRITY_T10 which are supposed to make it possible if I understand it correctly, I just don't have 520/528b drives myself to test it with.
 

bandit8623

Member
May 25, 2021
72
20
8
Has anyone here tried to make use of the 520/528b sectors rather than reformatting to 512b?

There are are Linux kernel config flags CONFIG_BLK_DEV_INTEGRITY and CONFIG_BLK_DEV_INTEGRITY_T10 which are supposed to make it possible if I understand it correctly, I just don't have 520/528b drives myself to test it with.
you dont actualy format to 520 in this case its a flag that turns on type 2 protection. i use this for my sas hgst drives. my 3108 raid card supports.
format still shows 4kn or 512 but will have the added protection. truenas scale only just started supporting these drives in hbas recently. not sure core supports yet.
 

CyklonDX

Well-Known Member
Nov 8, 2022
1,543
516
113
you dont actualy format to 520 in this case its a flag that turns on type 2 protection. i use this for my sas hgst drives. my 3108 raid card supports.
format still shows 4kn or 512 but will have the added protection. truenas scale only just started supporting these drives in hbas recently. not sure core supports yet.
T10 actually does require 520b or 4104b
1739292274130.png
 

bandit8623

Member
May 25, 2021
72
20
8

gardar

Member
Nov 15, 2012
48
31
18
when you run the sg format though it still set to either 512 or 4096. you are not selecting 520 or 4104. yes it does take up that space though

example

sg_format -v --size=512 --long --format --fmtpinfo=2 --pfu=1 pd1


View attachment 41826
You can see below the line you just highlighted that there is 8 bytes of protection, which matches with the 520b sector size 512+8=520

If I understand it correctly then without enabling CONFIG_BLK_DEV_INTEGRITY the OS sees the disk sectors as 520 bytes but does not know that 8 of them are supposed to be used for the checksumming, but after enabling that option the OS knows about the 8 bytes used for checksumming and hides those bytes which makes the disk appear as 512 instead.
Presumably it's the same thing that happens when using a compatible HBA card, it takes care of the checksumming between the disk and the HBA and thus hides those 8 bytes from the OS.
 

bandit8623

Member
May 25, 2021
72
20
8
1739469242150.png
yes but its not actually the same. and yes the os needs to know what to do with this information. or the raid card needs to know what to do with this information. if it was the same you could just plug in a 520 formatted drive and it would work.. it wouldnt and it would show 520 under logical block size.

End of day of your os or raid cards supports it and your drives support it. I would use it.
 
Last edited:

Daylight2751

New Member
Nov 17, 2022
5
6
3
Some interesting info from this drive product manual:
Per TCG SSC specification, the PIN (PSID) is set to the MSID at manufacturing time.
WDC has specified the MSID to be the serial number of the drive concatenated 4x.
So now I have the PSID, but sedutil-cli complains: Invalid or unsupported disk
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.
 
  • Like
Reactions: bandit8623

bandit8623

Member
May 25, 2021
72
20
8
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.
psid [--skip-status] -s <serial number> -p <> [-h]

any luck with hugo?