From owner-freebsd-questions@FreeBSD.ORG Fri Jun 16 19:38:01 2006 Return-Path: X-Original-To: freebsd-questions@freebsd.org Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 7E6CD16A47B for ; Fri, 16 Jun 2006 19:38:01 +0000 (UTC) (envelope-from fbsdlists@gmail.com) Received: from ug-out-1314.google.com (ug-out-1314.google.com [66.249.92.172]) by mx1.FreeBSD.org (Postfix) with ESMTP id 8ABA043D46 for ; Fri, 16 Jun 2006 19:38:00 +0000 (GMT) (envelope-from fbsdlists@gmail.com) Received: by ug-out-1314.google.com with SMTP id m3so1934266uge for ; Fri, 16 Jun 2006 12:37:59 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=GKtIYPjJzR8hi5DIVl1KT74V+cAqLdddxyelS9EPTX9qUgpusVJ5542dNNa7qDJRsSoMifiicFBd0Z6bUrA1pCTY105Ze3cw/iaMpkyXyvxwE4nZ3F+HY3EhZt3ZiyRcttMXeKr7jw2/9p58ys+6GJSe4vn09LewFji8xlHb3WE= Received: by 10.78.39.16 with SMTP id m16mr1029443hum; Fri, 16 Jun 2006 08:18:03 -0700 (PDT) Received: by 10.78.12.15 with HTTP; Fri, 16 Jun 2006 08:18:03 -0700 (PDT) Message-ID: <54db43990606160818u1e3df3b8sfb30066fc005661f@mail.gmail.com> Date: Fri, 16 Jun 2006 11:18:03 -0400 From: "Bob Johnson" To: "=?ISO-8859-1?Q?Pablo_Mar=EDn_Ram=F3n?=" In-Reply-To: <20060616104704.GA11222@localhost> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: quoted-printable Content-Disposition: inline References: <20060616104704.GA11222@localhost> Cc: freebsd-questions@freebsd.org Subject: Re: FFS data integrity X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Jun 2006 19:38:01 -0000 On 6/16/06, Pablo Mar=EDn Ram=F3n wrote: > Here goes a newbie question about classical FFS (without > softupdates). > > As metadata is updated synchronously, can an i-node, at some > point, end pointing to not written yet data blocks? Is this a > security risk, i.e., can those pointed to data blocks pertain to > another user's deleted on memory but not deleted on disk data, or > that deleted data will be marked in metadata as not initialized > and after a crash fsck will fix all i-nodes pointing to it? > The short answer is that fsck can detect the bad inodes and fix or delete them. Assuming no programming errors, you don't have to worry about a file containing bogus data after fsck has run. Unfortunately, if write-caching is enabled on your hard drive (and it probably is, for speed), then the drive may internally re-order the writes and the carefully crafted sequence of writes disappears, so there are no guarantees (or at least, not as many). Whether this is actually a problem depends on the brand, model, and firmware version of the drive, because some drives claim that data has been written to the disk when it is actually only in the drive buffer, while other drives are more honest. More details are found in http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/configtuning-disk= .html > AFAIK, softupdates and ext3 in the default mode (data=3Dordered) > don't have this problem, but journalling filesystems that journal > only metadata do. Is this correct? I think that is answered in the handbook section referenced above. - Bob