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...?
Regards, Peter
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
On Sat, Apr 30, 2011 at 1:27 AM, John R Pierce pierce@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
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
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