[SOLVED] Re: labelling root file system (RELENG_8)

Rob Farmer rfarmer at predatorlabs.net
Wed Jun 8 18:27:33 UTC 2011

On Wed, Jun 8, 2011 at 10:05 AM, Jeremy Chadwick
<freebsd at jdc.parodius.com> wrote:
> Interestingly enough, the long procedure I originally described is
> probably what was causing the problem.  Not 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

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=16 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.

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
>  enabled
> So the extra rigmarole I was doing somehow caused the problem.
> --
> | Jeremy Chadwick                                   jdc at parodius.com |
> | Parodius Networking                       http://www.parodius.com/ |
> | UNIX Systems Administrator                   Mountain View, CA, US |
> | Making life hard for others since 1977.               PGP 4BD6C0CB |
> _______________________________________________
> freebsd-stable at freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-stable
> To unsubscribe, send any mail to "freebsd-stable-unsubscribe at freebsd.org"

More information about the freebsd-stable mailing list