From owner-freebsd-fs@FreeBSD.ORG Wed Jun 24 09:48:40 2009 Return-Path: Delivered-To: freebsd-fs@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1BD4D106564A for ; Wed, 24 Jun 2009 09:48:40 +0000 (UTC) (envelope-from rihad@mail.ru) Received: from mx40.mail.ru (mx40.mail.ru [94.100.176.54]) by mx1.freebsd.org (Postfix) with ESMTP id CCEFD8FC12 for ; Wed, 24 Jun 2009 09:48:39 +0000 (UTC) (envelope-from rihad@mail.ru) Received: from [217.25.27.27] (port=57067 helo=[217.25.27.27]) by mx40.mail.ru with asmtp id 1MJP5r-0009zZ-00; Wed, 24 Jun 2009 13:48:40 +0400 Message-ID: <4A41F672.9080900@mail.ru> Date: Wed, 24 Jun 2009 14:48:34 +0500 From: rihad User-Agent: Mozilla-Thunderbird 2.0.0.19 (X11/20090103) MIME-Version: 1.0 To: Simun Mikecin References: <4A41E073.70902@mail.ru> <130804.21855.qm@web37303.mail.mud.yahoo.com> In-Reply-To: <130804.21855.qm@web37303.mail.mud.yahoo.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Spam: Not detected X-Mras: Ok Cc: freebsd-fs@freebsd.org Subject: Re: Is it preferable to use the sync command? X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 24 Jun 2009 09:48:40 -0000 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.