Re: [CentOS] how to access lvm inside lvm

2011-04-30 Thread Peter Peltonen
On Sat, Apr 30, 2011 at 1:27 AM, John R Pierce pie...@hogranch.com wrote:
 On 04/29/11 3:05 PM, Peter Peltonen wrote:
 I have a centos 5.6 server that has xen domUs installed on their on
 logical volumes. These logical volumes contain their own volume groups
 and again their own logical volumes. I want to
 ...


 ugh, and double ugh.   this violates the KISS 'keep it super simple'
 principle, and I can only see the extra layers of complexity leading to
 more frustration.

 I would instead run LVM only on dom0, and have your domU's creating file
 systems directly on the virtual devices mapped to said LVs.   if you
 need to grow a file system, you resize the LV from dom0, and then growfs
 in the domU

I agree and the newer domUs I have created do not use LVM. This was
one of the first domUs I created with virt-manager and when installing
the OS I just clicked my way through the CentOS installation like I
usually do, and that meant using LVM. And I don't think you are even
given an option to define the default vg name during the installation?

Regards,
Peter
___
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos


Re: [CentOS] how to access lvm inside lvm

2011-04-30 Thread Phil Schaffner
Peter Peltonen wrote on 04/30/2011 03:51 AM:
 ... I just clicked my way through the CentOS installation like I
 usually do, and that meant using LVM. And I don't think you are even
 given an option to define the default vg name during the installation?

If you want to use the default setup but have an opportunity to tweak, 
such as changing VG names, check the box to review and modify the 
partition setup on the page that lets you choose the partition method.

Phil
___
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos


Re: [CentOS] how to access lvm inside lvm

2011-04-30 Thread Kai Schaetzl
Peter Peltonen wrote on Sat, 30 Apr 2011 10:51:08 +0300:

 And I don't think you are even
 given an option to define the default vg name during the installation?

Of course, you can ;-)
If you have only a few of these I'd rsync them over to dom0 lv's and 
change domU fstabs and xen config accordingly.

Kai


___
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos


Re: [CentOS] how to access lvm inside lvm

2011-04-29 Thread Ross Walker
On Apr 29, 2011, at 6:05 PM, Peter Peltonen peter.pelto...@gmail.com wrote:

 I have a centos 5.6 server that has xen domUs installed on their on
 logical volumes. These logical volumes contain their own volume groups
 and again their own logical volumes. I want to access the domU logical
 volumes and tried this:
 
 [root@kr ~]# fdisk -l /dev/VolGroup00/LogVol02
 
 Disk /dev/VolGroup00/LogVol02: 274.8 GB, 274877906944 bytes
 255 heads, 63 sectors/track, 33418 cylinders
 Units = cylinders of 16065 * 512 = 8225280 bytes
 
Device Boot  Start End  Blocks   Id  System
 /dev/VolGroup00/LogVol02p1   *   1  13  104391   83  Linux
 /dev/VolGroup00/LogVol02p2  14   16709   134110620
 8e  Linux LVM
 
 [root@kr ~]# kpartx -a /dev/VolGroup00/LogVol02
 [root@kr ~]# ls -l /dev/mapper/
 total 0
 crw--- 1 root root  10, 62 Apr 26 02:19 control
 brw-rw 1 root disk 253, 12 Apr 30 00:45 LogVol02p1
 brw-rw 1 root disk 253, 13 Apr 30 00:45 LogVol02p2
 
 But when I try make the domU volumegroup accessible I run into problems:
 
 [root@kr ~]# vgscan
  Reading all physical volumes.  This may take a while...
  WARNING: Duplicate VG name VolGroup00: Existing
 hxNFYw-c1Z6-DB99-SiiK-yRas-eXiI-1w27Z0 (created here) takes precedence
 over KmwQTQ-jT19-lvvu-H6d0-i4T3-s5Jw-JHnx0M
  WARNING: Duplicate VG name VolGroup00: Existing
 hxNFYw-c1Z6-DB99-SiiK-yRas-eXiI-1w27Z0 (created here) takes precedence
 over KmwQTQ-jT19-lvvu-H6d0-i4T3-s5Jw-JHnx0M
  Found volume group VolGroup00 using metadata type lvm2
  Found volume group VolGroup00 using metadata type lvm2
 
 How can I now vgchange to the domU volume group as vgchange does not
 take the UUID as an argument, just the volume group name...?

That's why I use hostnames instead of generic volume group names.

You could vgrename the volume, but the domU won't boot afterwards unless you 
rename it back and I don't know if it will let you if the vg name already 
exists.

LVM should really use the UUID if the vg name collides or allow it to be 
imported under a different name temporarily.

You could rename your system vg and of course change fstab to match and remake 
the initrd, then you would be able to load one domU vg at a time.

-Ross

___
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos


Re: [CentOS] how to access lvm inside lvm

2011-04-29 Thread John R Pierce
On 04/29/11 3:05 PM, Peter Peltonen wrote:
 I have a centos 5.6 server that has xen domUs installed on their on
 logical volumes. These logical volumes contain their own volume groups
 and again their own logical volumes. I want to
 ...


ugh, and double ugh.   this violates the KISS 'keep it super simple' 
principle, and I can only see the extra layers of complexity leading to 
more frustration.

I would instead run LVM only on dom0, and have your domU's creating file 
systems directly on the virtual devices mapped to said LVs.   if you 
need to grow a file system, you resize the LV from dom0, and then growfs 
in the domU


___
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos