Replacing Drive with SSD
Warren Block
wblock at wonkity.com
Fri Aug 28 18:55:15 UTC 2015
On Fri, 28 Aug 2015, Brandon J. Wandersee wrote:
>
> Matt Smith writes:
>
>> I've heard a rumour that you should never use dd with SSD drives because
>> of the wear levelling stuff. Apparently SSDs automatically make sure
>> that data is sent to unused flash cells so that all the cells wear
>> evenly, but if you use dd on them it makes them think that every single
>> cell is in use which screws this up?
>
> I've read the same thing before, but I can't imagine it would really be
> a problem if it's the first thing you do with a new disk (and the only
> time you do it).
The SSD keeps a map of which blocks have been written. So writing just
once with dd is not a wear problem. The problem is that now the SSD has
no way of knowing whether that block has real data on it or not. So it
can't swap it for wear leveling. That's what trim does--when a file is
deleted, the filesystem uses trim to notify the SSD that those blocks
are no longer in use.
On a bigger level, a "secure erase" resets all the blocks on a drive to
unused, and can restore performance to an SSD. Of course, it erases all
the data also... so restore from the backup that was made first. But
not with dd. :)
More information about the freebsd-questions
mailing list