K
K
Konstantin2017-06-11 17:15:34
linux
Konstantin, 2017-06-11 17:15:34

Zero out a solid state drive with dd - will it work?

If you do the following with a solid state drive:
# dd if=/dev/zero of=/dev/sda bs=4K
Then it will be overwritten just like a regular HDD and the information will disappear?
Will it be dangerous for him later (won't performance decrease)?

Answer the question

In order to leave comments, you need to log in

6 answer(s)
N
nirvimel, 2017-06-11
@nirvimel

Then it will be overwritten just like a regular HDD and the information will disappear?

Yes.
It will be dangerous (and it's not just about performance). Unless you immediately do TRIM (AKA DISCARD) with blkdiscard. Since it is generally quite harmful for an SSD to be completely full, and it turns out to be such at the moment between the completion of dd and the start of blkdiscard.
But you can do both operations with one command: securely erase all the contents and TRIM the entire "surface". In this case, the disk is never completely full, since erasing and TRIM are performed together. I advise you to read in the mana about this command: blkdiscard -s -z /dev/sda.

A
Artem @Jump, 2017-06-11
Tag curated by

Then it will be overwritten just like a regular HDD and the information will disappear?
Yes. True, not all, some will remain in the reserve area. But recovering it from there is almost unbelievable.
Although it is easier to make disk cleanup a regular utility.

1
15432, 2017-06-11
@15432

ssd and hdd have support for the ata secure erase command, which is faster than a simple dd and is guaranteed to erase the entire disk

A
Alexey Skobkin, 2017-06-11
@skobkin

In general, if my memory serves me, it is more efficient to do erasure on an SSD by resetting the key that encrypts data in memory.

N
Nazar Mokrinsky, 2017-06-11
@nazarpc

1) There is no point in specifying bs
2) There are special commands for cleaning the SSD: https://wiki.archlinux.org/index.php/Solid_State_D...
3) Not dangerous; the resource of memory cells will decrease slightly, but this is not something to worry about with modern SSDs

T
theurs, 2017-06-12
@theurs

If you overwrite with zeros, then the controller will successfully compress them into zero and only the beginning will be erased in each block. And in order to get the data, even the mythical tunneling microscope would not be required, which supposedly could read data from pancakes of mechanical disks.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question