Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 31 Aug 2015 18:13:26 +0100
From:      Steve O'Hara-Smith <steve@sohara.org>
To:        freebsd-questions@freebsd.org
Subject:   Re: Replacing Drive with SSD
Message-ID:  <20150831181326.ec4d6bdab2d2f10de5f7aa22@sohara.org>
In-Reply-To: <55E4865B.1000104@sneakertech.com>
References:  <CEAD84AD-341A-4FB9-A3A1-D0D5A550AFFD@lafn.org> <alpine.BSF.2.20.1508281235390.74312@wonkity.com> <20150829220311.c7608be1.freebsd@edvax.de> <alpine.BSF.2.20.1508300633160.44682@wonkity.com> <55E45973.2050103@sneakertech.com> <alpine.BSF.2.20.1508311000550.42983@wonkity.com> <55E4865B.1000104@sneakertech.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Mon, 31 Aug 2015 12:52:43 -0400
Quartz <quartz@sneakertech.com> wrote:

> > That is exactly what TRIM is, a mechanism for a filesystem to tell the
> > drive "this block is no longer in use". Otherwise, the only thing the
> > drive has to determine whether a block is in use is whether it has ever
> > been written.
> 
> But, from what I understand, it doesn't exactly tell the firmware "this 
> is no longer in use" so much as it says "you can zero this right now if 
> you want"
> 
> 
> >> Simply assuming based on if or how long ago it was written to can't
> >> possibly be a workable solution. I'm not convinced that leaving large
> >> chunks of the drive 'free' has any effect on wear leveling.
> >
> > It provides a pool of blocks that have not and will not be written.
> 
> Bbut how does the drive "know" that those blocks are not allocated by a 
> partition somewhere and are safe to use as spares? It's not like the 
> drive firmware reads into the partition table or anything.

	AIUI that with SSDs and the like it's more that physical blocks are
not allocated to logical block addresses until the block is written to for
the first time, so all blocks are spares until they are used and they can
be returned to the spare pool using TRIM. All this with the proviso that
the physical blocks used in the SSD generally cover many logical blocks.

-- 
Steve O'Hara-Smith <steve@sohara.org>



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20150831181326.ec4d6bdab2d2f10de5f7aa22>