LinuxQuestions.org
Visit the LQ Articles and Editorials section
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices

Reply
 
LinkBack Search this Thread
Old 11-01-2006, 08:37 PM   #1
flamy
LQ Newbie
 
Registered: Apr 2005
Location: Toronto, Canada
Distribution: Debian sid/etch
Posts: 7

Rep: Reputation: 0
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?
 
Old 11-25-2006, 10:27 AM   #2
flamy
LQ Newbie
 
Registered: Apr 2005
Location: Toronto, Canada
Distribution: Debian sid/etch
Posts: 7

Original Poster
Rep: Reputation: 0
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
 
Old 11-25-2006, 10:36 AM   #3
rickh
Senior Member
 
Registered: May 2004
Location: Albuquerque, NM USA
Distribution: Debian-Lenny/Sid 32/64 Desktop: Generic AMD64-EVGA 680i Laptop: Generic Intel SIS-AC97
Posts: 4,250

Rep: Reputation: 59
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.

Last edited by rickh; 11-25-2006 at 10:39 AM.
 
Old 11-25-2006, 11:16 AM   #4
flamy
LQ Newbie
 
Registered: Apr 2005
Location: Toronto, Canada
Distribution: Debian sid/etch
Posts: 7

Original Poster
Rep: Reputation: 0
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
 
  


Reply

Tags
lvm, lvm2, mbr, xen


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Possible to change non-LVM to LVM? darthfoolish Linux - Software 2 08-01-2008 03:47 AM
LXer: Managing Xen With Xen-Tools, Xen-Shell, And Argo LXer Syndicated Linux News 0 10-21-2006 11:33 PM
SuSE 10.1 / Xen / no network connection in DOMU zeichensatz Suse/Novell 0 07-26-2006 09:27 AM
How to run RHEL 4 as guest in Xen(SLES 10 XEN) darshanbv Linux - Software 1 06-26-2006 11:21 AM
XEN-SUSE 10.1-- DHCP Server works under plain but not under XEN Dimitriy Linux - Networking 4 06-08-2006 05:53 PM


All times are GMT -5. The time now is 03:59 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration