Format SSD to 4Kn with Samsung DC Toolkit 2.1 for Linux?

Notice: Page may contain affiliate links for which we may earn a small commission through services like Amazon Affiliates or Skimlinks.

MuscleLazy

Member
Apr 30, 2022
43
2
8
I have few Samsung PM883 SSDs that I need to format to 4Kn sectors, sg_format and hdparm fail. I was looking online and apparently the only tool I can use is the DC Toolkit 2.1, but Samsung removed the Linux download link. Anyone has a copy that can share?

Edit: I managed to find a hidden file on Samsung servers:
Code:
wget https://www.samsung.com/semiconductor/global.semi.static/Samsung_SSD_DC_Toolkit_for_Linux_V2.1
chmod 0755 Samsung_SSD_DC_Toolkit_for_Linux_V2.1
./Samsung_SSD_DC_Toolkit_for_Linux_V2.1 --help
I'm trying to figure how to format the disk from 512 to 4096 logical sectors, but I cannot find anything relevant into help file. Can someone provide some help? The only reference to logical sectors is:
Code:
-X [--sct]
Used to run SCT Command.

-wb [ --writesame-pattern-background ]
Execute Background write same pattern after receiving logical sector, logical sector number and pattern as an input
-wf [ --writesame-pattern-foreground ]
Execute Foreground write same pattern after receiving logical sector, logical sector number and pattern as an input

./Samsung_SSD_DC_Toolkit_for_Linux_V2.1 --disk 1 --sct --writesame-pattern-background 0x0:0x10:0xFF00FF00
Thank you.
 
Last edited:

olhachycher

New Member
Jan 11, 2023
10
3
3
Hi,
It sounds like the Samsung DC Toolkit 2.1 is the tool you need to use in order to format your Samsung PM883 SSDs to 4Kn sectors. The --sct option appears to be used to run specific commands on the SSD, and the --writesame-pattern-background and --writesame-pattern-foreground options seem to be used to write a specific pattern to a range of logical sectors. I'm not sure if this is the correct command you need to use to format the disk, but it may be worth trying different options with the toolkit to see if you can find a way to format the disk to 4Kn sectors.

It's possible that the command format you are looking for is not available in the help file, it's also possible that the command format is not available on the version of Samsung DC Toolkit 2.1 you have downloaded.

You can also contact Samsung Support for help on how to format your SSD with the Samsung DC Toolkit 2.1. They may be able to assist you in finding the correct command or provide more information on how to use the toolkit.
 

MuscleLazy

Member
Apr 30, 2022
43
2
8
You can also contact Samsung Support for help on how to format your SSD with the Samsung DC Toolkit 2.1. They may be able to assist you in finding the correct command or provide more information on how to use the toolkit.
People would not ask for support here, if Samsung would provide support for their enterprise drives to regular Joe? :)
 

CyklonDX

Well-Known Member
Nov 8, 2022
848
279
63
You don't need to use samsung tool to do it. Other tools even seatools work just fine for other disks.
 

MuscleLazy

Member
Apr 30, 2022
43
2
8
From my experience, if sg_format does not work, SeaChest will not work also. That’s the first thing I tried.
 

CyklonDX

Well-Known Member
Nov 8, 2022
848
279
63
try it; also recommend the disk to be connected directly or over usb // not through sas controller.

i had reformated pretty much every ssd i had my hands on, including pm883's (one difference it was under windows, on usb.)
 

MuscleLazy

Member
Apr 30, 2022
43
2
8
@CyklonDX did you formatted the Pm883 to 4096 logical sectors? I think the firmware does now allows it, that’s why I was researching on it. Yea, I always use a small box running Debian, where I can directly connect the disks.
 

CyklonDX

Well-Known Member
Nov 8, 2022
848
279
63
few mz7lh1t9hmlt (1.92TB); at least a year ago for work.


When disk (ssd/whatever) shows physical sector size as 4096, always meant i could make logical disk sector size 4096.
1674842912942.png

i haven't had a chance to do it on 512e sas ssd's tho i will at some point next month look at hgst ssd800mm.
 

MuscleLazy

Member
Apr 30, 2022
43
2
8
@CyklonDX the problem is my PM883 firmware is either old or custom and it allows only 512e format:
Code:
# hugo show -g /dev/sda

     Manuf.       Model               Serial                Interface       Capacity  Type  Firmware
----------------------------------------------------------------------------------------------------
  1) Samsung      MZ7LH960HAJR-00005  xxxxxxxxxxxxxx        SATA            960   GB  SSD   HXT7304Q


# fdisk -l /dev/sda
Disk /dev/sda: 894.25 GiB, 960197124096 bytes, 1875385008 sectors
Disk model: SAMSUNG MZ7LH960
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes

# openSeaChest_FormatUnit --showSupportedFormats -d /dev/sda
==========================================================================================
openSeaChest_Format - openSeaChest drive utilities - NVMe Enabled
Copyright (c) 2014-2023 Seagate Technology LLC and/or its Affiliates, All Rights Reserved
openSeaChest_Format Version: 2.6.2-4_0_2 X86_64
Build Date: Jan 27 2023
Today: Fri Jan 27 17:21:32 2023    User: root
==========================================================================================

/dev/sg0 - SAMSUNG MZ7LH960HAJR-00005 - HXT7304Q - ATA

WARNING: Customer unique firmware may have specific requirements that
         restrict sector sizes on some products. It may not be possible to format/
         fast format to common sizes like 4K or 512B due to these customer requirements.


Supported Logical Block Sizes and Protection Types:
---------------------------------------------------
  * - current device format
PI Key:
  Y - protection type supported at specified block size
  N - protection type not supported at specified block size
  ? - unable to determine support for protection type at specified block size
Relative performance key:
  N/A - relative performance not available.
  Best
  Better
  Good
  Degraded
--------------------------------------------------------------------------------
Logical Block Size  PI-0  PI-1  PI-2  PI-3  Relative Performance  Metadata Size
--------------------------------------------------------------------------------
*               512     Y     N     N     N                   N/A            N/A
--------------------------------------------------------------------------------
 
Last edited:

MuscleLazy

Member
Apr 30, 2022
43
2
8
@DarkServant thanks a lot for that link I’ll try to update the firmware tonight. How to I know the difference between pm883 and pm883a on my disk? On the disk label would be written pm883a, I presume, mines is written pm883.
 

MuscleLazy

Member
Apr 30, 2022
43
2
8
@pimposh i just don’t want to write the wrong firmware on the disk. The way I figured, the only place indicated I deal with a pm883a disk is on the actual disk sticker?
 

pimposh

hardware pimp
Nov 19, 2022
139
78
28
These are actual model numbers for PM883 (not 883a)
MZ7LH240HAHQ-00005
MZ7LH480HAHQ-00005
MZ7LH960HAJR-00005
MZ7LH1T9HMLT-00005
MZ7LH3T8HMLT-00005
MZ7LH7T6HMLA-00005

Last 5 characters might be different with different vendors.
Anyway most likely A won't accept not-A FW and viceversa.
--

IIRC "a" were "HB" in model name for smaller ones and "HA" (instead of HM) for larger.
 
  • Like
Reactions: MuscleLazy

MuscleLazy

Member
Apr 30, 2022
43
2
8
Thanks @pimposh, what is the NF indicator into HXT7A04Q_NF.bin, new firmware? I would've never known that is the last firmware, unless @DarkServant mentioned it earlier. What is the correct way to determine the latest firmware version? Looks like letters have precedence.

1675021903578.png

@DarkServant, I see an SSDManager tool into directories, should I use that to write the firmware or use the Samsung_SSD_DC_Toolkit 2.1?
 

Attachments

MuscleLazy

Member
Apr 30, 2022
43
2
8
Yep, DCToolkit complains about a specific firmware format, it would not take the .bin. I'm on HXT7A04Q now:
Code:
# hdparm --fwdownload ./pm883/HXT7A04Q_NF.bin --please-destroy-my-drive --yes-i-know-what-i-am-doing /dev/sda
# reboot
# hdparm --user-master u --security-set-pass 1 /dev/sda
# hdparm -I /dev/sda
Security:
    Master password revision code = 65534
        supported
        enabled
        locked
    not frozen
    not expired: security count
        supported: enhanced erase
    Security level high
    32min for SECURITY ERASE UNIT. 32min for ENHANCED SECURITY ERASE UNIT.
# hdparm --user-master u --security-erase-enhanced 1 /dev/sda
security_password: "1"
/dev/sda:
Issuing SECURITY_ERASE command, password="1", user=user
I waited 35min until the disk is wiped and unlocked, --security-erase-enhanced will do that automatically when completed:
Code:
# hdparm -I /dev/sda
Security:
    Master password revision code = 65534
        supported
    not enabled
    not locked
    not frozen
    not expired: security count
        supported: enhanced erase
    32min for SECURITY ERASE UNIT. 32min for ENHANCED SECURITY ERASE UNIT.
However, I'm still not able to format these disks to 4Kn, I was sure the firmware update will enable that:
Code:
# openSeaChest_FormatUnit --showSupportedFormats -d /dev/sda
==========================================================================================
openSeaChest_Format - openSeaChest drive utilities - NVMe Enabled
Copyright (c) 2014-2023 Seagate Technology LLC and/or its Affiliates, All Rights Reserved
openSeaChest_Format Version: 2.6.2-4_0_2 X86_64
Build Date: Jan 27 2023
Today: Sun Jan 29 17:44:18 2023    User: root
==========================================================================================

/dev/sg0 - SAMSUNG MZ7LH960HAJR-00005 - HXT7A04Q - ATA

WARNING: Customer unique firmware may have specific requirements that
         restrict sector sizes on some products. It may not be possible to format/
         fast format to common sizes like 4K or 512B due to these customer requirements.


Supported Logical Block Sizes and Protection Types:
---------------------------------------------------
  * - current device format
PI Key:
  Y - protection type supported at specified block size
  N - protection type not supported at specified block size
  ? - unable to determine support for protection type at specified block size
Relative performance key:
  N/A - relative performance not available.
  Best
  Better
  Good
  Degraded
--------------------------------------------------------------------------------
Logical Block Size  PI-0  PI-1  PI-2  PI-3  Relative Performance  Metadata Size
--------------------------------------------------------------------------------
*               512     Y     N     N     N                   N/A            N/A
--------------------------------------------------------------------------------
 
Last edited:

MuscleLazy

Member
Apr 30, 2022
43
2
8
What makes you think 4K formatting will bring much benefit, if any?
I need these drives to 4Kn because they will be used to create a ZFS mirror pool, which by default creates it with a ashift=12 for AF 4096-byte logical sectors hard drives. With 512-byte sectors, the hard drive must perform extra mechanical steps in the form of reading a 4K sector, modifying the contents and then writing the data, a read-modify-write (RMW) cycle. For the 4K native hard drive configured with 4K physical sectors and 4K logical sectors, there is no emulation layer in place. I wrote more about it into a tutorial at TrueNAS forums.

Is not the end of the world to use 512e, especially that I got these PM883 and PM863 drives for next to nothing. I just want to avoid the extra RMW cycle.

The PM863 firmware is missing from the upload site, any idea what is the latest available firmware and where can I get it? I currently have installed GXT32F3Q firmware on PM863s.
 
Last edited: