TRIM considerations when repartitioning a SSD

RW rwmaillists at googlemail.com
Mon Sep 8 21:25:48 UTC 2014


On Mon, 08 Sep 2014 15:08:26 +0100
Mike Clarke wrote:

> On Thursday 28 Aug 2014 17:24:04 Adam Vande More wrote:
> > On Thu, Aug 28, 2014 at 4:54 PM, Mike Clarke
> > <jmc-freebsd2 at milibyte.co.uk>
> > wrote:
> > > FreeBSD 9.3-RELEASE
> > > 
> > > I may soon need to repartition a SSD which has a zpool on it and
> > > was wondering what is the best method of ensuring that all blocks
> > > get marked as no longer in use.
> > > 
> > > Is gpart sufficiently TRIM aware to be able to just use gpart
> > > delete?
> > Extremely doubtful that it is.  You generally must reset the drive
> > eg
> > 
> > camcontrol security da4 -s buhbyesweetdata -e buhbyesweetdata
> 
> I've tried this but it failed

newfs -tE will trim the free space on the UFS filesystem it creates.
Even if you don't want UFS, you could run it on the raw drive, the
difference is most likely negligible.


More information about the freebsd-questions mailing list