2

When issuing the ATA secure erase command via hdparm against multiple SATA (non-SSD) drives it occurs in parallel.

However when the same command is issued against PATA drives, it occurs consecutively. For example the second PATA drive does not commence its process until the first process has completed.

Is the ATA Secure Erase command limited by a single PATA channel?

If yes, why would it be since its an internal routine of the drive controller?

Can it be overcome with independent IDE channels?

Note in issuing the dd command to wipe the drive, it occurs in parallel.

PATA drives have historically been is use in aging and legacy devices that are now being decommissioned. The requirement is to securely wipe the drives as they contained sensitive data such as personally identifiable information.

  • That would be serially rather than concurrently. – JdeBP Jan 11 at 8:42
  • @JdeBP - To clarify, what would be occurring serially? Do you mean to say the commands issued against PATA drives? If yes, why do you say serially as opposed to concurrently? – Motivated Jan 11 at 16:36
  • No clarification is really needed. You only use the word concurrently in one context, where you should be using the word serially, so it is amply clear what needs to be fixed. And I say this because it is the correct word to use. Look up what concurrent actually means in a dictionary. – JdeBP Jan 12 at 18:18
  • @JdeBP - I am conscious of the difference in the word serial and concurrent. The reason i used concurrent is that if i passed the command, i assumed that it would be processed concurrently. It would subsequently be limited by a single queue that would result in a serial process. Happy to be enlightened if it's otherwise. – Motivated Jan 12 at 20:06
  • 1
    I'm pretty sure you mean mean consecutively (one after another, as opposed to both at the same time, i.e., concurrently) in you're second paragraph. Otherwise, your question makes no sense... I edited it. – derobert Jan 16 at 15:34
2

You're likely seeing a limitation of PATA: two drives share the same bus (channel), and only one can be actively using it at a time. Busy processing a command with the host waiting for the result counts as using it. I've seen some drives that immediately return after hdparm --security-erase and process the command "offline", others hdparm does not return until the command is done. I suspect the former drives would allow master & slave to to both be doing it at once.

Note this did sort of improve over the many years PATA was in use; and mostly the improvements went to where it matters: read and write commands. And dd can do both drives even if they're ancient because its not one write command, it's many, many write commands. (On truly ancient drives, it's actually taking turns — write some sectors to one drive, write some sectors to the other; newer modes allow the drives to receive the write command, buffer it, and process it "off-line" freeing the bus, that way both drives can be writing at the same time).

(BTW: This is also why when you had PATA drives in RAID arrays, both mirrors needed to be on different buses. Either the master or slave failing would often take out the bus.)

If you have multiple PATA channels (or buses, or whatever you call them), each should be able to handle a drive doing a security erase, concurrently. I've successfully used USB PATA interfaces to invoke secure erase (and dd as well, I personally do both); and of course it's trivial and fairly cheap to add more USB devices. At least for the security erase, which doesn't take USB bandwidth.

SATA, of course, is point-to-point, there isn't a shared bus with multiple drives. So this issue doesn't exist.

  • Can you elaborate on "Busy processing a command with the host waiting for the result counts as using it" as well as "I've seen some drives that immediately return after hdparm --security-erase and process the command "offline""? – Motivated Jan 16 at 16:30
  • When you say dd can do both drivers, do you mean to say that as it writes to one disk and it progresses to write to the second disk so that it appears to be occurring in parallel? – Motivated Jan 16 at 16:32
  • When you say USB PATA interface, are you referring to (amazon.com/Generic-Adapter-Converter-Optical-External/dp/…) as an example? If yes, my understanding is that ATA commands cannot traverse USB. – Motivated Jan 16 at 16:33
  • @Motivated I've tried to clarify the dd case. Not sure what you want clarified, unless maybe just what I meant by "offline". I just mean not holding the bus. As for ATA commands over USB, maybe long ago it didn't work. But it has for quite a while. I've personally used smile.amazon.com/gp/product/B00CPGYNV4 and you can definitely send a security erase over it. (Sorry for some of the vagueness, I haven't used PATA in any real way in a long time). – derobert Jan 16 at 16:38
  • 1
    @Motivated I validated it works be reading back the drive (after it said it was done) and confirming the data was gone. But yeah, hdparm -I said it was supported, and the various things you expect to happen did (e.g., after setting a password, it said it had one with hdparm -I. After security erase, it didn't anymore). You could test easily enough on a drive you've already blanked, so if you brick it you don't care. – derobert Jan 16 at 17:21

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.