Date: Fri, 28 Aug 2015 12:55:13 -0600 (MDT) From: Warren Block <wblock@wonkity.com> To: "Brandon J. Wandersee" <brandon.wandersee@gmail.com> Cc: Matt Smith <fbsd@xtaz.co.uk>, freebsd-questions@freebsd.org Subject: Re: Replacing Drive with SSD Message-ID: <alpine.BSF.2.20.1508281248500.74312@wonkity.com> In-Reply-To: <864mjj1fh3.fsf@WorkBox.Home> References: <CEAD84AD-341A-4FB9-A3A1-D0D5A550AFFD@lafn.org> <55E01DAE.1020709@infracaninophile.co.uk> <20150828084643.GB1274@xtaz.uk> <864mjj1fh3.fsf@WorkBox.Home>
next in thread | previous in thread | raw e-mail | index | archive | help
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. :)
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?alpine.BSF.2.20.1508281248500.74312>