|
|
|
|
|
|
|
|
|
|
xen-users
Re: [Xen-users] Using lvm for domUs
I'm not sure to understand where's your snapshot are...
but there's how to mount an "internal" partition available in your LV.. if you shutdown your DomU then mount the partition you'll be able to access your data in your Dom0..
- hda (physical disk) hda1 ( / Dom0 ) hda2 ( swap Dom0 ) hda3 (partition system id=8e LVM)
VG1 LV1 DomU (hda virtuel XEN) hda1 ext3 /
hda2 swap
There's a partition table in : /dev/vg1/lv1
Whith this command you can see the partition contained in your LV
----------------------------------------------------------------------------- fdisk -l -u /dev/vg1/lv1
"Don't forget the "-u" it's important this will show you the size in sector"
Disk /dev/vg1/lv1: 4294 MB, 4294967296 bytes 255 heads, 63 sectors/track, 522 cylinders, total 8388608 sectors Units = sectors of 1 * 512 = 512 bytes
Device Boot Start End Blocks Id System
/dev/vg1/lv1p1 63 899639 449788+ 82 Linux swap / Solaris /dev/vg1/lv1p2 * 899640 8385929 3743145 83 Linux -----------------------------------------------------------------------------
Now if you want to mount the second partition in your LV type:
mount -o loop,offset=460615680 /dev/vg1/lv1p2 /mnt
460615680 is equal to 899640 * 512 (512 are the size of each sector and
899640 the starting point of the partition. (You can get these numbers with the fdisk command..)
Thanks to Jean-Francois Saucier ;) for the recipe! And I hope this can help you..
@+
On 5/8/07, Nico Kadel-Garcia <nkadel@xxxxxxxxx> wrote:
Rene Purcell wrote: > did you create partition in your LV ? I mean you added something like > "phy:/dev/main/xen_DomU_logs,hda,w" when you've installed your > distribution did you create a partition hda1 in the installation
> process or did you just copy some data into hda ? > > what's the distro you've installed ? I'm working with RedHat and CentOS. The installer itself insists on having a local disk device to load up and install a boot loader, and I
haven't worked out the details of a pitiful excuse for documentation of the Xen config files to figure out how to gracefully over-ride the use of pygrub. The result is that I have a disk image, not a partition image
or set of partition images, where an LVM partition claled /dev/XEN/xenguest1 will be seen by the guest domain as /dev/xvda, and have internal partitions of /dev/xdva1 /dev/xvda[whatever].
I *want* to be able to snapshot the LVM partitions mount the snapshots,
and run backup operations against those on Dom0 instead of paying the overhead of running them from DomU.
-- René Jr Purcell Chargé de projet, sécurité et sytèmes
Techno Centre Logiciels Libres, http://www.tc2l.ca/ Téléphone : (418) 681-2929 #124
_______________________________________________
Xen-users mailing list
Xen-users@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-users
|
|
|
|
|