Is it preferable to use the sync command?

Simun Mikecin numisemis at yahoo.com
Wed Jun 24 09:28:23 UTC 2009


rihad wrote:
> Having experienced a FreeBSD 5.1 crash due to power failure (despite using a UPS) resulting in massive /etc corruption and data loss, in order to minimize future risks should I:
> 0) tweak (decrease) these default sysctls:
> kern.filedelay: 30
> kern.dirdelay: 29
> kern.metadelay: 28
> 1) mount the root FS with soft-updates enabled (left as disabled in sysinstall by default due to known reasons)
> 2) setup a cron job calling /bin/sync every minute
> I somehow feel that turning soft-updates on would do the trick (it is not normally written to and has plenty of free space anyway).


Do you use ATA or SCSI?
Turning soft-updates on for SCSI should do the trick.
Since there is no support for gjournal and/or ZFS on 5.1, for ATA only real solution would be disabling write-cache (which degrades performance): "sysctl hw.ata.wc=0".



      


More information about the freebsd-fs mailing list