Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 8 Jun 2011 10:59:53 -0700
From:      Rob Farmer <rfarmer@predatorlabs.net>
To:        Jeremy Chadwick <freebsd@jdc.parodius.com>
Cc:        freebsd-stable@freebsd.org, Andriy Gapon <avg@freebsd.org>
Subject:   Re: [SOLVED] Re: labelling root file system (RELENG_8)
Message-ID:  <BANLkTik-CUotodrvYxxp-mY_oROqM4X38g@mail.gmail.com>
In-Reply-To: <20110608170548.GA2031@icarus.home.lan>
References:  <4DEF7322.8030907@gmx.de> <BANLkTimBYL8e2y86m7GZv5U8hdok3KR%2B=w@mail.gmail.com> <4DEF8103.9030401@gmx.de> <20110608162626.GA94883@icarus.home.lan> <4DEFA5E3.8080806@FreeBSD.org> <20110608165515.GA95345@icarus.home.lan> <20110608170548.GA2031@icarus.home.lan>

next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, Jun 8, 2011 at 10:05 AM, Jeremy Chadwick
<freebsd@jdc.parodius.com> 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"
>



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