Adam Heath
2005-Jan-14 19:15 UTC
[Xen-devel] lvm management of block devices in dom0 not working as well as it should
We are using lvm2(dm) on 2.6 to manage block devices. If we extend such a device, the guest kernel does not see the change. config: dom0:/dev/space/kaffe-swap-0 -> guest:/dev/hda guest: swapoff -a dom0: lvextend /dev/space/kaffe-swap-0 -L+100M Extending logical volume kaffe-swap-0 to 612.00 MB Logical volume kaffe-swap-0 successfully resized (this shows it was 512m previously) dom0: mkswap /dev/space/kaffe-swap-0 Setting up swapspace version 1, size = 641724 kB no label, UUID=246f699d-7fc2-4909-9c31-359ed45b203e guest: swapon -a swapon: /dev/hda: Invalid argument guest: dmesg | tail -1 Swap area shorter than signature indicates Is it possible to add additional commands over the emulation channel to support querying sizes? Or is there some command I need to run to kick the guest into seeing the new size? ------------------------------------------------------- The SF.Net email is sponsored by: Beat the post-holiday blues Get a FREE limited edition SourceForge.net t-shirt from ThinkGeek. It''s fun and FREE -- well, almost....http://www.thinkgeek.com/sfshirt _______________________________________________ Xen-devel mailing list Xen-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/xen-devel
Jan Kundrát
2005-Jan-14 21:50 UTC
Re: [Xen-devel] lvm management of block devices in dom0 not working as well as it should
Adam Heath wrote:> Is it possible to add additional commands over the emulation channel to > support querying sizes? Or is there some command I need to run to kick the > guest into seeing the new size?Have you tried `swapoff /dev/swap`, resize inside domain0, `mkswap -f /dev/hda`, `swapon /dev/hda`? -jkt -- cd /local/pub && more beer > /dev/mouth ------------------------------------------------------- The SF.Net email is sponsored by: Beat the post-holiday blues Get a FREE limited edition SourceForge.net t-shirt from ThinkGeek. It''s fun and FREE -- well, almost....http://www.thinkgeek.com/sfshirt _______________________________________________ Xen-devel mailing list Xen-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/xen-devel
Adam Heath
2005-Jan-15 03:11 UTC
Re: [Xen-devel] lvm management of block devices in dom0 not working as well as it should
On Fri, 14 Jan 2005, Jan Kundrát wrote:> Adam Heath wrote: > > Is it possible to add additional commands over the emulation channel to > > support querying sizes? Or is there some command I need to run to kick the > > guest into seeing the new size? > > Have you tried `swapoff /dev/swap`, resize inside domain0, `mkswap -f > /dev/hda`, `swapon /dev/hda`?kaffe:/home/doogie# mkswap -f /dev/hda mkswap: Will not try to make swapdevice on ''%s'' So, xen is not setting some field properly. I have just extended the device by 100m, but that doesn''t matter. I still can''t mkswap it. We *need* to be able to modify the size of the device in dom0, and have domU see the change(be it with lvm, gnbd, or iscsi). Actually, what would be ok, is lvm running in both dom0 and domU, and a module communicating between the 2. ------------------------------------------------------- The SF.Net email is sponsored by: Beat the post-holiday blues Get a FREE limited edition SourceForge.net t-shirt from ThinkGeek. It''s fun and FREE -- well, almost....http://www.thinkgeek.com/sfshirt _______________________________________________ Xen-devel mailing list Xen-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/xen-devel
Adam Heath
2005-Jan-15 03:22 UTC
Re: [Xen-devel] lvm management of block devices in dom0 not working as well as it should
On Fri, 14 Jan 2005, Jan Kundrát wrote:> Adam Heath wrote: > > Is it possible to add additional commands over the emulation channel to > > support querying sizes? Or is there some command I need to run to kick the > > guest into seeing the new size? > > Have you tried `swapoff /dev/swap`, resize inside domain0, `mkswap -f > /dev/hda`, `swapon /dev/hda`?Note that doing swapoff in domU, lvextend in dom0, vbd-destroy, vbd-create, swapon in domU, doesn''t work: kaffe:/home/doogie# swapon -a swapon: /dev/hda: Invalid argument So, do those vbd-* commands actually work? ------------------------------------------------------- The SF.Net email is sponsored by: Beat the post-holiday blues Get a FREE limited edition SourceForge.net t-shirt from ThinkGeek. It''s fun and FREE -- well, almost....http://www.thinkgeek.com/sfshirt _______________________________________________ Xen-devel mailing list Xen-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/xen-devel
Adam Heath
2005-Jan-15 04:07 UTC
Re: [Xen-devel] lvm management of block devices in dom0 not working as well as it should
On Fri, 14 Jan 2005, Adam Heath wrote:> On Fri, 14 Jan 2005, Jan Kundrát wrote: > > > Adam Heath wrote: > > > Is it possible to add additional commands over the emulation channel to > > > support querying sizes? Or is there some command I need to run to kick the > > > guest into seeing the new size? > > > > Have you tried `swapoff /dev/swap`, resize inside domain0, `mkswap -f > > /dev/hda`, `swapon /dev/hda`? > > Note that doing swapoff in domU, lvextend in dom0, vbd-destroy, vbd-create, > swapon in domU, doesn''t work: > > kaffe:/home/doogie# swapon -a > swapon: /dev/hda: Invalid argument > > So, do those vbd-* commands actually work?I can''t even add a brand new device to a running instance. So, to me, it looks like the vbd commands are pointless. ------------------------------------------------------- The SF.Net email is sponsored by: Beat the post-holiday blues Get a FREE limited edition SourceForge.net t-shirt from ThinkGeek. It''s fun and FREE -- well, almost....http://www.thinkgeek.com/sfshirt _______________________________________________ Xen-devel mailing list Xen-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/xen-devel
Ian Pratt
2005-Jan-15 10:10 UTC
RE: [Xen-devel] lvm management of block devices in dom0 not working as well as it should
> kaffe:/home/doogie# swapon -a > swapon: /dev/hda: Invalid argument > > So, do those vbd-* commands actually work?What happens if you export the device as a partition rather than a whole disk? I certainly recall that this was working at one point. I think it was even hooked up such that size changes didn''t require the the vbd to be destroyed/recreated for xenU to notice. Ian ------------------------------------------------------- The SF.Net email is sponsored by: Beat the post-holiday blues Get a FREE limited edition SourceForge.net t-shirt from ThinkGeek. It''s fun and FREE -- well, almost....http://www.thinkgeek.com/sfshirt _______________________________________________ Xen-devel mailing list Xen-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/xen-devel
Adam Heath
2005-Jan-15 18:09 UTC
RE: [Xen-devel] lvm management of block devices in dom0 not working as well as it should
On Sat, 15 Jan 2005, Ian Pratt wrote:> > kaffe:/home/doogie# swapon -a > > swapon: /dev/hda: Invalid argument > > > > So, do those vbd-* commands actually work? > > What happens if you export the device as a partition rather than a whole > disk? > > I certainly recall that this was working at one point. I think it was > even hooked up such that size changes didn''t require the the vbd to be > destroyed/recreated for xenU to notice.xen-2:/etc/xen# lvcreate -n foo -L100M space Logical volume "foo" created xen-2:/etc/xen# lvs ... foo space -wi-a- 100.00M ... xen-2:/etc/xen# xm vbd-create kaffe phy:/dev/space/foo hdd1 w xen-2:/etc/xen# kaffe:/home/doogie# dd if=/dev/hdd1 of=/dev/zero bs=1 count=1 dd: opening `/dev/hdd1'': No such device or address ------------------------------------------------------- The SF.Net email is sponsored by: Beat the post-holiday blues Get a FREE limited edition SourceForge.net t-shirt from ThinkGeek. It''s fun and FREE -- well, almost....http://www.thinkgeek.com/sfshirt _______________________________________________ Xen-devel mailing list Xen-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/xen-devel
Matthieu Patou
2005-Jan-16 21:44 UTC
Re: [Xen-devel] lvm management of block devices in dom0 not working as well as it should
Ian Pratt a écrit :>>kaffe:/home/doogie# swapon -a >>swapon: /dev/hda: Invalid argument >> >>So, do those vbd-* commands actually work? > > > What happens if you export the device as a partition rather than a whole > disk? > > I certainly recall that this was working at one point. I think it was > even hooked up such that size changes didn''t require the the vbd to be > destroyed/recreated for xenU to notice. > > IanHello all, i faced quite the same problem with lvm 2 + xen 2.x i resized in dom0 a partition used in domX. The partition is formated in XFS format. I issued an lvm resize in dom0, it showed that the volume was extended, so i try an xfs_growfs on the mounted partition but nothing append ... In dom1 the partition was seen unchanged ... I stopped the dom1 domain and mount the partition in dom0 (a xfs partition must be mounted in order to be extended ..) but xfs_growfs saw the Filesystem smaller than it was. After unmounting the volume and recreating dom1, i have been able to resize the FS in dom1 Quite strange ? I''ve try to do the same on a volume used direcly in dom0 and in this case there was no prolbem (lvm resize + xfs_growfs were like a charm ...). HTH ! Matthieu ------------------------------------------------------- The SF.Net email is sponsored by: Beat the post-holiday blues Get a FREE limited edition SourceForge.net t-shirt from ThinkGeek. It''s fun and FREE -- well, almost....http://www.thinkgeek.com/sfshirt _______________________________________________ Xen-devel mailing list Xen-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/xen-devel