Date: Fri, 30 Nov 2018 16:56:58 -0700 From: Ian Lepore <ian@freebsd.org> To: Eugene Grosbein <eugen@grosbein.net>, Masachika ISHIZUKA <ish@amail.plala.or.jp>, hackers@freebsd.org Subject: Re: How to use trim command ? Message-ID: <1543622218.1860.169.camel@freebsd.org> In-Reply-To: <7e69211c-6ffb-6155-b17a-a845c0b3586d@grosbein.net> References: <20181201.011411.2100982142219259108.ish@amail.plala.or.jp> <7e69211c-6ffb-6155-b17a-a845c0b3586d@grosbein.net>
next in thread | previous in thread | raw e-mail | index | archive | help
On Sat, 2018-12-01 at 03:32 +0700, Eugene Grosbein wrote: > 30.11.2018 23:14, Masachika ISHIZUKA wrote: > > > > > I'm using FreeBSD 13.0-CURRENT r341327. > > I want to use trim command. > > > > # trim /dev/gpt/fbroot-current > > trim `/dev/gpt/fbroot-current' offset 0 length 60568829952 > > dry run: add -f to actually perform the operation > > # trim -f /dev/gpt/fbroot-current > > trim `/dev/gpt/fbroot-current' offset 0 length 60568829952 > > trim: `/dev/gpt/fbroot-current': Operation not permitted > > carrot# echo $status > > 66 > > > > How can I use /usr/sbin/trim command ? > It seems this partition is in use (mounted?) and GEOM won't allow to > write > to opened partition, you need to close it first (unmount). > Be warned: trim will destroy all data in the partition. And therein lies yet another reason why trim is such a horrible name for this tool: nothing about the word trim implies destroying live useful information. In idiomatic English, the word drips with overtones of removing only the unneeded excess from something. Truly, dd (with its 30+ years of association of being THE tool that operates on disk devices or specified sub-ranges of blocks within them) is the place for such functionality. -- Ian
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1543622218.1860.169.camel>