I am zeroing out some old drive - some may not have secure erase. If I issue the command:

hpparm --security-erase-enhanced

Against a drive that does not have this feature, will it error? Man does not tell me.

  • @Fryboyter@discuss.tchncs.de
    link
    fedilink
    English
    5
    edit-2
    1 year ago

    With the command hdparm -I /dev/sdX you can check if ATA Secure Erase is supported by the respective hard disk. If the output shows among others things supported: enhanced erase this is the case. Instead of sdX you must of course specify the respective hard disk.

    Edit: You should run this command anyway to make sure that the hard disk in question is not frozen (https://archive.kernel.org/oldwiki/ata.wiki.kernel.org/index.php/ATA_Secure_Erase.html#Step_1a_-_Ensure_the_drive_is_not_frozen:).

    • WasPentaliveOP
      link
      English
      21 year ago

      Ok My drive does not have the feature - and took the hdparm --security-erase-enhanced without any error. I guess I will use dd then.

    • WasPentaliveOP
      link
      1
      edit-2
      1 year ago

      Not in my case.

      After I posted :
      I ran hdparm --security… and did not get an error.

      Then I ran hpparm -I and found that the drive did not have the secure erase feature.

      So I did not get the error on a drive that should have errored. I am guessing the Security Erase command just spews the appropriate command at the drive and nothing Is reported back.

      • @dlarge6510@lemm.ee
        link
        fedilink
        11 year ago

        Hmm perhaps the drive is responsible for returning the error and your ones are just ignoring invalid commands.

        • WasPentaliveOP
          link
          11 year ago

          Seems like a valid assessment. Also I am using a USB attached SATA adapter, so that may play into it too.

          • @dlarge6510@lemm.ee
            link
            fedilink
            11 year ago

            Also I am using a USB attached SATA adapter

            Very likely. Hdparm must support the bridge chip in order to pass commands through the bridge, now we know that the bridge in some form supported as you are able to query the drive but it might be the bridge is blocking either the security-erase command or the response. The drive would respond to the bridge should there be any errors, the bridge has to pass that on.

            The only way to be certain is to plug the drive into a proper AHCI SATA port. Or use eSATA.

            • WasPentaliveOP
              link
              11 year ago

              Ah well, I switched to a USB3 drive toaster I borrowed. This works much faster. I just did a 3TB drive basically overnight. Not as fast as secure erase but fast enough.