From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: fd705,2481588b2317173b X-Google-Attributes: gidfd705,public X-Google-Thread: 1164f8,2481588b2317173b X-Google-Attributes: gid1164f8,public X-Google-ArrivalTime: 1991-09-06 00:04:22 PST Path: gmdzi!unido!mcsun!inesc.inesc.pt!dec4pt.puug.pt!unl!unl!jpc From: jpc@fct.unl.pt (Jose Pina Coelho) Newsgroups: alt.folklore.computers,comp.sys.dec Subject: Re: why three syncs? Message-ID: Date: 5 Sep 91 10:11:09 GMT References: <1991Sep04.194822.22074@uvmark.uucp> <1991Sep4.214231.29086@uwm.edu> Sender: news@fct.unl.pt (USENET News System) Organization: Universidade Nova de Lisboa -- Lisbon, Portugal Xref: gmdzi alt.folklore.computers:33446 comp.sys.dec:25178 In-Reply-To: zark@csd4.csd.uwm.edu's message of 4 Sep 91 21: 42:31 GMT In article <1991Sep4.214231.29086@uwm.edu> zark@csd4.csd.uwm.edu (Steven M Kosloske) writes: I'm not sure about other UNIX admin's, but I got started doing three sync commands because that was what was suggested in the SCO Xenix manual. In reality, all you should need is one, but better safe then sorry, we run three. I've seen some do more than three before a shutdown. Want to be sure that everything is closed and written to disk before powering down a Unix system. >From the ultrix manual pages: Name: sync(1) - update the super block Description: The sync command executes the sync system primitive. The sync command can be called to insure all disk writes have been com- pleted before the processor is halted in a way not suitably done by reboot(8) or halt(8). See sync(2) for details on the system primitive. Name: sync(2) - update super-block Description: The sync system call causes all information in memory that should be on disk to be written out. This includes modified super- blocks, modified i-nodes, and delayed block I/O. [...] # The writing, although scheduled, is not # necessarily complete upon return from sync. This last paragraph is the important one. The first sync only asks the system to start flushing the cache, so, you need a certain time for the cache to be clear. The next two syncs are called to give the system time to flush. -- Jose Pedro T. Pina Coelho | BITNET/Internet: jpc@fct.unl.pt Rua Jau N 1, 2 Dto | UUCP: ...!mcsun!unl!jpc 1300 Lisboa, PORTUGAL | Home phone: (+351) (1) 640767 Sex is not the answer. Sex is the question. "Yes" is the answer.