On 2020-06-13 12:56, Todd C. Miller wrote: > On Sat, 13 Jun 2020 12:12:05 -0400, Nick Holland wrote: > >> On 2020-06-11 12:07, Strahil Nikolov wrote: >> > I always thought that 'sync' mount option is enough to avoid >> > corruption of the FS. Am I just "fooling" myself ? >> >> As "sync" is the default...yes, I think you are. > > Actually, by default only metadata is written synchronously. The > "sync" mount option causes data to be written synchronously too. > Of course, the disk *itself* has a cache so even with synchronous > writes you can't be sure the data has actually made it to the platter. > > So yes, I agree that sync mounts are not really enough to help here. > You are probably correct that softdep is better for this kind of > thing since it does a better job of keeping the filesystem in a > consistent state, at the cost of missing data when there is an > unclean shutdown. In theory, the on-device cache can still cause > issues when you lose power though.
Thanks for the correction! The really embarrassing thing is I even checked the man page, but started from the incorrect assumption that "async" and "sync" were the only two choices and read what I expected, not what is actually on the page. Nick.