From owner-freebsd-questions@FreeBSD.ORG Mon Oct 14 17:10:13 2013 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 12B50C46 for ; Mon, 14 Oct 2013 17:10:13 +0000 (UTC) (envelope-from bmettee@pchotshots.com) Received: from mail.pchotshots.com (mail.pchotshots.com [12.172.123.237]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id C6428281F for ; Mon, 14 Oct 2013 17:10:12 +0000 (UTC) Received: (qmail 5303 invoked by uid 89); 14 Oct 2013 17:09:44 -0000 Received: from unknown (HELO ?12.172.123.228?) (bmettee@pchotshots.com@12.172.123.228) by mail.pchotshots.com with ESMTPA; 14 Oct 2013 17:09:44 -0000 Message-ID: <525C2554.7080203@pchotshots.com> Date: Mon, 14 Oct 2013 13:09:40 -0400 From: Brad Mettee User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:24.0) Gecko/20100101 Thunderbird/24.0.1 MIME-Version: 1.0 To: CeDeROM , Adam Vande More Subject: Re: SU+J Lost files after a power failure References: <525A6831.5070402@gmail.com> <20131014133953.58f74659@gumby.homeunix.com> <525C1D1C.9050708@gmail.com> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: David Demelier , FreeBSD Questions X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 14 Oct 2013 17:10:13 -0000 On 10/14/2013 12:50 PM, CeDeROM wrote: > On Mon, Oct 14, 2013 at 6:47 PM, Adam Vande More wrote: >> On Mon, Oct 14, 2013 at 11:34 AM, David Demelier >> wrote: >>> Why? SU+J is enabled by default. Isn't the purpose of a journaled file >>> system to ensure that any bad shutdown will protect data? >> As already stated, those measures are to preserve fs integrity eg meta data >> is in sync. It doesn't ensure that all the outstanding writes are >> committed to disk in the event of a power outage. > Then why random files gets damaged as well even they are not > accessed/written on power loss? :-) Random files can be affected because the sectors of the hard disk containing the directory entries for those files, not the file data itself, may be damaged (ie: the directory was in the process of being written OR the pointer to that SECTOR was in the process of being written). It doesn't mean a file was in active use, just that a chunk of the disk with data relevant to that file was. Keep in mind, one sector of disk may have data for a dozen files in it (or more). Damage doesn't have to occur because a given file was in use at the time of a crash. If your power grid is prone to failures or blips, I strongly suggest investing in a UPS. Brad