Is there fact to the ideology that you should sync ; sync ; sync ; sync?

When I was first presented to Linux, operating at Cisco Systems in 2000, I was educated the qualities of the sync command, made use of to purge barriers to disk to stop filesystem corruption/ information loss. I was informed not just by colleagues there, yet by close friends in university to constantly run sync "a couple of" or "a number" of times, that is, possibly 5 - 10 times, as opposed to simply as soon as.

I've proceeded this behavior since, yet, exists any kind of quality to this? Has any person else ever before heard this? And also most notably, can any person give excellent reasoning/ empirical proof for/against the suggestion that you require to run sync greater than as soon as for it to be reliable?

2019-05-13 04:41:48
Source Share
Answers: 1

I heard it (sorry, I neglect where) as keying the sync command 3 times (as in : S Y N C Return, await the punctual, repeat, repeat). I additionally read that the beginning was a certain system where it would certainly take a number of secs for the disk to end up purging its barriers, also after it had actually informed the os every little thing was great. Keying in the command two times extra offered the disk adequate time to resolve. It appears that for many years, the objective was neglected, and also the suggestions was abbreviated as sync; sync; sync which would not have actually had the wanted result (given that the disk had actually reported the "green light", the 2nd and also 3rd syncs would certainly finish promptly and also the punctual would certainly return prematurely).

I have actually never ever come across a system where numerous sync procedures have any kind of usage, and also I am very cynical any kind of exist. I consider this an urban myth. On the various other hand, I locate it very credible that there would certainly be systems where you need to wait a number of secs after sync' ing and also prior to powering down.

Googling brings about a couple of independent concurring evaluations, as an example The Legend of sync. See additionally Is execution of sync(8) still required before shutting down linux?.

2019-05-17 18:00:18