From owner-freebsd-stable@FreeBSD.ORG Wed Jun 8 18:27:33 2011 Return-Path: Delivered-To: freebsd-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C5766106566B; Wed, 8 Jun 2011 18:27:33 +0000 (UTC) (envelope-from rfarmer@predatorlabs.net) Received: from mail-vw0-f54.google.com (mail-vw0-f54.google.com [209.85.212.54]) by mx1.freebsd.org (Postfix) with ESMTP id 632358FC0C; Wed, 8 Jun 2011 18:27:33 +0000 (UTC) Received: by vws18 with SMTP id 18so860336vws.13 for ; Wed, 08 Jun 2011 11:27:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=predatorlabs.net; s=google; h=domainkey-signature:mime-version:x-originating-ip:in-reply-to :references:date:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=bz8pJjQrP6JgVvjX5lwvX1Zr7igbCHcdpc2aS09UXKc=; b=jQ/zvwA/f3vO8M6xyaltDJa/HzLtHCqgmBw3PtgbTQU6oYNkc4kalJSY1lx/IiMMYb Bn4oBnF9ipsvT3CRjAjVUjekS6TMp57wHJVfLUcTMylqxxLOLrhIjjxqDHDZNUWE9Z3D K+wZn5ju5bJUdnxP8ZwoMoVn1LKgqV2Hhja2E= DomainKey-Signature: a=rsa-sha1; c=nofws; d=predatorlabs.net; s=google; h=mime-version:x-originating-ip:in-reply-to:references:date :message-id:subject:from:to:cc:content-type :content-transfer-encoding; b=Pd8mFzJ7aBiC8QecET7FMlRl81+PZKSljL8Htn85LPjDZM4LUfU3MWtROb6SeMkJ3N WQD2FPt3D7nWzJcsXg+lOz9zRRzljNNCiwXYis75qqwp7qa1XlGHcX5gnIJjnUeDjZM3 QMvkWMWEkrdAhO4fySs48izEgikVLRWU3baeM= MIME-Version: 1.0 Received: by 10.220.202.137 with SMTP id fe9mr1727544vcb.79.1307555993488; Wed, 08 Jun 2011 10:59:53 -0700 (PDT) Received: by 10.220.184.73 with HTTP; Wed, 8 Jun 2011 10:59:53 -0700 (PDT) X-Originating-IP: [128.95.133.213] In-Reply-To: <20110608170548.GA2031@icarus.home.lan> References: <4DEF7322.8030907@gmx.de> <4DEF8103.9030401@gmx.de> <20110608162626.GA94883@icarus.home.lan> <4DEFA5E3.8080806@FreeBSD.org> <20110608165515.GA95345@icarus.home.lan> <20110608170548.GA2031@icarus.home.lan> Date: Wed, 8 Jun 2011 10:59:53 -0700 Message-ID: From: Rob Farmer To: Jeremy Chadwick Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: freebsd-stable@freebsd.org, Andriy Gapon Subject: Re: [SOLVED] Re: labelling root file system (RELENG_8) X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 08 Jun 2011 18:27:33 -0000 On Wed, Jun 8, 2011 at 10:05 AM, Jeremy Chadwick wrote: > Interestingly enough, the long procedure I originally described is > probably what was causing the problem. =A0Not sure how to phrase it. > I don't have a reference for this, but I'm pretty sure it was on one of the mailing lists at some point. The kernel reads the super-block into memory and uses that copy when the file system is mounted. If you have the it mounted rw, then at unmount it is written back out to the disk. If it's mounted ro, the in-memory copy is thrown out and the disk isn't changed. If you upgrade a file system from ro to rw, it does not re-read the on disk copy. tunefs directly modifies on the on-disk copy regardless of mount status, so when you unmount a rw file system, anything it has done is overwritten. The only way to modify / (without alternate boot media) is what you've described below: boot single user, leave it ro, tunefs, then reboot while still ro. Also, I've seen the sysctl kern.geom.debugflags=3D16 thing in zfs tutorials and such, but haven't seen where it's actually necessary. I think this is outdated and changed circa 8.0. --=20 Rob Farmer > The exact procedure which worked was: > > - Start system > - Boot into single-user > - Hit enter at prompt (choose /bin/sh) > - mount --- shows root filesystem mounted read-only (normal) > - tunefs -t enable /dev/ada0s1a --- says it enabled TRIM support > - tunefs -p /dev/ada0s1a --- shows TRIM support enabled > - reboot > - After system starts, as root: tunefs -p /dev/ada0s1a --- shows TRIM > =A0enabled > > So the extra rigmarole I was doing somehow caused the problem. > > -- > | Jeremy Chadwick =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0= =A0 =A0 =A0 jdc@parodius.com | > | Parodius Networking =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 http://= www.parodius.com/ | > | UNIX Systems Administrator =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 Mountain= View, CA, US | > | Making life hard for others since 1977. =A0 =A0 =A0 =A0 =A0 =A0 =A0 PGP= 4BD6C0CB | > > _______________________________________________ > freebsd-stable@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-stable > To unsubscribe, send any mail to "freebsd-stable-unsubscribe@freebsd.org" >