On Thu, Nov 08, 2018 at 12:20:02AM +0000, Rick Stevens wrote:
> On 11/7/18 4:06 PM, Paul Allen Newell wrote:
> > On 11/07/2018 03:04 PM, Ed Greshko wrote:
> >> On 11/8/18 6:52 AM, Paul Allen Newell wrote:
> >>>
> >>> On 11/07/2018 01:52 PM, ToddAndMargo via users wrote:
> >>>>
> >>>> This is the dismount part of my script:
> >>>>
> >>>>       sync; sync
> >>>>       umount $StickTarget
> >>>>
> >>>>
> >>> Calling sync twice?
> >> Must be an "old" person.  It was common practice back in the early
> >> 1980's to call sync
> >> twice before shutdown on Solaris.
> >> Don't ask me why.  I was just "done that way".
> >>
> > Okay. I remember enough "don't ask, just do it this way" techniques from
> > old days that I am certainly prepared to buy this one
> 
> Again, I believe it was to ensure any background tasks writing to
> system volumes were "done". The typical command was
> 
>       sync;sync;shutdown -h now
> 
> or (if you're as ancient as I am)
> 
>       sync;sync;init 0

In UNIX, old Linux, and I think POSIX, sync merely
queues things to be written.  It does not guarentee
the data are written.  The multiple syncs were to
provide time for the writes to complete.

From the current sync manpage, Linux's sync(2)
does not return until the writes are done.

Maybe a second or more sync's would pick up
any data modified while the first sync runs.

Jon
-- 
Jon H. LaBadie                  jo...@jgcomp.com
_______________________________________________
users mailing list -- users@lists.fedoraproject.org
To unsubscribe send an email to users-le...@lists.fedoraproject.org
Fedora Code of Conduct: https://getfedora.org/code-of-conduct.html
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: 
https://lists.fedoraproject.org/archives/list/users@lists.fedoraproject.org

Reply via email to