[CentOS] building a Xen guest image on straight LVM partitions?

Amos Shapira amos.shapira at gmail.com
Tue Dec 11 06:46:43 UTC 2007


On 11/12/2007, Ross S. W. Walker <rwalker at medallion.com> wrote:
> Johnny Tan wrote:
> >
> > Amos Shapira wrote:
> > > When I needed to build Xen guests under Debian I could
> > follow more or
> > > less the instructions in http://preview.tinyurl.com/2oc48r and the
> > > advantage of this approach is that it allows me to setup
> > the Xen guest
> > > directly on the LVM partition without making it consider the LVM
> > > partition as an entire disk with a partition table.
> >
> > I might be missing something, but that link seems to talk
> > about FAI and doesn't mention xen. I'm interested in seeing
> > how it can install on the LVM partition but the OS doesn't
> > see it as an entire disk with a partition table. What does
> > "fdisk -l" show, then?
>
> Here is a good link: http://wiki.rpath.com/wiki/Xen_DomU_Guide
>
> The Xen domU or HVM will treat the partition as a whole disk, so
> that means MBR and stuff, but you can mount it on dom0 as such:
>
> # fdisk -l -u /dev/es_storage/exch_data.1
>
> Disk /dev/es_storage/exch_data.1: 218.2 GB, 218233831424 bytes
> 255 heads, 63 sectors/track, 26532 cylinders, total 426237952 sectors
> Units = sectors of 1 * 512 = 512 bytes
>
>                        Device Boot      Start         End      Blocks   Id  System
> /dev/es_storage/exch_data.1p1             128   426220514   213110193+   7  HPFS/NTFS
>
> # mount -t ntfs -o loop,offset=128 /dev/es_storage/exch_data.1 /mnt
>
> That will create an auto-loop mount of the partition at sector
> offset 128.

Yes I'm familiar with that trick (including your correction below,
though I usually use explicit losetup) but it still:
1. Isn't as easy and safe as a direct "mount"
2. There is still some overhead of having LVM-over-LVM.

Thanks,

--Amos



More information about the CentOS mailing list