Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 10 Dec 2014 14:43:51 -0800
From:      John-Mark Gurney <jmg@funkthat.com>
To:        Pete Wright <pete@nomadlogic.org>
Cc:        freebsd-virtualization@freebsd.org
Subject:   Re: backups of bhyve images
Message-ID:  <20141210224351.GY25139@funkthat.com>
In-Reply-To: <5488A1AE.4090604@nomadlogic.org>
References:  <20141208163358.GA52969@potato.growveg.org> <33053EB5-91C5-4036-8CC2-34103E33A0FA@mu.org> <CAG=rPVcZc_xs44mXsE%2BPrBsu9CC863HerkvqDQPTxNUEO-V4gQ@mail.gmail.com> <548637D8.1060608@nomadlogic.org> <20141210192922.GU25139@funkthat.com> <5488A1AE.4090604@nomadlogic.org>

next in thread | previous in thread | raw e-mail | index | archive | help
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."



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20141210224351.GY25139>