Received: from eggs.gnu.org ([208.118.235.92]:55903) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Uf9Ks-0000CR-04 for qemu-devel@nongnu.org; Wed, 22 May 2013 09:44:17 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Uf9Kk-0000LU-Ri for qemu-devel@nongnu.org; Wed, 22 May 2013 09:44:09 -0400 Received: from mx1.redhat.com ([209.132.183.28]:23523) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Uf9Kk-0000L8-Jz for qemu-devel@nongnu.org; Wed, 22 May 2013 09:44:02 -0400 Date: Wed, 22 May 2013 15:43:30 +0200 From: Stefan Hajnoczi Message-ID: <20130522134330.GB28600@stefanha-thinkpad.redhat.com> References: <519479B4.6080906@linux.vnet.ibm.com> <20130516074746.GF1597@stefanha-thinkpad.redhat.com> <519603C1.5060104@redhat.com> <5199CF7F.3060507@redhat.com> <20130521073159.GA30951@stefanha-thinkpad.muc.redhat.com> <519B309E.6020201@redhat.com> <20130521103413.GA19747@stefanha-thinkpad.muc.redhat.com> <519B4E31.6040503@redhat.com> <24E144B8C0207547AD09C467A8259F75585982FB@lisa.maurer-it.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <24E144B8C0207547AD09C467A8259F75585982FB@lisa.maurer-it.com> Subject: Re: [Qemu-devel] [PATCH v3 0/8] block: drive-backup live backup command List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Dietmar Maurer Cc: Kevin Wolf , Fam Zheng , Stefan Hajnoczi , qemu-devel , "imain@redhat.com" , Paolo Bonzini , Wenchao Xia On Tue, May 21, 2013 at 10:58:47AM +0000, Dietmar Maurer wrote: > > >> True, but that would happen only in case the host crashes. Even for > > >> a QEMU crash the changes would be safe, I think. They would be > > >> written back when the persistent dirty bitmap's mmap() area is > > >> unmapped, during process exit. > > > > > > I'd err on the side of caution, mark the persistent dirty bitmap while > > > QEMU is running. Discard the file if there was a power failure. > > > > Agreed. Though this is something that management must do manually, isn't it? > > QEMU cannot distinguish a SIGKILL from a power failure, while management > > can afford treating SIGKILL as a power failure. > > > > > It really depends what the dirty bitmap users are doing. It could be > > > okay to have a tiny chance of missing a modification but it might not. > > I just want to mention that there is another way to do incremental backups. Instead > of using a dirty bitmap, you can compare the content, usually using a digest (SHA1) on clusters. Reading gigabytes of data from disk is expensive though. I guess they keep a Merkle tree so it's easy to find out which parts of the image must be transferred without re-reading the entire image. That sounds like more work than a persistent dirty bitmap. The advantage is that while dirty bitmaps are consumed by a single user, the Merkle tree can be used to sync up any number of replicas. > That way you can also implement async replication to a remote site (like MS do). Sounds like rsync. Stefan