[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[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>
  • 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
  • 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=
  • List-id: Xen user discussion <xen-users.lists.xensource.com>

> 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

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.