SUMMARY: init 5

From: sun_question question <sun_question_at_hotmail.com>
Date: Tue Sep 10 2002 - 11:06:15 EDT
Original post...
>Does any init (0-6)do a sync before bringing system down?

As always, thanks managers for the quick responses.  Too many to list...
All (except 2) responses were "yes".

Responses below...

init doesn't synchronise your filesystems explicitly, umount(1m) does. 
umount
will be called as you shut down your filesystem via any command - halt,
shutdown, init etc.

There are issues with doing something like "init 5" on systems with IDE 
disks -
the write cache on the disk itself sometimes doesn't get time to flush 
before
the unit is powered down.
----------------------------------------------------------------------
init 0 : goes thru the /etc/rc0.d/* scripts then halts ( note halt these 
days also syncs first )
init 1:  goes to single user - no need for sync
init 2; multi user
init 3: mult user plus network
init 4: user defined
init 5: as init 0, but with power off ( or as init 0 when on domains in a 
starfire )
init 6: as 0 or 5, but reboots

so 0, 5, 6, and halt all do a sync or two. shutdown also call halt which 
calls sync. note that you can suppy flags to shutdown/halt to not sync if 
thats what you want.
------------------------------------------------------------------------------------
Specifically, when you change run level init references /etc/inittab and
runs the corresponding script, eg. /sbin/rc5. If you take a look at the
end of these scripts, you'll see that sync is explicitly run (three times,
no less!) and the filesystems are all unmounted (which alone would be
enough to sync them).
------------------------------------------------------------------------------------
All of them do.  Even 'reboot' and 'halt' which don't run any shutdown
scripts still attempt to sync any filesystems before stopping the OS.
-------------------------------------------------------------------------------------


_________________________________________________________________
Chat with friends online, try MSN Messenger: http://messenger.msn.com
_______________________________________________
sunmanagers mailing list
sunmanagers@sunmanagers.org
http://www.sunmanagers.org/mailman/listinfo/sunmanagers
Received on Tue Sep 10 11:09:18 2002

This archive was generated by hypermail 2.1.8 : Thu Mar 03 2016 - 06:42:54 EST