Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 24 Jun 2009 14:48:34 +0500
From:      rihad <rihad@mail.ru>
To:        Simun Mikecin <numisemis@yahoo.com>
Cc:        freebsd-fs@freebsd.org
Subject:   Re: Is it preferable to use the sync command?
Message-ID:  <4A41F672.9080900@mail.ru>
In-Reply-To: <130804.21855.qm@web37303.mail.mud.yahoo.com>
References:  <4A41E073.70902@mail.ru> <130804.21855.qm@web37303.mail.mud.yahoo.com>

next in thread | previous in thread | raw e-mail | index | archive | help
Simun Mikecin wrote:
> 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?
ATA.

> Turning soft-updates on for SCSI should do the trick.
But not for ATA? Why I'm asking: other partitions using soft-updates 
don't seem to have lost any data.

> 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".
> 

I think this is much easier to do remotely than turning soft-updates on 
:-) I'll still try both solutions, thanks.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4A41F672.9080900>