BLU Discuss list archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Discuss] systemd reboot
- Subject: [Discuss] systemd reboot
- From: joe at polcari.com (Joe Polcari)
- Date: Sun, 4 Mar 2018 12:20:37 -0500
- In-reply-to: <73b0b5ed-def9-e3e4-b678-d5fba4dfcfe3@gmail.com>
- References: <chx371hap0u.fsf@sdf.org> <20180303041119.3148add8@mydesk.domain.cxm> <chxd10kft5v.fsf@sdf.org> <73b0b5ed-def9-e3e4-b678-d5fba4dfcfe3@gmail.com>
Thanks for the sync update! Sent from my iPhone > On Mar 4, 2018, at 9:20 AM, Richard Pieri <richard.pieri at gmail.com> wrote: > > The old "sync;sync;sync;halt" mantra is folklore from the days before we > had a shutdown/reboot command which does this for us. The first sync > flushes any dirty buffers, the second blocks waiting for the first to > complete ensuring that there are no dirty buffers when the system goes > down, and the third... makes us feel good (it has no technical benefit). > > This doesn't work as expected today because most drives lie about > committing writes to permanent storage. The second sync won't block > unless the size of data in dirty kernel buffers exceeds the drives' > write cache capacity and then it will block only long enough for that > ratio to flip. If the system restarts, loses power, whatever, when the > drives' on-board caches have not been committed then there will be data > loss. The Linux kernel code which guarantees that writes are committed > doesn't actually work because it relies on drives not lying about their > cache commits. > > In which case the explicit sync in the script doesn't do anything in > terms of flushing data to disk. It does add a small delay between > running update-grub and the reboot which, I guess, gives your drives > enough time to commit their caches. > > -- > Rich P. > _______________________________________________ > Discuss mailing list > Discuss at blu.org > http://lists.blu.org/mailman/listinfo/discuss
- References:
- [Discuss] systemd reboot
- From: smallm at sdf.org (Mike Small)
- [Discuss] systemd reboot
- From: slitt at troubleshooters.com (Steve Litt)
- [Discuss] systemd reboot
- From: smallm at sdf.org (Mike Small)
- [Discuss] systemd reboot
- From: richard.pieri at gmail.com (Richard Pieri)
- [Discuss] systemd reboot
- Prev by Date: [Discuss] systemd reboot
- Next by Date: [Discuss] systemd reboot
- Previous by thread: [Discuss] systemd reboot
- Next by thread: [Discuss] systemd reboot
- Index(es):