FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > CentOS > CentOS

 
 
LinkBack Thread Tools
 
Old 12-10-2007, 02:50 AM
"Amos Shapira"
 
Default building a Xen guest image on straight LVM partitions?

Hello,

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.

The advantages of this approach are:
1. I can add more LVM's later, or share LVM's at the host level among
multiple Xen guests.
2. I can easily grow/shrink the Xen guest's disks.
3. I can access the Xen guest's filesystem much more easily
5. Probably less overhead in having LVM->parition->LVM.

But I didn't find a way to achieve this with CentOS 5's automatic
tools. Is this supported by CentOS as a Xen host or do I have to find
my own way?

Thanks,

--Amos
_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
 
Old 12-10-2007, 01:12 PM
Tomasz 'Zen' Napierala
 
Default building a Xen guest image on straight LVM partitions?

Monday 10 December 2007 04:50:04 Amos Shapira napisaƂ(a):
> Hello,
>
> 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.
>
> The advantages of this approach are:
> 1. I can add more LVM's later, or share LVM's at the host level among
> multiple Xen guests.
> 2. I can easily grow/shrink the Xen guest's disks.
> 3. I can access the Xen guest's filesystem much more easily
> 5. Probably less overhead in having LVM->parition->LVM.
>
> But I didn't find a way to achieve this with CentOS 5's automatic
> tools. Is this supported by CentOS as a Xen host or do I have to find
> my own way?

As far as I know it's not supported with standard CentOS tools.

pz
--
Tomasz Napierala
System Administrator
QXL Poland - Allegro.pl Team
http://www.allegro.pl/
_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
 
Old 12-10-2007, 09:27 PM
Johnny Tan
 
Default building a Xen guest image on straight LVM partitions?

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?


johnn
_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
 
Old 12-10-2007, 09:47 PM
"Ross S. W. Walker"
 
Default building a Xen guest image on straight LVM partitions?

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.

-Ross

__________________________________________________ ____________________
This e-mail, and any attachments thereto, is intended only for use by
the addressee(s) named herein and may contain legally privileged
and/or confidential information. If you are not the intended recipient
of this e-mail, you are hereby notified that any dissemination,
distribution or copying of this e-mail, and any attachments thereto,
is strictly prohibited. If you have received this e-mail in error,
please immediately notify the sender and permanently delete the
original and any copy or printout thereof.

_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
 
Old 12-10-2007, 09:55 PM
"Ross S. W. Walker"
 
Default building a Xen guest image on straight LVM partitions?

Ross S. W. Walker 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.

Oops, offset is in bytes not sectors, so it would be offset 65536 in
my case (sector * 512).

-Ross

__________________________________________________ ____________________
This e-mail, and any attachments thereto, is intended only for use by
the addressee(s) named herein and may contain legally privileged
and/or confidential information. If you are not the intended recipient
of this e-mail, you are hereby notified that any dissemination,
distribution or copying of this e-mail, and any attachments thereto,
is strictly prohibited. If you have received this e-mail in error,
please immediately notify the sender and permanently delete the
original and any copy or printout thereof.

_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
 
Old 12-10-2007, 09:59 PM
Johnny Tan
 
Default building a Xen guest image on straight LVM partitions?

Ross S. W. Walker 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


Based on that link, this seems like a regular install of Xen
onto a LVM partition. I thought Amos was referring to some
special setup.


CentOS can definitely do this. Just setup LVM, and then
manually edit the /etc/xen/myvm file so that the disk line is:


disk = [ 'phy:/dev/myvg/mylv,xvda,w', ]


johnn
_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
 
Old 12-10-2007, 10:02 PM
"Ross S. W. Walker"
 
Default building a Xen guest image on straight LVM partitions?

Johnny Tan wrote:
>
> Ross S. W. Walker 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
>
> Based on that link, this seems like a regular install of Xen
> onto a LVM partition. I thought Amos was referring to some
> special setup.
>
> CentOS can definitely do this. Just setup LVM, and then
> manually edit the /etc/xen/myvm file so that the disk line is:
>
> disk = [ 'phy:/dev/myvg/mylv,xvda,w', ]

you can short hand it [ 'phy:myvg/mylv,xvda,w' ]

-Ross

__________________________________________________ ____________________
This e-mail, and any attachments thereto, is intended only for use by
the addressee(s) named herein and may contain legally privileged
and/or confidential information. If you are not the intended recipient
of this e-mail, you are hereby notified that any dissemination,
distribution or copying of this e-mail, and any attachments thereto,
is strictly prohibited. If you have received this e-mail in error,
please immediately notify the sender and permanently delete the
original and any copy or printout thereof.

_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
 
Old 12-11-2007, 05:44 AM
"Amos Shapira"
 
Default building a Xen guest image on straight LVM partitions?

On 11/12/2007, Johnny Tan <linuxweb@gmail.com> 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?

The anchor I pointed to is about instructions for creating an entire
CentOS file system hierarchy using Yum on Debian without having to go
through the CentOS boot process.
Nothing to do with FAI except that I found the instructions extremely
useful for my needs.

So what I used to do on Debian Dom0 in order to build a new CentOS 5 DomU was:
1. Create an LV for the filesystem, "mke2fs -j
/dev/xen/created-lv-name", "mount ..."
2. Go through those instructions to setup the filesystem hierarchy.
3. "umount /dev/xen/created-lv-name", create another LV for the swap
4. Manually configure the /etc/xen/*.cfg file to use the new LV's and
map them into disks in the guest machine:

disk = [ 'phy:/dev/xen/centos5.0-01-root,ioemu:sda1,w',
'phy:/dev/xen/centos5.0-01-swap,ioemu:sda2,w']
device_model='/usr/lib/xen-3.0.3-1/bin/qemu-dm'

5. boot the image as a Xen guest.

As for the fdisk output - it looks for partition tables on each of the
mapped LV's but doesn't find them:

# fdisk -l

Disk /dev/sda1: 17.1 GB, 17179869184 bytes
255 heads, 63 sectors/track, 2088 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Disk /dev/sda1 doesn't contain a valid partition table

Disk /dev/sda2: 1073 MB, 1073741824 bytes
255 heads, 63 sectors/track, 130 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Disk /dev/sda2 doesn't contain a valid partition table

I suspect that maybe I could follow the same procedure under CentOS
but under the current deadline pressure I'm looking for the fastest
route.

Cheers,

--Amos
_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
 
Old 12-11-2007, 05:46 AM
"Amos Shapira"
 
Default building a Xen guest image on straight LVM partitions?

On 11/12/2007, Ross S. W. Walker <rwalker@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
_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
 
Old 12-11-2007, 05:50 AM
"Amos Shapira"
 
Default building a Xen guest image on straight LVM partitions?

On 11/12/2007, Ross S. W. Walker <rwalker@medallion.com> wrote:
> Here is a good link: http://wiki.rpath.com/wiki/Xen_DomU_Guide

Ah and forgot to say "thank you" for the link. Looks useful.

Cheers,

--Amos
_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
 

Thread Tools




All times are GMT. The time now is 03:29 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright ©2007 - 2008, www.linux-archive.org