Denis Forveille
2006-Apr-24 00:18 UTC
[Fedora-xen] How to expand the file created by xenguest-install?
Does anyone has e detailed procedure to change the size (ie increase) of the file that is used as the "xvda" disk by a domU? This is the file created by the "xenguest-install" script (or the one created as in section 6.2 of the xen user''s manual for the file-backed VBDs scenario). Thanks in advance
Ben
2006-Apr-24 00:19 UTC
Re: [Fedora-xen] How to expand the file created by xenguest-install?
Yeah, you use LVM and grow you logical volume size, then expand it in the guest domain. I''m not sure, but I suspect you''d have to restart your guest before you can expand it. On Apr 23, 2006, at 5:18 PM, Denis Forveille wrote:> Does anyone has e detailed procedure to change the size (ie > increase) of the file that is used as the "xvda" disk by a domU? > This is the file created by the "xenguest-install" script (or the > one created as in section 6.2 of the xen user''s manual for the file- > backed VBDs scenario). > > Thanks in advance > > -- > Fedora-xen mailing list > Fedora-xen@redhat.com > https://www.redhat.com/mailman/listinfo/fedora-xen
Chris Hirsch
2006-Apr-24 18:07 UTC
Re: [Fedora-xen] How to expand the file created by xenguest-install?
Ben wrote:> Yeah, you use LVM and grow you logical volume size, then expand it > in the guest domain. I''m not sure, but I suspect you''d have to > restart your guest before you can expand it.But isn''t the xvda just a file containing partitions and the like? I''ve actually been wanting to do this myself WITH LVM. I''d LOVE to have lvm extend the file itself. I did find the trick extending an image: dd if=/dev/zero bs=1024 count=3500000 >> fedora.fc5.img resize2fs -f fedora.fc5.img and thats works great...The way I understand the xvda file is that you''d have to copy out anything that is after the main image resize the image (like above) and then append the old stuff back to the end of the disk. I''d assume "stuff" here to mean something like swap. Chris
Ben
2006-Apr-24 18:13 UTC
Re: [Fedora-xen] How to expand the file created by xenguest-install?
Sorry, I should have been more clear. When you create the domU, you need to give it an LVM logical volume. As far as the domU is concerned, it''s just a disk. But from the dom0 side, it''s an easily expandible partition. After you grow it, use tools on the domU side to expand the filesystem. There''s really no point in trying to expand a swap partition because you can just make another one. On Mon, 24 Apr 2006, Chris Hirsch wrote:> Ben wrote: >> Yeah, you use LVM and grow you logical volume size, then expand it >> in the guest domain. I''m not sure, but I suspect you''d have to >> restart your guest before you can expand it. > But isn''t the xvda just a file containing partitions and the like? > I''ve actually been wanting to do this myself WITH LVM. I''d LOVE to > have lvm extend the file itself. > > I did find the trick extending an image: > dd if=/dev/zero bs=1024 count=3500000 >> fedora.fc5.img > resize2fs -f fedora.fc5.img > > and thats works great...The way I understand the xvda file is that > you''d have to copy out anything that is after the main image resize > the image (like above) and then append the old stuff back to the end > of the disk. I''d assume "stuff" here to mean something like swap. > > Chris > >
Denis Forveille
2006-Apr-25 00:29 UTC
Re: [Fedora-xen] How to expand the file created by xenguest-install?
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type"> </head> <body bgcolor="#ffffff" text="#000000"> <font size="-1"><font face="Verdana">Thanks for your answers, but I still don''t know how to do it.<br> <br> Ben, yes I used an lvg with xenguest-install. Then, with anaconda, I created a single partition in it to mount "/" (size=full disk=size of lvg). domU sees one disk (/dev/xvda) with one partition (/dev/xvda1) and yes, after that, I </font></font><font size="-1"><font face="Verdana">successfully expanded the size of the lvg from dom0. <br> </font></font><font size="-1"><font face="Verdana"><br> After that I''m stucked:</font></font><font size="-1"><font face="Verdana"><br> - I cant expand the filesystem for "/" from domU: "fdisk" gives the correct (new) size for "/dev/xvda", but I can''t use parted or rezise2fs on "/dev/xvda1" as it is mounted...<br> - I could create another lvg, clone its content ("dd if=lvg of=clonevg"), then start my domU from the clonevg and pass the original one to the domU in the config file, then use "parted" on "resize2fs" from domU on teh unmounted partition, then stop domU and start it again with the original expanded lvg with teh expanded filesystem on it . But it''s a real pain.. <br> </font></font><font size="-1"><font face="Verdana">- Maybe, from dom0, a combination of "lomount" and "parted" or "resize2fs" or other tools could do the job but I don''t know how to do it.<br> <br> Thanks for your help.<br> </font></font><br> <font size="-1"><font face="Verdana">(I realize after re-reading that maybe this is not a xen specific question..)<br> <br> <br> </font></font><br> Ben wrote: <blockquote cite="midPine.LNX.4.64.0604241109560.15001@localhost.localdomain" type="cite">Sorry, I should have been more clear. When you create the domU, you need to give it an LVM logical volume. As far as the domU is concerned, it''s just a disk. But from the dom0 side, it''s an easily expandible partition. After you grow it, use tools on the domU side to expand the filesystem. <br> <br> There''s really no point in trying to expand a swap partition because you can just make another one. <br> <br> On Mon, 24 Apr 2006, Chris Hirsch wrote: <br> <br> <blockquote type="cite">Ben wrote: <br> <blockquote type="cite">Yeah, you use LVM and grow you logical volume size, then expand it <br> in the guest domain. I''m not sure, but I suspect you''d have to <br> restart your guest before you can expand it. <br> </blockquote> But isn''t the xvda just a file containing partitions and the like? <br> I''ve actually been wanting to do this myself WITH LVM. I''d LOVE to <br> have lvm extend the file itself. <br> <br> I did find the trick extending an image: <br> dd if=/dev/zero bs=1024 count=3500000 >> fedora.fc5.img <br> resize2fs -f fedora.fc5.img <br> <br> and thats works great...The way I understand the xvda file is that <br> you''d have to copy out anything that is after the main image resize <br> the image (like above) and then append the old stuff back to the end <br> of the disk. I''d assume "stuff" here to mean something like swap. <br> <br> Chris <br> <br> <br> </blockquote> <br> -- <br> Fedora-xen mailing list <br> <a class="moz-txt-link-abbreviated" href="mailto:Fedora-xen@redhat.com">Fedora-xen@redhat.com</a> <br> <a class="moz-txt-link-freetext" href="https://www.redhat.com/mailman/listinfo/fedora-xen">https://www.redhat.com/mailman/listinfo/fedora-xen</a> <br> <br> </blockquote> </body> </html>
Jeremy Katz
2006-Apr-25 00:41 UTC
Re: [Fedora-xen] How to expand the file created by xenguest-install?
On Mon, 2006-04-24 at 20:29 -0400, Denis Forveille wrote:> After that I''m stucked: > - I cant expand the filesystem for "/" from domU: "fdisk" gives the > correct (new) size for "/dev/xvda", but I can''t use parted or > rezise2fs on "/dev/xvda1" as it is mounted...Take a look at ext2online for online resizing of ext[23] filesystems> - Maybe, from dom0, a combination of "lomount" and "parted" or > "resize2fs" or other tools could do the job but I don''t know how to do > it.Take a look at kpartx (I think it''s in the device-mapper-multipath package for whatever reason, but that''s neither here nor there) -- it''ll let you set up device mapper devices based on a partition table if you want to do manipulation of guest filesystems from dom0 Jeremy
Is anyone using FC5 Xen with an FC5 guest, where the Dom0 has two ethernet devices (succesfully)? My system has eth0 as a 192.168.2.x network, eth1 as my static Internet address, and iptables NAT between them. All real machines on my home network can get out just fine. My guest VM, also a 192.168.2.x address, is able to reach other machines on my internal network without problem, but trying to access the internet doesn''t work. At first I thought it was an iptables configuration issue on the Dom0 machine, but I don''t think so anymore. As a test, I inserted at the top of every table a rule to emit a log message when any machine on my net tried to access a specific remote host; performing a wget command in the guest VM shows my outbound SYN, shows an incoming SYN+ACK from the remote host (so outbound masquarading must be working?) and an outbound ACK (so incoming demasquarading must be working?)... I never receive another packet from the remote host (until quite a while later, when I receive FIN). If I try the same exercise with a real host on my network, I get a normal data stream in/out. Also, traceroute from the guest VM doesn''t work exactly as I would expect. I would expect the results of one to be quite similar to those from my Dom0 machine, but consistantly I am missing responses along the path. For example:>From dom0:[root@heilpern ~]# traceroute www.yahoo.com traceroute to www.yahoo.com (216.109.117.106), 30 hops max, 40 byte packets 1 [my cable modem] 2 10.106.32.1 (10.106.32.1) 8.279 ms 11.786 ms * 3 * * * 4 * * * 5 * * * 6 * * * 7 ae-0-0.bbr2.Washington1.Level3.net (4.68.128.210) 45.855 ms * * 8 ae-21-54.car1.Washington1.Level3.net (4.68.121.114) 35.593 ms ae-21-56.car1.Washington1.Level3.net (4.68.121.178) 35.382 ms 41.539 ms 9 4.79.228.2 (4.79.228.2) 40.073 ms 39.931 ms * 10 * * * 11 * * * 12 * p21.www.dcn.yahoo.com (216.109.117.106) 35.227 ms *>From the guest VM:[root@testvm ~]# traceroute www.yahoo.com traceroute to www.yahoo.com (216.109.117.106), 30 hops max, 40 byte packets 1 192.168.2.1 (192.168.2.1) 0.000 ms 0.000 ms 0.000 ms 2 [my cable modem] 3 10.106.32.1 (10.106.32.1) 9.910 ms 13.919 ms * 4 * * * 5 * * * 6 * * * 7 * * * 8 ae-0-0.bbr2.Washington1.Level3.net (4.68.128.210) 48.307 ms * * 9 ae-11-51.car1.Washington1.Level3.net (4.68.121.18) 37.938 ms 42.377 ms ae-21-54.car1.Washington1.Level3.net (4.68.121.114) 43.048 ms 10 4.79.228.2 (4.79.228.2) 45.568 ms 43.918 ms * 11 * * * 12 * * * 13 * * * 14 * * * 15 * * * 16 * * * 17 * * * 18 * * * 19 * * * 20 * * * 21 * * * 22 * * * 23 * * * 24 * * * 25 * * * 26 * * * 27 * * * 28 * * * 29 * * * 30 * * * [root@testvm ~]# This is pretty repeatable. Any thoughts? Here are my Dom0 configurations: [root@heilpern ~]# brctl show bridge name bridge id STP enabled interfaces xenbr0 8000.feffffffffff no peth0 vif0.0 vif2.0 [root@heilpern ~]# ifconfig eth0 eth0 Link encap:Ethernet HWaddr 00:10:DC:F2:70:17 inet addr:192.168.2.1 Bcast:192.168.2.255 Mask:255.255.255.0 inet6 addr: fe80::210:dcff:fef2:7017/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:733780 errors:0 dropped:0 overruns:0 frame:0 TX packets:822036 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:87799449 (83.7 MiB) TX bytes:207088442 (197.4 MiB) [root@heilpern ~]# ifconfig eth1 eth1 Link encap:Ethernet HWaddr 00:90:47:03:B8:63 inet addr:[my IP] Bcast:[my BCAST IP] Mask:255.255.255.252 inet6 addr: fe80::290:47ff:fe03:b863/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:829216 errors:0 dropped:0 overruns:0 frame:0 TX packets:556902 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:169446616 (161.5 MiB) TX bytes:85050877 (81.1 MiB) Interrupt:18 [root@heilpern ~]# iptables -t nat -L Chain PREROUTING (policy ACCEPT) target prot opt source destination Chain POSTROUTING (policy ACCEPT) target prot opt source destination MASQUERADE all -- anywhere anywhere Chain OUTPUT (policy ACCEPT) target prot opt source destination (temporary wide-open rules): [root@heilpern ~]# iptables -L Chain INPUT (policy ACCEPT) target prot opt source destination Chain FORWARD (policy ACCEPT) target prot opt source destination Chain OUTPUT (policy ACCEPT) target prot opt source destination Chain INBOUND (0 references) target prot opt source destination Chain LOG_FILTER (0 references) target prot opt source destination Chain LSI (0 references) target prot opt source destination Chain LSO (0 references) target prot opt source destination Chain OUTBOUND (0 references) target prot opt source destination Thanks in advance... Mark
Yes, but not with the default xen bridging scripts. On Apr 24, 2006, at 6:27 PM, Mark A Heilpern wrote:> Is anyone using FC5 Xen with an FC5 guest, where the Dom0 has two > ethernet devices (succesfully)? > > My system has eth0 as a 192.168.2.x network, eth1 as my static > Internet address, and iptables NAT between them. All real machines > on my home network can get out just fine. > > My guest VM, also a 192.168.2.x address, is able to reach other > machines on my internal network without problem, but trying to > access the internet doesn''t work. At first I thought it was an > iptables configuration issue on the Dom0 machine, but I don''t think > so anymore. As a test, I inserted at the top of every table a rule > to emit a log message when any machine on my net tried to access a > specific remote host; performing a wget command in the guest VM > shows my outbound SYN, shows an incoming SYN+ACK from the remote > host (so outbound masquarading must be working?) and an outbound > ACK (so incoming demasquarading must be working?)... I never > receive another packet from the remote host (until quite a while > later, when I receive FIN). If I try the same exercise with a real > host on my network, I get a normal data stream in/out. > > Also, traceroute from the guest VM doesn''t work exactly as I would > expect. I would expect the results of one to be quite similar to > those from my Dom0 machine, but consistantly I am missing responses > along the path. For example: > > >> From dom0: > [root@heilpern ~]# traceroute www.yahoo.com > traceroute to www.yahoo.com (216.109.117.106), 30 hops max, 40 byte > packets > 1 [my cable modem] > 2 10.106.32.1 (10.106.32.1) 8.279 ms 11.786 ms * > 3 * * * > 4 * * * > 5 * * * > 6 * * * > 7 ae-0-0.bbr2.Washington1.Level3.net (4.68.128.210) 45.855 ms * * > 8 ae-21-54.car1.Washington1.Level3.net (4.68.121.114) 35.593 ms > ae-21-56.car1.Washington1.Level3.net (4.68.121.178) 35.382 ms > 41.539 ms > 9 4.79.228.2 (4.79.228.2) 40.073 ms 39.931 ms * > 10 * * * > 11 * * * > 12 * p21.www.dcn.yahoo.com (216.109.117.106) 35.227 ms * > > >> From the guest VM: > [root@testvm ~]# traceroute www.yahoo.com > traceroute to www.yahoo.com (216.109.117.106), 30 hops max, 40 byte > packets > 1 192.168.2.1 (192.168.2.1) 0.000 ms 0.000 ms 0.000 ms > 2 [my cable modem] > 3 10.106.32.1 (10.106.32.1) 9.910 ms 13.919 ms * > 4 * * * > 5 * * * > 6 * * * > 7 * * * > 8 ae-0-0.bbr2.Washington1.Level3.net (4.68.128.210) 48.307 ms * * > 9 ae-11-51.car1.Washington1.Level3.net (4.68.121.18) 37.938 ms > 42.377 ms ae-21-54.car1.Washington1.Level3.net (4.68.121.114) > 43.048 ms > 10 4.79.228.2 (4.79.228.2) 45.568 ms 43.918 ms * > 11 * * * > 12 * * * > 13 * * * > 14 * * * > 15 * * * > 16 * * * > 17 * * * > 18 * * * > 19 * * * > 20 * * * > 21 * * * > 22 * * * > 23 * * * > 24 * * * > 25 * * * > 26 * * * > 27 * * * > 28 * * * > 29 * * * > 30 * * * > [root@testvm ~]# > > > > This is pretty repeatable. > > Any thoughts? > > > Here are my Dom0 configurations: > [root@heilpern ~]# brctl show > bridge name bridge id STP enabled interfaces > xenbr0 8000.feffffffffff no peth0 > vif0.0 > vif2.0 > [root@heilpern ~]# ifconfig eth0 > eth0 Link encap:Ethernet HWaddr 00:10:DC:F2:70:17 > inet addr:192.168.2.1 Bcast:192.168.2.255 Mask: > 255.255.255.0 > inet6 addr: fe80::210:dcff:fef2:7017/64 Scope:Link > UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 > RX packets:733780 errors:0 dropped:0 overruns:0 frame:0 > TX packets:822036 errors:0 dropped:0 overruns:0 carrier:0 > collisions:0 txqueuelen:0 > RX bytes:87799449 (83.7 MiB) TX bytes:207088442 (197.4 MiB) > > [root@heilpern ~]# ifconfig eth1 > eth1 Link encap:Ethernet HWaddr 00:90:47:03:B8:63 > inet addr:[my IP] Bcast:[my BCAST IP] Mask:255.255.255.252 > inet6 addr: fe80::290:47ff:fe03:b863/64 Scope:Link > UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 > RX packets:829216 errors:0 dropped:0 overruns:0 frame:0 > TX packets:556902 errors:0 dropped:0 overruns:0 carrier:0 > collisions:0 txqueuelen:1000 > RX bytes:169446616 (161.5 MiB) TX bytes:85050877 (81.1 MiB) > Interrupt:18 > > [root@heilpern ~]# iptables -t nat -L > Chain PREROUTING (policy ACCEPT) > target prot opt source destination > > Chain POSTROUTING (policy ACCEPT) > target prot opt source destination > MASQUERADE all -- anywhere anywhere > > Chain OUTPUT (policy ACCEPT) > target prot opt source destination > > (temporary wide-open rules): > [root@heilpern ~]# iptables -L > Chain INPUT (policy ACCEPT) > target prot opt source destination > > Chain FORWARD (policy ACCEPT) > target prot opt source destination > > Chain OUTPUT (policy ACCEPT) > target prot opt source destination > > Chain INBOUND (0 references) > target prot opt source destination > > Chain LOG_FILTER (0 references) > target prot opt source destination > > Chain LSI (0 references) > target prot opt source destination > > Chain LSO (0 references) > target prot opt source destination > > Chain OUTBOUND (0 references) > target prot opt source destination > > > > Thanks in advance... > Mark > > -- > Fedora-xen mailing list > Fedora-xen@redhat.com > https://www.redhat.com/mailman/listinfo/fedora-xen
Denis Forveille
2006-Apr-25 02:45 UTC
Re: [Fedora-xen] How to expand the file created by xenguest-install?
Thanks, but I still miss how to grow the partition inside the disk inside the lvg (lvg -> /dev/xvda -> /dev/xvda1) To summarize, the steps should be (from dom0): 1) grow the lvg used for domU (=/dev/xvda from the domU point of view) -> lvextend -L +1024 /dev/vg_domU/lv_FC55 2) grow the partition used by "/" in the lvg (/dev/xvda1) with parted -> parted /dev/mapper/vg_domU-lv_FC55 -> resize 1 32kB 9664MB (This does not work, see below) 3) resize the fs with resize2fs (from dom0) or with ext2online from domU (thanks to Jeremy) -> resize2fs /dev/mapper/vg_domU-lv_FC55 Here''s the output from parted: Using /dev/mapper/vg_domU-lv_FC55 (parted) print Disk geometry for /dev/mapper/vg_domU-lv_FC55: 0kB - 9664MB Disk label type: msdos Number Start End Size Type File system Flags 1 32kB 8587MB 8587MB primary ext3 boot (parted) resize 1 Start? [32kB]? 32kB End? [8587MB]? 9660MB Error: File system has an incompatible feature enabled. Is there a tool other than parted I could use to resize the partition /dev/xvda1 inside the lvg? Jeremy Katz wrote:> On Mon, 2006-04-24 at 20:29 -0400, Denis Forveille wrote: > >> After that I''m stucked: >> - I cant expand the filesystem for "/" from domU: "fdisk" gives the >> correct (new) size for "/dev/xvda", but I can''t use parted or >> rezise2fs on "/dev/xvda1" as it is mounted... >> > > Take a look at ext2online for online resizing of ext[23] filesystems > > >> - Maybe, from dom0, a combination of "lomount" and "parted" or >> "resize2fs" or other tools could do the job but I don''t know how to do >> it. >> > > Take a look at kpartx (I think it''s in the device-mapper-multipath > package for whatever reason, but that''s neither here nor there) -- it''ll > let you set up device mapper devices based on a partition table if you > want to do manipulation of guest filesystems from dom0 > > Jeremy > > -- > Fedora-xen mailing list > Fedora-xen@redhat.com > https://www.redhat.com/mailman/listinfo/fedora-xen > >
Lamont R. Peterson
2006-Apr-25 17:14 UTC
Re: [Fedora-xen] How to expand the file created by xenguest-install?
On Monday 24 April 2006 06:41pm, Jeremy Katz wrote:> On Mon, 2006-04-24 at 20:29 -0400, Denis Forveille wrote: > > After that I''m stucked: > > - I cant expand the filesystem for "/" from domU: "fdisk" gives the > > correct (new) size for "/dev/xvda", but I can''t use parted or > > rezise2fs on "/dev/xvda1" as it is mounted... > > Take a look at ext2online for online resizing of ext[23] filesystemsIs ext2online supposed to work for ext2 filesystems? I have read that it only worked for ext3. I''ve tried it with ext2 (created using mke2fs on RHEL4) and it never worked. [snip] -- Lamont R. Peterson <lamont@gurulabs.com> Senior Instructor Guru Labs, L.C. [ http://www.GuruLabs.com/ ] GPG Key fingerprint: F98C E31A 5C4C 834A BCAB 8CB3 F980 6C97 DC0D D409
Lamont R. Peterson
2006-Apr-25 17:18 UTC
Re: [Fedora-xen] How to expand the file created by xenguest-install?
On Monday 24 April 2006 08:45pm, Denis Forveille wrote:> Thanks, but I still miss how to grow the partition inside the disk > inside the lvg (lvg -> /dev/xvda -> /dev/xvda1)I don''t have partitions inside of the LVs in dom0. It works great for all distros (SUSE 9.x/10.0, SLES8/9, RHEL3/4, CentOS3/4, FC2/3/4/5, Gentoo, Ubuntu). Just make the LV the partition for the domU guests. Then, you don''t have to worry about a partition table from either dom0 or domU and the guests don''t care about it either. [snip] -- Lamont R. Peterson <lamont@gurulabs.com> Senior Instructor Guru Labs, L.C. [ http://www.GuruLabs.com/ ] GPG Key fingerprint: F98C E31A 5C4C 834A BCAB 8CB3 F980 6C97 DC0D D409
Jeremy Katz
2006-Apr-25 18:48 UTC
Re: [Fedora-xen] How to expand the file created by xenguest-install?
On Tue, 2006-04-25 at 11:14 -0600, Lamont R. Peterson wrote:> On Monday 24 April 2006 06:41pm, Jeremy Katz wrote: > > On Mon, 2006-04-24 at 20:29 -0400, Denis Forveille wrote: > > > After that I''m stucked: > > > - I cant expand the filesystem for "/" from domU: "fdisk" gives the > > > correct (new) size for "/dev/xvda", but I can''t use parted or > > > rezise2fs on "/dev/xvda1" as it is mounted... > > > > Take a look at ext2online for online resizing of ext[23] filesystems > > Is ext2online supposed to work for ext2 filesystems? I have read that it only > worked for ext3. I''ve tried it with ext2 (created using mke2fs on RHEL4) and > it never worked.I thought the support went in, but I could be mistaken. As it turns out, I never create ext2 filesystems anymore :) Jeremy
Denis Forveille
2006-Apr-26 23:00 UTC
Re: [Fedora-xen] How to expand the file created by xenguest-install?
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type"> <title></title> </head> <body bgcolor="#ffffff" text="#000000"> <font size="-1"><font face="Verdana">Obviously you don''t use xenguest-install to set up your guests as it is not possible to do that natively...<br> <br> Finally, what I did:<br> - I installed a guest FC5 with xenguest-install in a file. (1 partition for "/", grub installed in first sector, no swap partition)<br> - create a new lvg , mount it<br> </font></font><font size="-1"><font face="Verdana">- from dom0, lomount mount the file (partition 1)<br> </font></font><font size="-1"><font face="Verdana">- copy everything from the file (partition 1) to the lvg (cp -ax)<br> - change the grub.conf (root=) and fstab ("/" partition) in the lvg to adapt to the new name for /dev/sda1<br> - change the corresponding xen config file to replace xvda by sda1 and put the name of the lvg<br> <br> ..and it works great.<br> <br> I now have a "base" version for FC5 in that lvg, I can duplicate it to create a new FC5 guest when needed, and I indeed can easily change the size of the base "disk" (lvextend, resize2fs).<br> <br> Thanks everyone for your help.<br> </font></font><br> Lamont R. Peterson wrote: <blockquote cite="mid200604251118.39492.lamont@gurulabs.com" type="cite"> <pre wrap="">On Monday 24 April 2006 08:45pm, Denis Forveille wrote: </pre> <blockquote type="cite"> <pre wrap="">Thanks, but I still miss how to grow the partition inside the disk inside the lvg (lvg -> /dev/xvda -> /dev/xvda1) </pre> </blockquote> <pre wrap=""><!----> I don''t have partitions inside of the LVs in dom0. It works great for all distros (SUSE 9.x/10.0, SLES8/9, RHEL3/4, CentOS3/4, FC2/3/4/5, Gentoo, Ubuntu). Just make the LV the partition for the domU guests. Then, you don''t have to worry about a partition table from either dom0 or domU and the guests don''t care about it either. [snip] </pre> <pre wrap=""> <hr size="4" width="90%"> -- Fedora-xen mailing list <a class="moz-txt-link-abbreviated" href="mailto:Fedora-xen@redhat.com">Fedora-xen@redhat.com</a> <a class="moz-txt-link-freetext" href="https://www.redhat.com/mailman/listinfo/fedora-xen">https://www.redhat.com/mailman/listinfo/fedora-xen</a> </pre> </blockquote> </body> </html>
Okay... I think I''ve figured out how to do this.. Problem: I created a volume backed DomU on a 3G logical volume. The DomU itself used LVM to manage disks. I needed to expand the disk (i.e., the LVM on the Dom0). The previous workaround was to add another LV in the Dom0 and assign it to the DomU. This created a second xvdb in the domU. I used standard LVM tools to create a PV and assign it to the original volume group. E.g.: My xm-fc5-005 initially contained: name = "xm-fc5-005" memory = "256" disk = [ ''phy:/dev/rootvg/xm-fc4-005_lv,xvda,w''] vif = [ ''mac=00:16:3e:20:48:ae'' ] bootloader="/usr/bin/pygrub" I added another disk by creating a new LV in dom0 and assigning with: disk = [ ''phy:/dev/rootvg/xm-fc4-005_lv,xvda,w'',\ ''phy:/dev/rootvg/xm-fc5-005_lv2,xvdb,w'' ] The above works fine, and is probably no less efficient than the method that follows, but it felt kind of kludgey to add space that way. The second method is to lvresize the original VBD and use pvresize in the domU: lvresize -L +1G /dev/rootvg/xm-fc4-005_lv Then in the domU: First, determine the PV device by running pvdisplay and getting the PV Name. In this case, xvda2. Next resize it: pvresize --setphysicalvolumesize 4G /dev/xvda2 pvresize appears to only be available in FC5... alas. If you''re not running LVMs inside the domU, you''d use parted (or qparted) to resize. -- * The Digital Hermit http://www.digitalhermit.com * Unix and Linux Solutions kwan@digitalhermit.com