From owner-freebsd-fs@FreeBSD.ORG Thu May 12 18:05:59 2011 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 852B3106566C for ; Thu, 12 May 2011 18:05:59 +0000 (UTC) (envelope-from gpalmer@freebsd.org) Received: from noop.in-addr.com (mail.in-addr.com [IPv6:2001:470:8:162::1]) by mx1.freebsd.org (Postfix) with ESMTP id 53A5A8FC13 for ; Thu, 12 May 2011 18:05:59 +0000 (UTC) Received: from gjp by noop.in-addr.com with local (Exim 4.74 (FreeBSD)) (envelope-from ) id 1QKaGr-000BCB-RL; Thu, 12 May 2011 14:05:57 -0400 Date: Thu, 12 May 2011 14:05:57 -0400 From: Gary Palmer To: Jeremy Chadwick Message-ID: <20110512180557.GB37035@in-addr.com> References: <4DCA5620.1030203@dannysplace.net> <4DCB455C.4020805@dannysplace.net> <20110512033626.GA52047@icarus.home.lan> <4DCB7F22.4060008@digsys.bg> <20110512083429.GA58841@icarus.home.lan> <20110512090524.GA2106@icarus.home.lan> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20110512090524.GA2106@icarus.home.lan> X-SA-Exim-Connect-IP: X-SA-Exim-Mail-From: gpalmer@freebsd.org X-SA-Exim-Scanned: No (on noop.in-addr.com); SAEximRunCond expanded to false Cc: freebsd-fs Subject: Re: ZFS: How to enable cache and logs. 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: Thu, 12 May 2011 18:05:59 -0000 On Thu, May 12, 2011 at 02:05:24AM -0700, Jeremy Chadwick wrote: > I guess that's also what I'm asking here -- what guarantee do you have > that even with a mirrored 2-disk SLOG (or heck, 3 or 4!) that *no data* > will be *lost* during a power outage? > > It seems to me the proper phrase would be "the likelihood of losing an > entire pool during a power outage is lessened". Alexander indirectly > hinted at this in another post of his tonight, specifically regarding > zpool v15 versus v28: > > "The difference between v15 and v28 is the amount of data you lose (the > entire pool vs. only what is still on the log devices)". > > This makes much more sense to me. > > It seems that in a power outage, there will always be some form of data > loss. I imagine even systems that have hardware RAM/cache with BBUs on > everything; there's always some form of caching going on *somewhere* > within a system, from CPU all the way up, that guarantees some degree of > data loss). I guess I'm OCD'ing over the terminology here. Sorry. At one level, nothing you can do in hardware can protect you from data loss or corruption due to a power outage. This is why applications and protocols must be designed with that in mind. E.g. RFC 821/2821/5321 explicitly state that a MTA cannot acknowledge the . at the end of the DATA segment until the message is committed to permanent storage. That can lead to message duplication, but thats better than the alternative - the message is always queued *somewhere*. (And yes, there are/ were vendors who "accidentally" overlook that requirement in the name of increased throughput) Trying to solve this entirely in hardware is pointless. You need to look at the entire system end-to-end to eliminate data loss problems. Regards, Gary