LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   Xen domU and Lvm (https://www.linuxquestions.org/questions/linux-general-1/xen-domu-and-lvm-497724/)

flamy 11-01-2006 08:37 PM

Xen domU and Lvm
 
This is a stupid one.

I've got Xen running on Debian testing, and I have created VG_Guests volume to hold all domUs partitions, but that's besides the point.

The problem is that when I created 4G lvm partition for a guest os, instead of formatting is as ext3 or similar, I left it as unpartitioned space, and later, when Installed a guest OS with default partitioning so now it looks something like:
----------------
|MBR|SWAP|EXT3 "/"|
-----------------
So single LVM partition contains two partiton and master boot record.

Now I need to mount ext3 part of it while I'm in dom0 ( when the os that occupies that partition is turned off) and I have no idea how to do it.

Something like

# mount -t ext3 /dev/That_lvm_volume /mnt/dest

doesn't work for obvious reasons.

Any ideas how can I mount that?

flamy 11-25-2006 10:27 AM

If anyone interested in the answer, this is possible if you use loopback device, more specifically losetup program. Read a manual, you'd have to mount existing partition onto loopback device with offset specified by -o. The following command will work in most cases:

losetup -o 32256 /dev/loop0 /path_to/image

rickh 11-25-2006 10:36 AM

I'm planning on setting up something similar soon.

Quote:

The problem is that when I created 4G lvm partition for a guest os, instead of formatting is as ext3 or similar, I left it as unpartitioned space...
Do you recommend formatting the Guest OS area as ext3 in advance? I expect one of my Guest OSes to eventually be Windows. Am I correct in assuming that I should leave at least that much disk space as "free space?" Any other tips you picked up in the process?

Xen looks to me like the wave of the future, but documentation is still a bit advanced for my skills.

flamy 11-25-2006 11:16 AM

I wrote that post a while ago, so there a couple of things I've learnt since then. Do not partition the space you want to install a fully virtualized guest os in it, since the guest os will not see the partition anyway, it will just see a physical disk, of undetermined format, so don't bother.

My original question was concerning the problem, of mounting guest os partition into host os, something that is less relevant when you have windows install. If you would want to do that anyway, your partition would look like I drawn above, and in order to mount the main partition you'd have to skip the boot sector, which is easily done using loopback device.

But if you want to learn about xen itself, I suggest you to read the following tutorials:
http://www.howtoforge.com/perfect_xe..._debian_ubuntu
www.xensource.com/files/xen_install_windows.pdf


And something explaining how xen works (in particular paravirtualization engine):
http://www.cl.cam.ac.uk/research/srg...03-xensosp.pdf


All times are GMT -5. The time now is 10:01 AM.