Menu

#14 Unable to run multiple hdparm secure erase actions in parallel against multiple drives using port multiplier

v1.0 (example)
closed
nobody
None
5
2025-04-22
2025-04-17
hdparmuser
No

I'm using a Startech esata card that supports port multiplier with a Startech 4 bay drive esata dock.

I'm finding more often than not, when I try to run hdparm secure erase against 4 drives at the same time (4 seperate terminal windows), the first drive will execute the instructions while the other 3 drives do nothing until the 1st has completed. Once the 1st drive has completed, once in a while all the 3 other drives will then secure erase at the same time, but more often than not only 1 or 2 drives will secure erase after the 1st and then finally the 4th drive after the other drives have completed. A process that in theory should take 2 to 3 hours is taking around 8 hours (obviously dependant on the drive size).

Am I doing something wrong in how I'm using hdparm, or should all 4 drives be able to be secure erased at the same time?

Discussion

  • Mark Lord

    Mark Lord - 2025-04-17

    Not all SATA Port-Multiplier chips are capable of running multiple commands simultaneously. That is likely the issue you see here -- hardware, not software. Command-Based-Switching (CBS) is the most common type, and those can only control a single drive at any point in time.

    FIS-Based-Switching (FBS) are the better kind of port-multipler, and those can treat each drive completely independently, with multiple commands in-flight to multiple drives simultaneously.

    Cheers

     
  • Mark Lord

    Mark Lord - 2025-04-17
    • status: open --> closed
     
  • hdparmuser

    hdparmuser - 2025-04-22

    Both cards I'm testing with state they utilise FIS.

    Startech PEXESATA2 - Silicon Image - SiI3132
    and
    Startech PEXESAT322I - ASMedia - ASM1061

    According to Startech's documentation, both support FIS

     
  • Mark Lord

    Mark Lord - 2025-04-22

    Unfortunately, SATA Port Multipliers are surprisingly difficult. They never really got the "love" they deserved from chip makers and manufacturers, and the result is that getting FIS based switching (FBS) to work, end-to-end, is a rare thing.

    The chipset inside the port-multiplier itself (aka. "the dock"), and its firmware, both have to support FBS without any chip-specific quirks (aka. "secret bug fixes"). Then the host controller (the "card") also has to have FBS and NCQ support, and its firmware similarly has to also support that, and again not require any secret bug-fixes.

    Then the operating system has to support both of those. It's very tricky to find a combination that works. Sometimes it will work under MS-Windows, but not Linux, because of "secret bug fixes" that are necessary and which have not been disclosed to Linux developers.

    Sometimes it works under Linux and not under MS-Windows, because Linux developers can often be more clever in figuring this stuff out.

    I used to work on Linux, and hacked a bit of the port-multiplier code to make it work for me, here, with my own specific hardware. I got good results, and used it for about 15-years or so. But now I just use USB3 multi-drive enclosures, preferably with UAS support, and they work very well. Except one cannot usually issue the ERASE commands directly that way. Oh well.

    hdparm has very little to do with any of that above. It just issues the commands through Linux, and it is up to the Linux libata drivers to deal with the port-multiplier mess.

    Cheers

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.