Date: Mon, 07 Sep 2015 10:53:11 -0500 From: Brandon J. Wandersee <brandon.wandersee@gmail.com> To: Warren Block <wblock@wonkity.com> Cc: freebsd-questions@freebsd.org Subject: Re: Replacing Drive with SSD Message-ID: <8637yqz0ns.fsf@WorkBox.Home> In-Reply-To: <alpine.BSF.2.20.1509061046320.41355@wonkity.com> References: <CEAD84AD-341A-4FB9-A3A1-D0D5A550AFFD@lafn.org> <55E01DAE.1020709@infracaninophile.co.uk> <20150828084643.GB1274@xtaz.uk> <864mjj1fh3.fsf@WorkBox.Home> <alpine.BSF.2.20.1508281248500.74312@wonkity.com> <8637yro6nu.fsf@WorkBox.Home> <alpine.BSF.2.20.1509061046320.41355@wonkity.com>
next in thread | previous in thread | raw e-mail | index | archive | help
Warren Block writes: > On Sun, 6 Sep 2015, Brandon J. Wandersee wrote: > >> >> Warren Block writes: >> >>> 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. >> >> Would this also apply to a *single file* written using dd? Your SSD >> guide recommends creating a swap file from /dev/zero using dd: >> >>> Because the data goes through the file system, TRIM will be used, and >>> the swap file can be resized without repartitioning the SSD. >> >> So is the problem with dd and SSDs only relevant when targeting a whole >> block device? > > Yes. Well, really it is about writing with methods that do not track > whether a block is in use. When that swap file is deleted, UFS tells > the SSD that all those blocks are no longer in use. dd(1) does not even > have the concept of blocks being used or not, it just copies data. Good to know, thanks. -- ================================================================= :: Brandon Wandersee :: :: brandon.wandersee@gmail.com :: ================================================================== 'A common mistake that people make when trying to design something completely foolproof is to underestimate the ingenuity of complete fools.' - Douglas Adams ==================================================================
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?8637yqz0ns.fsf>