From owner-freebsd-stable@FreeBSD.ORG Thu Jul 4 20:33:58 2013 Return-Path: Delivered-To: freebsd-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 9A503AEE for ; Thu, 4 Jul 2013 20:33:58 +0000 (UTC) (envelope-from jdc@koitsu.org) Received: from relay4-d.mail.gandi.net (relay4-d.mail.gandi.net [217.70.183.196]) by mx1.freebsd.org (Postfix) with ESMTP id 57F311D7E for ; Thu, 4 Jul 2013 20:33:58 +0000 (UTC) Received: from mfilter6-d.gandi.net (mfilter6-d.gandi.net [217.70.178.135]) by relay4-d.mail.gandi.net (Postfix) with ESMTP id 393FC172092; Thu, 4 Jul 2013 22:33:47 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at mfilter6-d.gandi.net Received: from relay4-d.mail.gandi.net ([217.70.183.196]) by mfilter6-d.gandi.net (mfilter6-d.gandi.net [10.0.15.180]) (amavisd-new, port 10024) with ESMTP id 39Mm8ttJyur2; Thu, 4 Jul 2013 22:33:45 +0200 (CEST) X-Originating-IP: 76.102.14.35 Received: from jdc.koitsu.org (c-76-102-14-35.hsd1.ca.comcast.net [76.102.14.35]) (Authenticated sender: jdc@koitsu.org) by relay4-d.mail.gandi.net (Postfix) with ESMTPSA id 3EB04172085; Thu, 4 Jul 2013 22:33:44 +0200 (CEST) Received: by icarus.home.lan (Postfix, from userid 1000) id 6330C73A1C; Thu, 4 Jul 2013 13:33:42 -0700 (PDT) Date: Thu, 4 Jul 2013 13:33:42 -0700 From: Jeremy Chadwick To: Mike Jakubik Subject: Re: UFS Trim wont stay set Message-ID: <20130704203342.GA98181@icarus.home.lan> References: <51D5CEF8.9000504@intertainservices.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <51D5CEF8.9000504@intertainservices.com> User-Agent: Mutt/1.5.21 (2010-09-15) Cc: freebsd-stable@freebsd.org X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Jul 2013 20:33:58 -0000 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 |