Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 4 Jul 2013 14:01:14 -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:  <20130704210114.GA98690@icarus.home.lan>
In-Reply-To: <51D5DFA6.6010202@intertainservices.com>
References:  <51D5CEF8.9000504@intertainservices.com> <20130704203342.GA98181@icarus.home.lan> <51D5DFA6.6010202@intertainservices.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Thu, Jul 04, 2013 at 04:48:38PM -0400, Mike Jakubik wrote:
> On 07/04/13 16:33, Jeremy Chadwick wrote:
> >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.
> 
> I booted in to single user mode and the system mounted the only file
> system there, which is mounted at /. What i did now however is boot
> off a Live CD and run tunefs, this did the trick!

I talked with Andriy Gapon a couple years ago about this, actually.  I
had to dig up the thread.  Here are the relevant parts (read in order):

http://lists.freebsd.org/pipermail/freebsd-stable/2011-June/062921.html
http://lists.freebsd.org/pipermail/freebsd-stable/2011-June/062922.html
http://lists.freebsd.org/pipermail/freebsd-stable/2011-June/062923.html
http://lists.freebsd.org/pipermail/freebsd-stable/2011-June/062924.html

Make sure you read Andriy's comments (2nd URL) in full.  My follow-up
(4th URL) confirms that the "mount -a" (which is what made / read-write
since /etc/fstab obviously has / as rw) was causing the issue.  He
explains the reason.

-- 
| 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?20130704210114.GA98690>