I don't get how sync will write anything to a "ro" filesystem. That seems to
be to break a fundamental kernel and  filesystem principle.

I would have thought either the "remount" would either force a flush of
dirty blocks before it switches to "ro", or alternatively those blocks still
dirty at the time of the "remount" end up in the bit bucket.

Also I have seen this 3 sync incantation before. It seems to me that all you
are doing playing snap with processes that might have stuff to write but
hasn't been flushed. After any sync and before the final shutdown I presume
any running process is at liberty to create new dirty blocks that may or may
not make it to disk in time.



Regards, Martin

martinvisse...@gmail.com


On Sun, Feb 21, 2010 at 12:37 PM, Daniel Pittman <dan...@rimspace.net>wrote:

> Jeremy Visser <jer...@visser.name> writes:
> > On 19/02/10 13:41, Daniel Pittman wrote:
> >
> >> ] mount / -o remount,rw
> >> ] passwd root  # ...and give it a good password
> >> ] mount / -o remount,ro
> >> ] sync; sync; sync
> >> # wait thirty seconds, because paranoia never hurts
> >> ] sync; sync; sync; reboot
> >
> >> Just be aware that you don't get a lot of nice things like, oh, some
> >> of the "flush on shutdown" behaviour that you do in a normal boot.
> >
> > Shutting down from the GUI, or typing 'halt' isn't magic. It doesn't
> > magically do anything that sync doesn't. How else do you think that the
> > logic works when you shut down?
>
> ...perhaps my working wasn't clear, as you seem to be restating my point?
>
>        Daniel
>
> --
> ✣ Daniel Pittman            ✉ dan...@rimspace.net            ☎ +61 401 155
> 707
>               ♽ made with 100 percent post-consumer electrons
> --
> SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/
> Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html
>
--
SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/
Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html

Reply via email to