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

[Xen-users] Re: How to Backup and Restore MBR within Logical Volumes?

To: "Community assistance, encouragement, and advice for using Fedora." <fedora-list@xxxxxxxxxx>, xen-users@xxxxxxxxxxxxxxxxxxx, Fedora Xen <fedora-xen@xxxxxxxxxx>
Subject: [Xen-users] Re: How to Backup and Restore MBR within Logical Volumes?
From: "Mr. Teo En Ming (Zhang Enming)" <space.time.universe@xxxxxxxxx>
Date: Thu, 12 Nov 2009 09:52:57 +0000
Cc:
Delivery-date: Thu, 12 Nov 2009 01:53:50 -0800
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:content-type; bh=Gtb4zqBUIJBKmfnnyReU3cmwWy+8ula8uQGryBWKRj0=; b=kOhePqJIYG8j9oXYvHb/vIn5CKigSBZsIiVRVYl6YnCXq/iRAVIVN4Zylwctj99Ry3 BYPKvm+dvB893Z32WFbn2hffL5dX8nl/4I5gdFWw6JfGLJcapmEA5uvCImbBA1DB7W+P BoMtlB2aRjYASRvrtHUarEnF6+BTHFSSJxvUc=
Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; b=UeVNMMkCSBZqK3fpNC7yWVLzbtVGc6EjpJZT7yfM9/rGwxNpMDNoUKJ9sRLDfYaecW 0fPfugxS0pDuMc5GPLsYJfJzL0Wy5KJpJMh18I2akredDgY2ShnxZsEc6ZTSXJN2rWkW HESNi7ysoUe5U3rQSC2EROhNjXzPe1qN9vThg=
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <4AFBD787.1090309@xxxxxxxxxxxxxxxx>
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>
References: <f712b9cf0911120123l685a1c53te4d0c7b7634b3e60@xxxxxxxxxxxxxx> <4AFBD787.1090309@xxxxxxxxxxxxxxxx>
Sender: xen-users-bounces@xxxxxxxxxxxxxxxxxxx
> Maybe I didn't really understand your setup, but... isn't your mbr simply on /dev/loop1?

Yes, you are right.

root@sysresccd /mnt/hitachi/test % fdisk -l /dev/loop1

Disk /dev/loop1: 53.7 GB, 53687091200 bytes
255 heads, 63 sectors/track, 6527 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x2b362b35

      Device Boot      Start         End      Blocks   Id  System
/dev/loop1p1   *           1        6526    52420063+   7  HPFS/NTFS

I am so used with device nomenclature of harddisks being /dev/hda, /dev/hdb, /dev/sda, /dev/md0, /dev/xvda, etc that it didn't occur to me that the device node of my virtual machine in a logical volume is very simply /dev/loop1 after I have performed the "losetup /dev/loop1 /dev/volumegroup/logicalvolume" step.

Thank you very much for enlightening me! Now I can proceed with writing the backup and restore script for my Fedora 11 Dom0 (all partitions using LVM2 logical volumes) and all of my Xen virtual machines (contained in logical volumes).

--
Mr. Teo En Ming (Zhang Enming) Dip(Mechatronics) BEng(Hons)(Mechanical Engineering)
Alma Maters:
(1) Singapore Polytechnic
(2) National University of Singapore
My Primary Blog: http://teo-en-ming-aka-zhang-enming.blogspot.com
My Secondary Blog: http://enmingteo.wordpress.com
My Youtube videos: http://www.youtube.com/user/enmingteo
Email: space.time.universe@xxxxxxxxx
Mobile Phone (Starhub Prepaid): +65-8369-2618
Street: Bedok Reservoir Road
Country: Singapore

On Thu, Nov 12, 2009 at 9:38 AM, Roberto Ragusa <mail@xxxxxxxxxxxxxxxx> wrote:
Mr. Teo En Ming (Zhang Enming) wrote:

> # kpartx -av /dev/loop1
[...]
> But the problem is that I can only backup/clone the filesystems of my
> virtual machine within a logical volume. I can't backup the Master Boot
> Record (MBR) of the virtual machine within a logical volume. For example,
>
> dd if=/dev/hda of=mbr.hda bs=512 count=1
>
> Because /dev/hda resides in a logical volume. The logical volume is a
> virtual harddisk for my virtual machine.

Maybe I didn't really understand your setup, but... isn't your mbr
simply on /dev/loop1?

--
  Roberto Ragusa    mail at robertoragusa.it

--
fedora-list mailing list
fedora-list@xxxxxxxxxx
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list
Guidelines: http://fedoraproject.org/wiki/Communicate/MailingListGuidelines




_______________________________________________
Xen-users mailing list
Xen-users@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-users
<Prev in Thread] Current Thread [Next in Thread>