[TriLUG] [OT] disk wiping software

Brian Daniels bitmage at pobox.com
Thu Jan 19 14:50:34 EST 2012


On 01/19/2012 02:12 PM, Chris Knowles wrote:

> On Thu, Jan 19, 2012 at 2:05 PM, Chris Bullock<cgbullock at yahoo.com>  wrote:
>
>> We have several servers and storage enclosures that we no longer use and I
>> was going to try to sell them.  These disks have health information on them
>> and must be wiped before I get rid of them.

Assuming that they are relatively recent disks (SATA), you can trigger 
the internal secure wipe routine of the drive using hdparm:

https://ata.wiki.kernel.org/articles/a/t/a/ATA_Secure_Erase_936d.html

basically (assuming you're wiping /dev/sdc):

Set password:
# hdparm --user-master u --security-set-pass Eins /dev/sdc

hdparm responds:
security_password="Eins"
/dev/sdc:
  Issuing SECURITY_SET_PASS command, password="Eins", user=user, mode=high

Wipe drive:
# hdparm --user-master u --security-erase Eins /dev/sdc

hdparm responds:
security_password="Eins"
/dev/sdc:
  Issuing SECURITY_ERASE command, password="Eins", user=user

--Brian

-- 

And yet less thanks have we than you.  Users scowl at us, and reporters
give us scornful names.  "Geek" I am to one fat man who lives a firewall
away from foes that would steal his identity or lay his little computer
in ruin, if it was not guarded ceaselessly.  Yet we would not have it
otherwise.
                                     ---Aragorn, sysadmin.

Brian Daniels                  bitmage at pobox.com
       http://www.eviloverlord.net



More information about the TriLUG mailing list