Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 26 Mar 2016 22:34:37 +0100
From:      Bernd Walter <ticso@cicely7.cicely.de>
To:        Ian Lepore <ian@freebsd.org>
Cc:        Nikolai Lifanov <lifanov@mail.lifanov.com>, freebsd-arm@freebsd.org
Subject:   Re: Official images without noatime
Message-ID:  <20160326213437.GA63809@cicely7.cicely.de>
In-Reply-To: <1459008905.1091.100.camel@freebsd.org>
References:  <mailman.41.1458993601.86944.freebsd-arm@freebsd.org> <4b23b28ffae59216b5dde8f28f665330@mail.lifanov.com> <1459008905.1091.100.camel@freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Sat, Mar 26, 2016 at 10:15:05AM -0600, Ian Lepore wrote:
> On Sat, 2016-03-26 at 08:32 -0400, Nikolai Lifanov wrote:
> > > 
> > > Hi,
> > > agree, in fact I have noatime on / as well. Shall be the default.
> > > 
> > > 
> > > 
> > > Cheers,
> > > 
> > > 
> > > ---
> > > Jos? P?rez
> > > 
> > > El 2016-03-26 00:38, Bernd Walter escribi?:
> > > > /boot/msdos has noatime, but / hasn't.
> > > > Considering SD media I think using noatime per default is a good
> > > > idea to avoid increased riscs of data loss on power failures.
> > > 
> > 
> > Since we also default to SU-no-J, power failure can be quite bad
> > during, 
> > say, installworld.
> > With / noatime, I had my RPI2 lose files like /usr/bin/cmp, /bin/ls,
> > and 
> > /bin/cat during a power loss.
> > Since it's not even possible to cleanly shut down this platform, I'm
> > for 
> > enabling noatime for / on

You can cleanly shuttdown a Pi as well as any other system via
shutdown(8) or even halt(8).

> > at least for RPI and RPI2 platforms.

This is related to flash media internal structure, not to RPIs.
With SD cards on the higher risc end.
Every flash write can lead to serveral unreadable blocks.
Since there is no fixed relation between logical and phycial block
numbers corruption can happen everywhere on the media.
The more you write the higher the risc.
But flash media also write flash cells when purely reading, since it
need some kind of refresh from time to time.
The risc for a power failure during refresh writes are less likely
however.

> I'm not sure why you think SU-no-J has anything to do with power
> failure, but before it turns into some kind of mythology let me just
> remind people that journaling does not enhance the ability to recover a
> filesystem, it only makes it faster to do so (when it doesn't fail
> completely, which it does all too often as seen with the numerous
> reports, some recent, of "it was finally fixed when I reran fsck
> without using the journal"). 

I would say the risc for data loss on power failure is even higher with
J, since it also writes the journal.

> To get that boot-time speedup in recovery it has to do more writing as
> it goes (writing metadata to the journal and then again to the live
> filesystem all the time).  Given the slow speed of sdcard writes,
> that's a steep price to pay to save 2 or 3 seconds of boot time after a
> power fail.
> 
> Again: journaling doesn't add reliability, it only speeds recovery.  On
> tiny sdcard filesystems the speedup is hardly noticible.

-- 
B.Walter <bernd@bwct.de> http://www.bwct.de
Modbus/TCP Ethernet I/O Baugruppen, ARM basierte FreeBSD Rechner uvm.



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