From owner-freebsd-fs@FreeBSD.ORG Fri Mar 28 21:41:23 2014 Return-Path: Delivered-To: freebsd-fs@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 ESMTPS id 6CB48C61 for ; Fri, 28 Mar 2014 21:41:23 +0000 (UTC) Received: from mail-ob0-x233.google.com (mail-ob0-x233.google.com [IPv6:2607:f8b0:4003:c01::233]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 293838ED for ; Fri, 28 Mar 2014 21:41:23 +0000 (UTC) Received: by mail-ob0-f179.google.com with SMTP id va2so6641454obc.38 for ; Fri, 28 Mar 2014 14:41:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=v1oFRIcimTSHtl1CIhDJMMtE8YOrmFfvZnBPftHPn6Y=; b=petliEa4I7lID4BXCzERsp0nAlMRgK/i7UdfNKnkoFIf8BZl0YuXsiRwQ9agaaGdkU 1HfVlr09J4c5RoV5lB24yWOpltlom6v+0Bzz+B65OynAKTtNq/s7pOy0c+C0OmeOLaX+ 6fx1bRrIY77RVcwQU4Calz7TlvNYitNwoB+Sh9hKQCfu6uzbybCIxm5tcKV7hGc6HFe8 U1zlrqBQQluhXRme8TJAkSBd3Zy0WYpHwt6hqRNfnKlE1Hsioi8MsSndcc8NNpN84N9E ksPND4PKyqMmJB8l1HKPl3eg/NpuHwOvEPOMSeTdw2stPfN0LbKmwAtl8CwdqmFWO1qd 07Rg== MIME-Version: 1.0 X-Received: by 10.60.148.196 with SMTP id tu4mr4221535oeb.25.1396042882399; Fri, 28 Mar 2014 14:41:22 -0700 (PDT) Received: by 10.76.180.40 with HTTP; Fri, 28 Mar 2014 14:41:22 -0700 (PDT) In-Reply-To: References: <20140328005911.GA30665@neutralgood.org> Date: Fri, 28 Mar 2014 14:41:22 -0700 Message-ID: Subject: Re: zfs l2arc warmup From: Freddie Cash To: Dmitry Morozovsky Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.17 Cc: "freebsd-fs@freebsd.org" X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 28 Mar 2014 21:41:23 -0000 On Fri, Mar 28, 2014 at 2:19 PM, Dmitry Morozovsky wrote: > On Fri, 28 Mar 2014, Freddie Cash wrote: > > [snip most again] > > > Around ZFSv14-ish, the ability to import a pool with a missing ZIL was > > added. > > > > Remember the flow of data in ZFS: > > async write request --> TXG --> disk > > sync write request --> ZIL > > \--> TXG --> disk > > > > All sync writes are written to the pool as part of a normal async TXG > after > > its written sync to the ZIL. And the ZIL is only ever read during pool > > import. > > On the other side, doesn't it put the risk on sync-dependent, like > database, > systems? > > I'm thinking not about losing the transaction, but possibly putting your > filesystem in the middle of (database PoV) transaction, hence render your > DB > inconsistent? > > Quick googling seems to be uncertain about it... > =E2=80=8BThat I don't know. Again, I'm not a ZFS code guru; just a very happy/active ZFS user and reader of stuff online. :) You're thinking of the small window where: - database writes transaction to disk - zfs writes =E2=80=8Bthe data to the ZIL on the log vdev - zfs returns "data is written to disk" to the DB - zfs queues up the write to the pool - the log device dies - the pool is forcibly exported/server loses power Such that the DB considers the transaction complete and the data safely written to disk, but it's actually only written to the ZIL on the separate log device (which no longer exists) and is not stored in the pool yet. Yeah, that could be a problem. A very unlikely event, although not entirely impossible. =E2=80=8BI would think it would be up to the database to be able to roll-ba= ck a database to prior to the corrupted transaction. If the DB has a log or journal or whatever, then it could be used to roll-back, no? It's still considered best practice to use mirror log device. It's just no longer required, nor does a dead log lead to a completely dead pool.=E2=80= =8B --=20 Freddie Cash fjwcash@gmail.com