From owner-freebsd-questions@FreeBSD.ORG Mon Sep 4 23:19:11 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 DDC3816A4E0 for ; Mon, 4 Sep 2006 23:19:11 +0000 (UTC) (envelope-from csar@stanford.edu) Received: from smtp-roam.Stanford.EDU (smtp-roam.Stanford.EDU [171.64.10.152]) by mx1.FreeBSD.org (Postfix) with ESMTP id 403EA43D73 for ; Mon, 4 Sep 2006 23:19:06 +0000 (GMT) (envelope-from csar@stanford.edu) Received: from [171.66.32.49] (DNab422031.Stanford.EDU [171.66.32.49]) (authenticated bits=0) by smtp-roam.Stanford.EDU (8.12.11/8.12.11) with ESMTP id k84NJ41c013476 (version=TLSv1/SSLv3 cipher=RC4-SHA bits=128 verify=NOT); Mon, 4 Sep 2006 16:19:05 -0700 In-Reply-To: <44F4718F.1010502@mac.com> References: <34A15B01-CECC-478F-8EE8-3AEA839803C7@stanford.edu> <44F4718F.1010502@mac.com> Mime-Version: 1.0 (Apple Message framework v752.2) Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed Message-Id: <25D1B58B-AA8F-4CE1-AAF7-768F7A6B35C9@stanford.edu> Content-Transfer-Encoding: 7bit From: Can Sar Date: Mon, 4 Sep 2006 16:18:59 -0700 To: Chuck Swiger X-Mailer: Apple Mail (2.752.2) Cc: FreeBSD-questions@FreeBsd.org Subject: Re: UFS2 fsck Question (semantics of -p) 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: Mon, 04 Sep 2006 23:19:11 -0000 We ran our experiment on top of a very simple RAM disk which does not have any caches or anything of that sort. The dmesg log is at http://keeda.stanford.edu/dmesg The resultant images are at: http://keeda.stanford.edu/ufs-umount-image http://keeda.stanford.edu/ufs-mount-sync-image If you run fsck -p on them, fsck will not be able to recover, while fsck without the -p option will be able to. Can On Aug 29, 2006, at 9:55 AM, Chuck Swiger wrote: > Can Sar wrote: > [ ... ] >> Would you consider it an error if the -p option does not fix >> inconsistencies caused by a simple power failure, without any >> hardware or software corruption? > > You're asking an interesting question, but the issue of data > integrity depends not only on the software which comprises the OS, > but also on the hardware being used. > > In particular, the system depends upon the hard drives to reliably > report when data being written actually has been; SCSI drives, > using tagged command queuing, especially in conjunction with a > battery-backup which ensures the drive stays up long enough to > flush it's write cache even if system power is removed, will tend > to fare pretty well. > > IDE drives, by contrast, have a bad habit of lying about whether > data has actually been written to the disk itself rather than > simply making it to the write cache on the drive. (Such drives > ignore the ATA "FLUSH CACHE" command, specificly.) > > In other words, showing that a filesystem can become inconsistent > in a fashion that "fsck -p" cannot correct is interesting and a > concern regardless of the circumstances, but showing it in cases > where you are using battery-backed drives and/or SCSI rather than > IDE is a lot more meaningful. If you are using IDE devices, your > testing will be more meaningful if you disable the IDE write-cache > entirely. Also, you should put your results somewhere, perhaps on > a webpage with links to the filesystem images and a complete dmesg > so that the OS version and hardware being used is well-documented. > > -- > -Chuck >