I don’t see how attempting to over-write would help. The additional blocks are not addressable on the OS side. dd
will exit because it reached the end of the visible device space but blocks will remain untouched internally.
The Arch wiki says
blkdiscard -z
is equivalent to runningdd if=/dev/zero
.
Where does it say that? Here it seems to support the opposite. The linked paper says that two passes worked “in most cases”, but the results are unreliable. On one drive they found 1GB of data to have survived 20 passes.
The idea is that
blkdiscard
will tell the SSD’s own controller to zero out everything. The controller can actually access all blocks regardless of what it exposes to your OS. But will it do it? Who knows?After reading all of this I would just do both… Each method fails in different ways so their sum might be better than either in isolation.
But the actual solution is to always encrypt all of your storage. Then you don’t have to worry about this mess.