Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 4 Jul 2013 13:33:42 -0700
From:      Jeremy Chadwick <jdc@koitsu.org>
To:        Mike Jakubik <mike.jakubik@intertainservices.com>
Cc:        freebsd-stable@freebsd.org
Subject:   Re: UFS Trim wont stay set
Message-ID:  <20130704203342.GA98181@icarus.home.lan>
In-Reply-To: <51D5CEF8.9000504@intertainservices.com>
References:  <51D5CEF8.9000504@intertainservices.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Thu, Jul 04, 2013 at 03:37:28PM -0400, Mike Jakubik wrote:
> Hello,
> 
> I've just installed a stable snapshot on a new machine with a SSD
> drive, after installing i booted single user mode and ran
> 
> # tunefs -t enable /dev/ada0p2
> tunefs: issue TRIM to the disk set
> 
> Great, back to multiuser mode, i check the partition
> 
> # tunefs -p /dev/ada0p2
> tunefs: POSIX.1e ACLs: (-a)                                disabled
> tunefs: NFSv4 ACLs: (-N)                                   disabled
> tunefs: MAC multilabel: (-l)                               disabled
> tunefs: soft updates: (-n)                                 enabled
> tunefs: soft update journaling: (-j)                       enabled
> tunefs: gjournal: (-J)                                     disabled
> tunefs: trim: (-t)                                         disabled
> 
> What the heck.. did i miss something? Back to single user mode and
> 
> # tunefs -t enable /dev/ada0p2
> tunefs: issue TRIM to the disk remains unchanged as enabled
> 
> I check again in multiuser mode and it says disabled, any ideas what
> is going on here?

Yup, experienced this myself many times over.  The reasons are
understood (it's not limited to just the TRIM bits, it's related to
anything adjusting the superblock -- it gets cached in memory in certain
situations and not flushed back to disk).

Hint: are you booting into single user and then issuing a "mount"
command before doing your tunefs stuff?  If so, this is probably
what's causing it (at least it was in my case).

Instead just boot into single-user, do not mount anything, and use
/sbin/tunefs (if available -- depends on your filesystem setup) or
/rescue/tunefs.

-- 
| Jeremy Chadwick                                   jdc@koitsu.org |
| UNIX Systems Administrator                http://jdc.koitsu.org/ |
| Making life hard for others since 1977.             PGP 4BD6C0CB |




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