From: Ian Campbell <Ian.Campbell@citrix.com>
To: "Pasi Kärkkäinen" <pasik@iki.fi>
Cc: "xen-devel@lists.xensource.com" <xen-devel@lists.xensource.com>
Subject: Re: Xen guest disk online resize, xenstore/blkback/blkfront questions
Date: Wed, 6 Jan 2010 20:44:25 +0000 [thread overview]
Message-ID: <1262810665.28737.102.camel@localhost.localdomain> (raw)
In-Reply-To: <20100106202631.GK25902@reaktio.net>
On Wed, 2010-01-06 at 20:26 +0000, Pasi Kärkkäinen wrote:
[...]
> Is this more or less correct? Please correct if I've missed something or
> understood something wrong.
All sounds vaguely familiar, although it's been a while since I last had
to follow those twisty paths around...
> So, what I need to do next:
>
> - LVM online-resize the guest disk LV in dom0.
>
> - write something to xenstore block device backend structures,
> to get the blkback driver notified about the 'block-resize'.
>
> Should I add a new xenbus_watch for some, say, 'resize' field, so I could get
> callback to blkback device_resize() easily when xenstore is updated?
>
> - blkback driver then needs to update/fetch the new size of the vbd,
> and update the xenstore /local/domain/0/backend/vbd/X/sectors field.
>
> Any problems getting the new size/sectors on-the-fly in the kernel?
You might need to close and reopen the block device?
Idle speculation: perhaps instead of an explicit "resize" field in
xenstore you could just have the backend continue watching the
'physical-device' node even after everything is connected the first time
and if it is rewritten (including to the same value) reopening the
physical device and setting things up again (picking up a size change as
a side effect).
There's no particular reason why the physical device couldn't change
over this operation either, you could maybe imagine changing to a
different device mapper node (e.g. perhaps some sort of wierd snapshot
mechanism?) or perhaps implementing some sort of PV-CDROM media change
in the same way.
> - blkback then needs to write something to xenstore block device frontend
> /local/domain/X/device/vbd/Y/ to notify the blkfront driver in the guest.
>
> Same thing here, should blkfront have a watch for some 'resize' field
> or so?
blkfront can probably just watch /local/domain/0/backend/vbd/X/sectors
Ian.
next prev parent reply other threads:[~2010-01-06 20:44 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-01-06 20:26 Xen guest disk online resize, xenstore/blkback/blkfront questions Pasi Kärkkäinen
2010-01-06 20:44 ` Ian Campbell [this message]
2010-01-06 21:57 ` Pasi Kärkkäinen
2010-01-08 7:54 ` Daniel Stodden
2010-01-12 15:16 ` Pasi Kärkkäinen
2012-02-01 12:29 ` feisky
2012-02-01 15:51 ` Pasi Kärkkäinen
2012-02-02 5:31 ` feisky
2012-02-02 9:12 ` Pasi Kärkkäinen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1262810665.28737.102.camel@localhost.localdomain \
--to=ian.campbell@citrix.com \
--cc=pasik@iki.fi \
--cc=xen-devel@lists.xensource.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).