Huawei HSSD-D5222 3.6TB SAS SSDs

This is yet another snippet on how to make some Huawei SSDs work in a normal computer, since by default these use 520-byte logical and 4160-byte physical sectors, which means they won’t be usable outside of Huawei’s own OceanStor devices.

A somewhat leaning tower of SSDs

Yes, I know using parts from chinese manufacturers can be a controversioal topic, especially after they’ve been banned in many countries, but I don’t see how a couple SAS SSDs are going to hand my data over to the Chinese government, so I don’t really mind the arrangement.

Why do I have them? Because they were cheap at around £33/TB. And since they are MLC drives, they have very high endurance. The most used drive has only been through 8% of its rated writes, so I can use the remaining 92%, although knowing myself, I doubt that I’ll hold onto them for long enough to burn through all of that. Being SAS drives, they are also a bit lighter on the PCIe lanes, as I can hook up 8 of them to a HBA, or even 16, if I go for a different model, whereas I can only connect four NVMe drives to an x16 PCIe slot.

It’s the same problem that people generally have with NetApp devices and, perhaps somewhat surprisingly, the same solution work with these too.

By default, this is the output of smartctl:

smartctl 7.4 2023-08-01 r5530 [x86_64-linux-6.12.9-200.fc41.x86_64] (local build)
Copyright (C) 2002-23, Bruce Allen, Christian Franke, www.smartmontools.org

=== START OF INFORMATION SECTION ===
Vendor:               HUAWEI
Product:              HSSD-D5222AM5C60
Revision:             3172
Compliance:           SPC-4
User Capacity:        3,656,970,495,360 bytes [3.65 TB]
Logical block size:   520 bytes
Physical block size:  4160 bytes
LU is resource provisioned, LBPRZ=1
Rotation Rate:        Solid State Device
Form Factor:          2.5 inches
Logical Unit id:      0x50425c52bbd20002
Serial number:        2102350TLL10H4000037
Device type:          disk
Transport protocol:   SAS (SPL-4)
Local Time is:        Wed Jan 22 15:44:19 2025 GMT
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: 7%
Current Drive Temperature:     36 C
Drive Trip Temperature:        78 C

Accumulated power on time, hours:minutes 48242:45
Manufactured in week 12 of year 2017
Specified cycle count over device lifetime:  0
Accumulated start-stop cycles:  0
Specified load-unload count over device lifetime:  0
Accumulated load-unload cycles:  0
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    29273         0     29273      29273    1006738.380           0
write:         0        0         0         0          0     676369.583           0

Non-medium error count:        0

SMART Self-test log
Num  Test              Status                 segment  LifeTime  LBA_first_err [SK ASC ASQ]
     Description                              number   (hours)
# 1  Background short  Completed                   -   48240                 - [-   -    -]

Long (extended) Self-test duration: 600 seconds [10.0 minutes]

You can see the logical and physical block sizes at the top as being 520 and 4160 bytes. That’s why a regular OS won’t be able to handle these. They do show up, but there is no option to create partitions or use them in any way.

However, after reformatting, they behave just like any other SSD.

And smartctl will also report the physical sector size as 4096 bytes.

smartctl 7.4 2023-08-01 r5530 [x86_64-linux-6.12.9-200.fc41.x86_64] (local build)
Copyright (C) 2002-23, Bruce Allen, Christian Franke, www.smartmontools.org

=== START OF INFORMATION SECTION ===
Vendor:               HUAWEI
Product:              HSSD-D5222AM5C60
Revision:             3172
Compliance:           SPC-4
User Capacity:        3,600,709,410,816 bytes [3.60 TB]
Logical block size:   4096 bytes
LU is resource provisioned, LBPRZ=1
Rotation Rate:        Solid State Device
Form Factor:          2.5 inches
Logical Unit id:      0x538bc01f517fa002
Serial number:        2102350TLL10H4000012
Device type:          disk
Transport protocol:   SAS (SPL-4)
Local Time is:        Wed Jan 22 15:44:00 2025 GMT
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: 8%
Current Drive Temperature:     36 C
Drive Trip Temperature:        78 C

Accumulated power on time, hours:minutes 48242:48
Manufactured in week 15 of year 2017
Specified cycle count over device lifetime:  0
Accumulated start-stop cycles:  0
Specified load-unload count over device lifetime:  0
Accumulated load-unload cycles:  0
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    11606         0     11606      11606     981425.146           0
write:         0        0         0         0          0     666247.579           0

Non-medium error count:        0

SMART Self-test log
Num  Test              Status                 segment  LifeTime  LBA_first_err [SK ASC ASQ]
     Description                              number   (hours)
# 1  Background short  Completed                   -   48240                 - [-   -    -]

Long (extended) Self-test duration: 600 seconds [10.0 minutes]

Process

I am using a Dell H330, flashed with the HBA330 firmware, so it behaves as a HBA and passes through the drives straight to the OS.

To reformat them, you need to install sg3_utils and follow the commands below. The source is this amazing guide on servethehome’s forums.

# install sg3_utils
yum install sg3_utils

# list the drives
sudo sg_scan -i

/dev/sg0: scsi0 channel=0 id=0 lun=0 [em]
    ATA       Micron_5100_MTFD  U027 [rmb=0 cmdq=1 pqual=0 pdev=0x0] 
/dev/sg1: scsi1 channel=0 id=0 lun=0 [em]
    ATA       Micron_5100_MTFD  U027 [rmb=0 cmdq=1 pqual=0 pdev=0x0] 
/dev/sg2: scsi2 channel=0 id=0 lun=0 [em]
    ATA       Micron_5100_MTFD  U027 [rmb=0 cmdq=1 pqual=0 pdev=0x0] 
/dev/sg3: scsi3 channel=0 id=0 lun=0 [em]
    ATA       Micron_5100_MTFD  U037 [rmb=0 cmdq=1 pqual=0 pdev=0x0] 
/dev/sg4: scsi18 channel=0 id=0 lun=0 [em]
    ORACLE    SSM               PMAP [rmb=1 cmdq=0 pqual=0 pdev=0x0] 
/dev/sg5: scsi19 channel=0 id=8 lun=0
    HUAWEI    HSSD-D5222AM5C60  3172 [rmb=0 cmdq=1 pqual=0 pdev=0x0] 
/dev/sg6: scsi19 channel=0 id=9 lun=0
    HUAWEI    HSSD-D5222AM5C60  3172 [rmb=0 cmdq=1 pqual=0 pdev=0x0] 
/dev/sg7: scsi19 channel=0 id=10 lun=0
    HUAWEI    HSSD-D5222AM5C60  3172 [rmb=0 cmdq=1 pqual=0 pdev=0x0] 
/dev/sg8: scsi19 channel=0 id=11 lun=0
    HUAWEI    HSSD-D5222AM5C60  3172 [rmb=0 cmdq=1 pqual=0 pdev=0x0] 
/dev/sg9: scsi19 channel=0 id=12 lun=0
    HUAWEI    HSSD-D5222AM5C60  3172 [rmb=0 cmdq=1 pqual=0 pdev=0x0] 
/dev/sg10: scsi19 channel=0 id=13 lun=0
    HUAWEI    HSSD-D5222AM5C60  3172 [rmb=0 cmdq=1 pqual=0 pdev=0x0] 
/dev/sg11: scsi19 channel=0 id=14 lun=0
    HUAWEI    HSSD-D5222AM5C60  3172 [rmb=0 cmdq=1 pqual=0 pdev=0x0]
    
# format them one-by-one
sudo sg_format --format --size=4096 /dev/sg6

HUAWEI    HSSD-D5222AM5C60  3172   peripheral_type: disk [0x0]
      << supports protection information>>
      Unit serial number: 2102350TLL10H4000025
      LU name: 538bc01f5187f002
Mode Sense (block descriptor) data, prior to changes:
  <<< longlba flag set (64 bit lba) >>>
  Number of blocks=7032635568 [0x1a32d80b0]
  Block size=520 [0x208]

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

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

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

Format unit has started
FORMAT UNIT Complete

And that’s it. They will need to be power cycled after reformatting, after which they will be usable by the OS.

Notes and power consumption

They work a bit like some SAS hard drives, wherein they will refuse to turn on if the 3.3V pin is connected, so the easiest is to not connect it. I have a SATA power splitter that simply doesn’t have it wired up, but it’s easy enough to cut it too. Just make sure it won’t be shorted to the case or any metal parts.

The other, all-time favourite question is the power consumption. These are SAS drives and are rated at 12V, 1.2A. They never use that much power. The 7 drives use around 30W in idle altogether, so that’s 4.3W per drive, which is not bad. More than a SATA drive, of course, but maybe a bit less than an enterprise-grade U.2 NVMe device, like an Intel P3600 or P4600.


Posted

in

by

Tags:

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *