From owner-freebsd-fs@FreeBSD.ORG Fri Jul 5 02:36:46 2013 Return-Path: Delivered-To: freebsd-fs@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id B15B3766 for ; Fri, 5 Jul 2013 02:36:46 +0000 (UTC) (envelope-from will@firepipe.net) Received: from mail-ve0-f174.google.com (mail-ve0-f174.google.com [209.85.128.174]) by mx1.freebsd.org (Postfix) with ESMTP id 756481AB2 for ; Fri, 5 Jul 2013 02:36:46 +0000 (UTC) Received: by mail-ve0-f174.google.com with SMTP id oz10so1446708veb.33 for ; Thu, 04 Jul 2013 19:36:45 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:x-gm-message-state; bh=E32CYtBMnN2Ntm0MmJez+xXgfBwhNxJ9dn4IGw4g1L4=; b=EWIof/OKRCKmANo5kd4u5oDac9baiJuVjm4uHOVNSwKdZKBb97UEc/vMovYUEJj09b 6uA6eQZED/VIFOk+UBijHE6zehKHZ0CNi4GXuNScdNQIzkMfJ5RhsSg5nRZAcD531hYv KJeSUMMg/zzMoau/YzIY6twwyxSl16W7a68vI209rnzTHZ9/CSrtK/fEbA6ObbgzyT4v XyVmv7BFRkjiAA5/WFmNqDNfQBBQOVEb17Bv6OqONmaJA/ATMTBiq1FbYnZ2DBsYrBR6 WWUN9BDrMNVKTltVkRjqFO9+H5j1baTbUQgHfoTSEAwUzm0M68NZc7pHYqf9wV6y7dLK 5BUw== MIME-Version: 1.0 X-Received: by 10.52.65.10 with SMTP id t10mr4222185vds.90.1372991805534; Thu, 04 Jul 2013 19:36:45 -0700 (PDT) Received: by 10.58.226.66 with HTTP; Thu, 4 Jul 2013 19:36:45 -0700 (PDT) In-Reply-To: References: <87li5o5tz2.wl%berend@pobox.com> Date: Thu, 4 Jul 2013 20:36:45 -0600 Message-ID: Subject: Re: EBS snapshot backups from a FreeBSD zfs file system: zpool freeze? From: Will Andrews To: Steven Hartland Content-Type: text/plain; charset=UTF-8 X-Gm-Message-State: ALoCoQmxboSrslQ2ytwh81Pj/JW4Nj4yGZcN6Yqz+Mh7ANxds4GYa6Hjf+4gUb26p7VgeQ/xlYJq Cc: "freebsd-fs@freebsd.org" X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Jul 2013 02:36:46 -0000 On Wed, Jul 3, 2013 at 6:13 PM, Steven Hartland wrote: > Not been following the thread really so excuse if this has already > been mentioned ;-) > > There is a zpool freeze which stops spa_sync() from doing > anything, so that the only way to record changes is on the ZIL. > > The comment in the zpool_main is: "'freeze' is a vile debugging > abomination" so it's evil but might be what you want if you're up to > writing some code. zpool freeze is a debugging-only command, as the comment suggests. It is not really of much use outside of testing changes to ZIL code. Once run, the only thing you can do to get normal I/O running again is to export the pool and import it again. The point of the command is to ensure that ZIL blocks exist on a pool when it is exported, so they are guaranteed to have to be replayed on import. It is used in the STF test suite for the express purpose of testing the ZIL replay. They write some stuff, freeze the pool, write some more stuff, export the pool, use zdb to check for ZIL blocks, then import it and check again, both to see that the changes were applied, and to see that the ZIL blocks are gone. Most likely, doing something more like Berend wants requires a slightly different approach. --Will.