All of lore.kernel.org
 help / color / mirror / Atom feed
* lvm management of block devices in dom0 not working as well as it should
@ 2005-01-14 19:15 Adam Heath
  2005-01-14 21:50 ` Jan Kundrát
  0 siblings, 1 reply; 8+ messages in thread
From: Adam Heath @ 2005-01-14 19:15 UTC (permalink / raw)
  To: xen-devel

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

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: lvm management of block devices in dom0 not working as well as it should
  2005-01-14 19:15 Adam Heath
@ 2005-01-14 21:50 ` Jan Kundrát
  2005-01-15  3:11   ` Adam Heath
  2005-01-15  3:22   ` Adam Heath
  0 siblings, 2 replies; 8+ messages in thread
From: Jan Kundrát @ 2005-01-14 21:50 UTC (permalink / raw)
  To: Adam Heath; +Cc: xen-devel

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

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: lvm management of block devices in dom0 not working as well as it should
  2005-01-14 21:50 ` Jan Kundrát
@ 2005-01-15  3:11   ` Adam Heath
  2005-01-15  3:22   ` Adam Heath
  1 sibling, 0 replies; 8+ messages in thread
From: Adam Heath @ 2005-01-15  3:11 UTC (permalink / raw)
  To: Jan Kundrát; +Cc: xen-devel@lists.sourceforge.net

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

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: lvm management of block devices in dom0 not working as well as it should
  2005-01-14 21:50 ` Jan Kundrát
  2005-01-15  3:11   ` Adam Heath
@ 2005-01-15  3:22   ` Adam Heath
  2005-01-15  4:07     ` Adam Heath
  1 sibling, 1 reply; 8+ messages in thread
From: Adam Heath @ 2005-01-15  3:22 UTC (permalink / raw)
  Cc: xen-devel@lists.sourceforge.net

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

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: lvm management of block devices in dom0 not working as well as it should
  2005-01-15  3:22   ` Adam Heath
@ 2005-01-15  4:07     ` Adam Heath
  0 siblings, 0 replies; 8+ messages in thread
From: Adam Heath @ 2005-01-15  4:07 UTC (permalink / raw)
  To: xen-devel@lists.sourceforge.net

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

^ permalink raw reply	[flat|nested] 8+ messages in thread

* RE: lvm management of block devices in dom0 not working as well as it should
@ 2005-01-15 10:10 Ian Pratt
  2005-01-15 18:09 ` Adam Heath
  2005-01-16 21:44 ` Matthieu Patou
  0 siblings, 2 replies; 8+ messages in thread
From: Ian Pratt @ 2005-01-15 10:10 UTC (permalink / raw)
  To: Adam Heath; +Cc: xen-devel

> 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

^ permalink raw reply	[flat|nested] 8+ messages in thread

* RE: lvm management of block devices in dom0 not working as well as it should
  2005-01-15 10:10 lvm management of block devices in dom0 not working as well as it should Ian Pratt
@ 2005-01-15 18:09 ` Adam Heath
  2005-01-16 21:44 ` Matthieu Patou
  1 sibling, 0 replies; 8+ messages in thread
From: Adam Heath @ 2005-01-15 18:09 UTC (permalink / raw)
  To: Ian Pratt; +Cc: xen-devel@lists.sourceforge.net

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

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: lvm management of block devices in dom0 not working as well as it should
  2005-01-15 10:10 lvm management of block devices in dom0 not working as well as it should Ian Pratt
  2005-01-15 18:09 ` Adam Heath
@ 2005-01-16 21:44 ` Matthieu Patou
  1 sibling, 0 replies; 8+ messages in thread
From: Matthieu Patou @ 2005-01-16 21:44 UTC (permalink / raw)
  To: xen-devel

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. 
> 
> Ian
Hello 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

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2005-01-16 21:44 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-01-15 10:10 lvm management of block devices in dom0 not working as well as it should Ian Pratt
2005-01-15 18:09 ` Adam Heath
2005-01-16 21:44 ` Matthieu Patou
  -- strict thread matches above, loose matches on Subject: below --
2005-01-14 19:15 Adam Heath
2005-01-14 21:50 ` Jan Kundrát
2005-01-15  3:11   ` Adam Heath
2005-01-15  3:22   ` Adam Heath
2005-01-15  4:07     ` Adam Heath

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.