From owner-freebsd-virtualization@FreeBSD.ORG Wed Dec 10 22:43:53 2014 Return-Path: Delivered-To: freebsd-virtualization@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A0144BE4 for ; Wed, 10 Dec 2014 22:43:53 +0000 (UTC) Received: from h2.funkthat.com (gate2.funkthat.com [208.87.223.18]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "funkthat.com", Issuer "funkthat.com" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 5EFC2F33 for ; Wed, 10 Dec 2014 22:43:52 +0000 (UTC) Received: from h2.funkthat.com (localhost [127.0.0.1]) by h2.funkthat.com (8.14.3/8.14.3) with ESMTP id sBAMhpVQ020310 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Wed, 10 Dec 2014 14:43:52 -0800 (PST) (envelope-from jmg@h2.funkthat.com) Received: (from jmg@localhost) by h2.funkthat.com (8.14.3/8.14.3/Submit) id sBAMhpCT020309; Wed, 10 Dec 2014 14:43:51 -0800 (PST) (envelope-from jmg) Date: Wed, 10 Dec 2014 14:43:51 -0800 From: John-Mark Gurney To: Pete Wright Subject: Re: backups of bhyve images Message-ID: <20141210224351.GY25139@funkthat.com> References: <20141208163358.GA52969@potato.growveg.org> <33053EB5-91C5-4036-8CC2-34103E33A0FA@mu.org> <548637D8.1060608@nomadlogic.org> <20141210192922.GU25139@funkthat.com> <5488A1AE.4090604@nomadlogic.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <5488A1AE.4090604@nomadlogic.org> User-Agent: Mutt/1.4.2.3i X-Operating-System: FreeBSD 7.2-RELEASE i386 X-PGP-Fingerprint: 54BA 873B 6515 3F10 9E88 9322 9CB1 8F74 6D3F A396 X-Files: The truth is out there X-URL: http://resnet.uoregon.edu/~gurney_j/ X-Resume: http://resnet.uoregon.edu/~gurney_j/resume.html X-TipJar: bitcoin:13Qmb6AeTgQecazTWph4XasEsP7nGRbAPE X-to-the-FBI-CIA-and-NSA: HI! HOW YA DOIN? can i haz chizburger? X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.2.2 (h2.funkthat.com [127.0.0.1]); Wed, 10 Dec 2014 14:43:52 -0800 (PST) Cc: freebsd-virtualization@freebsd.org X-BeenThere: freebsd-virtualization@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "Discussion of various virtualization techniques FreeBSD supports." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 10 Dec 2014 22:43:53 -0000 Pete Wright wrote this message on Wed, Dec 10, 2014 at 11:40 -0800: > On 12/10/14 11:29, John-Mark Gurney wrote: > > Pete Wright wrote this message on Mon, Dec 08, 2014 at 15:44 -0800: > >> > >> > >> On 12/08/14 15:30, Craig Rodrigues wrote: > >>> (3) When you want to backup the VM, do a "zfs snapshot" take take a > >>> snapshot of the ZFS zvol. > >> > >> will this ensure that your zvol is consistent, or rather will the > >> filesystem overlaid on the zvol device be ensured it is consistent when > >> the hypervisor issues a snapshot command? > > > > That's the beauty of FreeBSD... UFS provides this w/ soft updates, and > > ZFS does this through COW... In both cases, as far as I understand it, > > it is safe to snapshot the FS... > > hrm not sure I think that is a reliable methodology. You'll be forced > to recover you VM's filesystem at best, and potentially have corrupt > data if blocks were still sitting in cache and had not returned a > filehande. My guess is that this method will work with out issues > %80-%90 of the time - but you still expose yourself to possible data > loss or corruption. If the application(s) do not properly handle data ordering issues itself (making sure previous writes are completed using fsync), then that application(s) will have issues if you suffer power loss at the wrong moment, and you'll still have issues... > I think you and others have mentioned the proper way to do this - > snapshot the guess filesystem from with-in the guest VM itself. Doing it in the VM is only marginally better... -- John-Mark Gurney Voice: +1 415 225 5579 "All that I will do, has been done, All that I have, has not."