All of lore.kernel.org
 help / color / mirror / Atom feed
* are btrfs snapshot helpful for backing up kvm qcow2 vm?
@ 2014-11-06 15:02 Francesco Morosinotto
  2014-11-06 19:57 ` Chris Murphy
  0 siblings, 1 reply; 2+ messages in thread
From: Francesco Morosinotto @ 2014-11-06 15:02 UTC (permalink / raw)
  To: linux-btrfs

Hi guys,

I need to improve the backup strategy of my vms; At the moment I backup the machines once a week by stopping them, making a snapshot, exporting the xml descriptor file and backing up these files.

I would prefer a daily online backup solution that allows me to take a snapshot with a minimum downtime.

That's why I was planning to switch from etx4 to btrfs;
my project will be to  pause the vm, dump the memory and the xml descriptor file, make a snapshot of the subvolume storing the qcow2 file and after that resuming the machine.

does this project makes any sense? What about performance? Am I going to experience bad performance having qcow2 over btrfs?
I read on some old (two years) posts that btrfs was having bad fragmentation when dealing with qcow2 files, is this still happening?

Thank you

Francesco



^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: are btrfs snapshot helpful for backing up kvm qcow2 vm?
  2014-11-06 15:02 are btrfs snapshot helpful for backing up kvm qcow2 vm? Francesco Morosinotto
@ 2014-11-06 19:57 ` Chris Murphy
  0 siblings, 0 replies; 2+ messages in thread
From: Chris Murphy @ 2014-11-06 19:57 UTC (permalink / raw)
  To: Btrfs BTRFS


On Nov 6, 2014, at 8:02 AM, Francesco Morosinotto <jlord87@gmail.com> wrote:

> Hi guys,
> 
> I need to improve the backup strategy of my vms; At the moment I backup the machines once a week by stopping them, making a snapshot, exporting the xml descriptor file and backing up these files.
> 
> I would prefer a daily online backup solution that allows me to take a snapshot with a minimum downtime.

If I understand it correctly you may be after libvirt's savevm monitor command. There's no possible way filesystem snapshots will include machine state; but then also qcow2 snapshots don't save machine state either, its for offline snapshots of the backing (virtual) block device.


> 
> That's why I was planning to switch from etx4 to btrfs;
> my project will be to  pause the vm, dump the memory and the xml descriptor file, make a snapshot of the subvolume storing the qcow2 file and after that resuming the machine.

Pretty sure online snapshots need to save the entire machine state which includes the local (virtual) block device on which all filesystems are located. It's not enough to just externally snapshot the underlying fs that contains the VM's fs.

> 
> does this project makes any sense? What about performance? Am I going to experience bad performance having qcow2 over btrfs?
> I read on some old (two years) posts that btrfs was having bad fragmentation when dealing with qcow2 files, is this still happening?

I've had good results with btrfs on qcow2 on btrfs, even without xattr +C, even with a lot of fragmentation. But that qcow2 only contained an OS, not any data, I wasn't even compiling kernels within it and such which might expose performance problems others have seen; there's some anecdotal evidence of Windows on NTFS on qcow2 on btrfs being pretty problematic performance and fragmentation wise.


Chris Murphy


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2014-11-06 19:57 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-11-06 15:02 are btrfs snapshot helpful for backing up kvm qcow2 vm? Francesco Morosinotto
2014-11-06 19:57 ` Chris Murphy

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.