Vasko Cacanoski
2007-Aug-22 11:53 UTC
[Xen-users] adding logical volumes to be used by domU
Hi xen-community, My domU is installed on logical volume on dom0. I followed the instructuions from: http://www.redhat.com/archives/fedora-xen/2006-November/msg00257.html In the configuration file in /etc/xen I have the following: disk = [ ''phy:/dev/volgr_temp/data_temp,xvda,w'',''phy:/dev/volgr_temp/swap_temp,xv db,w''] The second LV is swap partition that is used by domU, and the OS is installed as single partition of the other LV. This configuration is working fine. I am testing scenario when more disk space will be needed by domU. My idea was to create third LV and to add it as third disk to the domU. That''s why I use: disk = [ ''phy:/dev/volgr_temp/data_temp,xvda,w'',''phy:/dev/volgr_temp/swap_temp,xv db,w'', ''phy:/dev/volgr_temp/data_temp_part2,xvdc,w''] The domU won''t start reporting: Error: destroyDevice() takes exactly 3 arguments (2 given) In the xen log files I can not find anything useful. Additional question, why, when logged on domU, with "fdisk /dev/xvda" I see no partitions at all? Regards, Vasko Cacanoski _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Emre Erenoglu
2007-Aug-23 10:02 UTC
Re: [Xen-users] adding logical volumes to be used by domU
Hi Vasko, no I accidentally sent it only to you as gmail sends to the user only when you click reply. Anyway, I''m adding back the user-list. Anyway, it''s true that you''ll destroy partitions if you create a guest OS. However, you can: 1) copy this logical volume to a file (let''s say file1), using dd 2) create partitions in this volume by fdisk or other tool 3) Resize the filesystem (make it smaller) inside your file1 so that it''s exactly the same lenght as the partition that you''ve created, and copy it back to the partition inside the image. This seemed a bit complex to me, so another way can be: 4) Do as as step 1 and 2 5) format the partition in the volume, then mount it. (see http://tuxinarow.com/2006/12/27/loopback_mountin_a_specific_partition_inside_a_disk_image but i''m not sure if you can mount a partition inside a volume with this method) 6) loopback mount your file1 and copy the contents from file1 to the partition of the volume with cp -r One question, why do you want to have a partitions inside your volume? Just create other volumes and export them also to the DomU as other partitions. Br, Emre On 8/23/07, Vasko Cacanoski <Vasko.Cacanoski@t-mobile.com.mk> wrote:> > Hi Emre, > > Thanks for replying. > > If I try to create partitions in /dev/xvda, I will destroy the guest OS > installed there! There is one partition on xvda where the OS is installed. > That''s why I am wondering why it doesn''t appear with fdisk. > > Did you delibertly answer my question only to me, not to the mailing list? > I am asking because I am new to this group and I wanted to send a reply to a > post, but I didn''t know how. > > Thanks again. > > Regards, > > Vasko > > > ------------------------------ > > *From:* Emre Erenoglu [mailto:erenoglu@gmail.com] > *Sent:* Wednesday, August 22, 2007 4:28 PM > *To:* Vasko Cacanoski > *Subject:* Re: [Xen-users] adding logical volumes to be used by domU > > > > Hi Vasko, > > I can''t answer your first question, but for this one: > > Additional question, why, when logged on domU, with "fdisk /dev/xvda" I > see no partitions at all? > > In my setup, I have the disk directive as > > disk = [ ''phy:/dev/mapper/os-pardus,hda1,w'' , ''phy:/dev/md1,hda2,w'' ] > > This /dev/mapper/os-pardus is a Logical volume with an "image" of a > partition inside, therefore it''s perfectly normal to export it as /dev/hda1 > > > In your setup, you may try to create "partitions" inside this volume and > try to see them with fdisk afterwards. I don''t know if this is possible > either with Xen and LVM. > > Best regards, > > Emre > > > > > On 8/22/07, *Vasko Cacanoski* <Vasko.Cacanoski@t-mobile.com.mk > wrote: > > Hi xen-community, > > My domU is installed on logical volume on dom0. I followed the > instructuions from: > > http://www.redhat.com/archives/fedora-xen/2006-November/msg00257.html > > In the configuration file in /etc/xen I have the following: > > disk = [ > ''phy:/dev/volgr_temp/data_temp,xvda,w'',''phy:/dev/volgr_temp/swap_temp,xvdb,w''] > > > The second LV is swap partition that is used by domU, and the OS is > installed as single partition of the other LV. This configuration is working > fine. > > I am testing scenario when more disk space will be needed by domU. My idea > was to create third LV and to add it as third disk to the domU. That''s why I > use: > > disk = [ > ''phy:/dev/volgr_temp/data_temp,xvda,w'',''phy:/dev/volgr_temp/swap_temp,xvdb,w'', > ''phy:/dev/volgr_temp/data_temp_part2,xvdc,w''] > > The domU won''t start reporting: > > Error: destroyDevice() takes exactly 3 arguments (2 given) > > In the xen log files I can not find anything useful. > > Additional question, why, when logged on domU, with "fdisk /dev/xvda" I > see no partitions at all? > > Regards, > > Vasko Cacanoski > > >_______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Vasko Cacanoski
2007-Aug-23 12:25 UTC
RE: [Xen-users] adding logical volumes to be used by domU
Hi again,> One question, why do you want to have a partitions inside your volume?Just create other volumes and export them also to the DomU as other partitions. I will explain again my initial problem. I am testing a scenario somehow to extend the disk space for domU if it runs out of disk space. As I wrote, my fist plan was to add third LV, which should have been mounted as xvdc, but the domU didn''t start then. As (not so good) alternative, I tried to extend the LV with domU OS on it, and then within domU to resize the partition or to create a new one from the extra space. But there I noticed that fdisk doesn''t recognize the initial partition. There must be some way how to pass three disks to domU! Cheers, Vasko _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Emre Erenoglu
2007-Aug-23 12:32 UTC
Re: [Xen-users] adding logical volumes to be used by domU
First of all, I didn''t understand why it''s not possible to pass three disks, I''ll check this on my home setup tonight. For LVM, in Dom0, you can extend the LVM volume first, then extend the ext3 filesystem inside, you don''t need to do anything in DomU. Check this site out: http://www.netadmintools.com/art366.html Br, Emre On 8/23/07, Vasko Cacanoski <Vasko.Cacanoski@t-mobile.com.mk> wrote:> > Hi again, > > > > > One question, why do you want to have a partitions inside your volume? > Just create other volumes and export them also to the DomU as other > partitions. > > > > I will explain again my initial problem. I am testing a scenario somehow > to extend the disk space for domU if it runs out of disk space. As I wrote, > my fist plan was to add third LV, which should have been mounted as xvdc, > but the domU didn''t start then. > > > > As (not so good) alternative, I tried to extend the LV with domU OS on it, > and then within domU to resize the partition or to create a new one from the > extra space. But there I noticed that fdisk doesn''t recognize the initial > partition. > > > > There must be some way how to pass three disks to domU! > > > > Cheers, > > Vasko >-- Emre Erenoglu erenoglu@gmail.com _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Vasko Cacanoski
2007-Aug-27 06:44 UTC
RE: [Xen-users] adding logical volumes to be used by domU
Hi all, As info to anyone that might have the same problem, I have found out the solution. The added partition/LV has to be with created file system. I expected that the file system will be made inside domU, but I was wrong. It would have been much easier if the error message "Error: destroyDevice() takes exactly 3 arguments (2 given)" was more usefull. Thanks for the help. Regards, Vasko _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users