WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-users

Re: [Xen-users] Re: 100% safe way to backup domU: (was Yet another backu

To: Ligesh <myself@xxxxxxxxxx>
Subject: Re: [Xen-users] Re: 100% safe way to backup domU: (was Yet another backup)
From: "Ulrich Windl" <ulrich.windl@xxxxxxxxxxxxxxxxxxxx>
Date: Thu, 11 Jan 2007 12:00:57 +0100
Cc: Roger Lucas <roger@xxxxxxxxxxxxx>, xen-users@xxxxxxxxxxxxxxxxxxx
Delivery-date: Thu, 11 Jan 2007 03:01:51 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <20070111104441.GA11648@xxxxxxxxxx>
List-help: <mailto:xen-users-request@lists.xensource.com?subject=help>
List-id: Xen user discussion <xen-users.lists.xensource.com>
List-post: <mailto:xen-users@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-users>, <mailto:xen-users-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-users>, <mailto:xen-users-request@lists.xensource.com?subject=unsubscribe>
Organization: Universitaet Regensburg, Klinikum
Priority: normal
References: <200610210406.25460.mark.williamson@xxxxxxxxxxxx>
Sender: xen-users-bounces@xxxxxxxxxxxxxxxxxxx
On 11 Jan 2007 at 16:14, Ligesh wrote:

[...]
> > You're both going to have to change the sync-ing stage to come before the 
> > pause - otherwise the domain won't be running and therefore won't be able 
> > to 
> > sync it's disks!
> > 
> 
>  In that case we need a command for xm called 'sync-and-pause'. I had

Be aware that XEN does the pause, but Linux does the sync. I also think that 
the 
sync is not synchronous, i.e. when returning from the syscall the OS may still 
be 
writing buffers, but I'm not too sure about that.

Anyway a sync does not guarantee that any application does sync it's data to 
kernel disk buffers, so that backup is never a 100% image.

> actually come up with the same plan, and it seems to be the only way to
> take safe backups. If there were a delay between the sync and pause, we

Backups are safe when you shutdown the VM and then safe the files from Dom0.

> are not really gaining true peace of mind. You need to sync the domain
> after it is paused or it should be done as an atomic action. As a

If XEN pauses the domain, you cannot do anything with it AFAIK.

> matter of fact, the steps the below actually constitutes a 100% safe
> way to backup the domain, and will make Xen better than openvz as far
> as hosting is concerned. One of the main concerns for a provider is
> daily backups, and with Xen the chance of corruption is very high,
> while with the openvz single kernel architecture, the issue is only
> application memory caches which can be recovered individually. But with
> the setup below, we finally have a breakthrough. (At least for me). 
> 
>  xm sync-and-pause domU
>  lvm snapshot domU
>  xm unpause domU

Don't you need a LVM-sync-and-snapshot instead? I think a device could find out 
atll the buffers that have data for it. So it could request writing all those 
buffers (while disallowing (or ignoring) new dirty buffers for that device).

Now what if you have multiple devices?

BEGIN(STOP block device writing globally)
for each LVM device:
        sync-and-snapshot
END(STOP block device writing globally)
for each LVM device:
        backup snapshot
        release snapshot

It's as ugly as anything else.

"For every problem there's a solution that's simple, neat, and wrong"
(In Kernighan & Plaugher about C programming I think)


_______________________________________________
Xen-users mailing list
Xen-users@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-users