2017-11-27

ATA Security Erase

It is best to run these commands under tmux or screen to make sure that the erase is not interrupted.

FreeBSD

Check security status

camcontrol security adaX

If the drive security is frozen reconnect the power cable or suspend to ram:

zzz

Execute enhanced SECURITY ERASE UNIT

camcontrol security adaX -U user -s Eins
date; time camcontrol security adaX -U user -h Eins

OR issue the SCSI SANITIZE command CRYPTO SCRAMBLE EXT for instant secure erase (should be faster for rotating disks as only the crypto key is changed rendering the data unreadable) The -r option is used to report status.

date; time camcontrol sanitize adaX -U -a crypto
camcontrol sanitize adaX -U -r

Linux

Check security status

hdparm -I /dev/sdX

If the drive security is frozen reconnect the power cable or suspend to ram:

echo -n mem > /sys/power/state

Execute enhanced SECURITY ERASE UNIT

hdparm --security-set-pass Eins /dev/sdX
date; time hdparm --security-erase-enhanced Eins /dev/sdX

No comments:

Post a Comment