Re: How to Backup and Restore MBR within Logical Volumes?

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

 



> 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




-- 
fedora-list mailing list
fedora-list@xxxxxxxxxx
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list
Guidelines: http://fedoraproject.org/wiki/Communicate/MailingListGuidelines
[Index of Archives]     [Older Fedora Users]     [Fedora Announce]     [Fedora Package Announce]     [EPEL Announce]     [Fedora Magazine]     [Fedora News]     [Fedora Summer Coding]     [Fedora Laptop]     [Fedora Cloud]     [Fedora Advisory Board]     [Fedora Education]     [Fedora Security]     [Fedora Scitech]     [Fedora Robotics]     [Fedora Maintainers]     [Fedora Infrastructure]     [Fedora Websites]     [Anaconda Devel]     [Fedora Devel Java]     [Fedora Legacy]     [Fedora Desktop]     [Fedora Fonts]     [ATA RAID]     [Fedora Marketing]     [Fedora Management Tools]     [Fedora Mentors]     [SSH]     [Fedora Package Review]     [Fedora R Devel]     [Fedora PHP Devel]     [Kickstart]     [Fedora Music]     [Fedora Packaging]     [Centos]     [Fedora SELinux]     [Fedora Legal]     [Fedora Kernel]     [Fedora OCaml]     [Coolkey]     [Virtualization Tools]     [ET Management Tools]     [Yum Users]     [Tux]     [Yosemite News]     [Gnome Users]     [KDE Users]     [Fedora Art]     [Fedora Docs]     [Asterisk PBX]     [Fedora Sparc]     [Fedora Universal Network Connector]     [Libvirt Users]     [Fedora ARM]

  Powered by Linux