reboot(2) syncing disks (was Re: All the problems with...update)

Zack Weinberg (zack@rabi.columbia.edu)
Tue, 18 May 1999 19:54:20 -0400


On Tue, 18 May 1999 23:04:47 +0200 (CEST), Andrea Arcangeli wrote:
>On Tue, 18 May 1999, Zack Weinberg wrote:
>
>>personally I think it's a bug that reboot(2) doesn't unmount filesystems and
>>sync first.
>
>If so (I don't remeber sysvinit internals) just send an email to the
>sysvinit maintainer instead of use a sysvinit bug to justify putting
>update into the kenrel ;).

I'm not talking about what happens when you ask init politely to reboot the
machine. Reboot, the system call, does not flush dirty buffers and unmount
file systems.

I could be convinced that it shouldn't. However, it would take some doing.
On every other UNIX I have used that was created after 1989 or so, reboot
does flush and unmount. The older systems that didn't were severely
irritating from a sysadmin's point of view.

Imagine for a moment that your primary NFS server has trashed its root
partition and will not even come up in single user mode. You've booted the
machine from the emergency repair disk. The users are calling the machine
room every thirty seconds to ask when "the Internet" will be back up. fsck
is printing cryptic messages that you don't quite know what they mean, but
you don't like the looks of them one bit. It is two AM. You haven't had
anything to eat since two PM. In fact, you haven't been out of the machine
room since two PM, except to run to the Coke machine down the hall.

Ah! fsck is done! Now tell me... do you remember to type `sync' and wait
thirty seconds before rebooting? Init won't do it for you, there is no
init on the emergency rescue disk.

The above, incidentally, is a true story.

zw

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/