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] How to Backup and Restore MBR within Logical Volumes?

To: xen-users@xxxxxxxxxxxxxxxxxxx
Subject: Re: [Xen-users] How to Backup and Restore MBR within Logical Volumes?
From: Geert Janssens <info@xxxxxxxxxxxx>
Date: Thu, 12 Nov 2009 10:36:32 +0100
Delivery-date: Thu, 12 Nov 2009 01:37:13 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <f712b9cf0911120123l685a1c53te4d0c7b7634b3e60@xxxxxxxxxxxxxx>
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/mailman/listinfo/xen-users>, <mailto:xen-users-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-users>, <mailto:xen-users-request@lists.xensource.com?subject=unsubscribe>
Organization: Kobalt W.I.T.
References: <f712b9cf0911120123l685a1c53te4d0c7b7634b3e60@xxxxxxxxxxxxxx>
Sender: xen-users-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: KMail/1.11.4 (Linux/2.6.29.6-desktop-2mnb; KDE/4.2.4; i686; ; )
On Thursday 12 November 2009, Mr. Teo En Ming (Zhang Enming) wrote:
> Hi All,
>
> I have several Xen virtual machines within logical volumes using LVM2. I
> did not use disk images for performance reasons.
>
> Conventionally, if I want to clone my virtual machines, I have to dd the LV
> to an image file. But this consumes a lot of time and harddisk space.
>
> So, instead of doing that, I want to use losetup and kpartx with my logical
> volumes, which contain operating systems of virtual machines.
>
> I can backup the filesystems of a virtual machine in this way:
>
> # losetup /dev/loop1 /dev/virtualmachines/windows7-x64
>
Are you sure you need to call losetup first ?

I remember I used kpartx directly on the lvm containing my vbd.

Also, I think you can treat the lvm based vbd as a real disk.

So
dd if=/dev/virtualmachines/windows7-x64 of=mbr.w7-x64 bs=512 count=1

should backup your mbr.

Anyone correct me if I'm wrong please.

Geert

-- 
Kobalt W.I.T.
Web & Information Technology
Brusselsesteenweg 152
1850 Grimbergen

Tel  : +32 479 339 655
Email: info@xxxxxxxxxxxx


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