Skip to contentSkip to conversation

: Support dynamic resizing of vbds

PATCH In review Ky Srinivasan 6 participants 32 messages Mar 9, 2010 – Aug 18, 2010 Xen hypervisor interface

lore
Share & tools
lore
#1 lore raw
Quoted 2 lines · Ky Srinivasan

The attached patch supports dynamic resizing of vbds.

Nice! Did you also implement the xm/xend side of resizing?

I implemented xm/xend support for online resizing a couple of months ago, but I was not done with the blkback/blkfront code yet.. well, no need for that now :)

-- Pasi

#2 lore raw
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines

On 3/9/2010 at 3:15 PM, in message <[email protected]>, Pasi

Quoted 5 lines · Kärkkäinen
Quoted 2 lines · Ky Srinivasan

The attached patch supports dynamic resizing of vbds.

Nice! Did you also implement the xm/xend side of resizing?

My goal was to not have the end-user do anything other than what was minimally required to resizing the device on the host side. Once the device is resized on the host side, this capacity change is propagated to the guest without having to invoke any xm command.

Regards,

K. Y

Quoted 6 lines

I implemented xm/xend support for online resizing a couple of months ago, but I was not done with the blkback/blkfront code yet.. well, no need for that now :)

-- Pasi

#3 lore raw
Quoted 5 lines · Ky Srinivasan
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines

On 3/9/2010 at 3:15 PM, in message <[email protected]>, Pasi

Quoted 1 line · Kärkkäinen

On Tue, Mar 09, 2010 at 12:56:11PM -0700, Ky Srinivasan wrote:

Quoted 9 lines
Quoted 4 lines
Quoted 2 lines

The attached patch supports dynamic resizing of vbds.

Nice! Did you also implement the xm/xend side of resizing?

My goal was to not have the end-user do anything other than what was minimally required to resizing the device on the host side. Once the device is resized on the host side, this capacity change is propagated to the guest without having to invoke any xm command.

Oh, even better!
What version of the kernel did you test with? 2.6.27?

-- Pasi

Quoted 10 lines

Regards,

K. Y

Quoted 6 lines

I implemented xm/xend support for online resizing a couple of months ago, but I was not done with the blkback/blkfront code yet.. well, no need for that now :)

-- Pasi

#4 lore raw
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines

On 3/9/2010 at 3:35 PM, in message <[email protected]>, Pasi

Quoted 10 lines · Kärkkäinen
Quoted 9 lines · Ky Srinivasan
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines

On 3/9/2010 at 3:15 PM, in message <[email protected]>, Pasi

Quoted 5 lines · Kärkkäinen
Quoted 2 lines · Ky Srinivasan

The attached patch supports dynamic resizing of vbds.

Nice! Did you also implement the xm/xend side of resizing?

Quoted 8 lines
Quoted 5 lines

My goal was to not have the end-user do anything other than what was minimally required to resizing the device on the host side. Once the device is resized on the host side, this capacity change is propagated to the guest without having to invoke any xm command.

Oh, even better!
What version of the kernel did you test with? 2.6.27?

I tested this on 2.6.32. The patches should apply to earlier kernels without too much trouble.

Regards,

K. Y

Quoted 13 lines

-- Pasi

Quoted 10 lines

Regards,

K. Y

Quoted 6 lines

I implemented xm/xend support for online resizing a couple of months ago, but I was not done with the blkback/blkfront code yet.. well, no need for that now :)

-- Pasi

#5 lore raw
Quoted 20 lines · Ky Srinivasan
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines

On 3/9/2010 at 3:35 PM, in message <[email protected]>, Pasi

Quoted 16 lines · Kärkkäinen
Quoted 14 lines · Ky Srinivasan
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines

On 3/9/2010 at 3:15 PM, in message <[email protected]>, Pasi

Quoted 5 lines · Kärkkäinen
Quoted 2 lines · Ky Srinivasan

The attached patch supports dynamic resizing of vbds.

Nice! Did you also implement the xm/xend side of resizing?

My goal was to not have the end-user do anything other than what was minimally required to resizing the device on the host side. Once the device is resized on the host side, this capacity change is propagated to the guest without having to invoke any xm command.

Quoted 4 lines
Quoted 2 lines

Oh, even better!
What version of the kernel did you test with? 2.6.27?

I tested this on 2.6.32. The patches should apply to earlier kernels without too much trouble.

Great!

Jeremy: Hopefully you can add this patch to your tree.

James: Would be nice to have similar online-resizing support also in gplpv frontends!

-- Pasi

Quoted 17 lines

Regards,

K. Y

Quoted 13 lines

-- Pasi

Quoted 10 lines

Regards,

K. Y

Quoted 6 lines

I implemented xm/xend support for online resizing a couple of months ago, but I was not done with the blkback/blkfront code yet.. well, no need for that now :)

-- Pasi

#6 lore raw
Quoted 32 lines · Pasi Kärkkäinen
Quoted 30 lines · Ky Srinivasan
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines

On 3/9/2010 at 3:35 PM, in message<[email protected]>, Pasi

Quoted 24 lines · Kärkkäinen
Quoted 11 lines · Ky Srinivasan
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines

On 3/9/2010 at 3:15 PM, in message<[email protected]>, Pasi

Quoted 5 lines · Kärkkäinen
Quoted 3 lines · Ky Srinivasan

The attached patch supports dynamic resizing of vbds.

Quoted 8 lines
Quoted 2 lines

Nice! Did you also implement the xm/xend side of resizing?

My goal was to not have the end-user do anything other than what was minimally required to resizing the device on the host side. Once the device is resized on the host side, this capacity change is propagated to the guest without having to invoke any xm command.

Oh, even better!
What version of the kernel did you test with? 2.6.27?

Quoted 7 lines
Quoted 3 lines

I tested this on 2.6.32. The patches should apply to earlier kernels without too much trouble.

Great!

Jeremy: Hopefully you can add this patch to your tree.

It applied fairly cleanly, but I haven't tested it yet. Ky, by 2.6.32 I assume I mean your one, not pvops? (Because your patch is touching blkfront in the wrong place.)

J

#7 lore raw
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines

On 3/11/2010 at 4:44 PM, in message <[email protected]>, Jeremy

Quoted 37 lines · Fitzhardinge
Quoted 29 lines · Pasi Kärkkäinen
Quoted 27 lines · Ky Srinivasan
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines

On 3/9/2010 at 3:35 PM, in message<[email protected]>, Pasi

Quoted 21 lines · Kärkkäinen
Quoted 19 lines · Ky Srinivasan
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines

On 3/9/2010 at 3:15 PM, in message<[email protected]>, Pasi

Quoted 7 lines · Kärkkäinen
Quoted 3 lines · Ky Srinivasan

The attached patch supports dynamic resizing of vbds.

Nice! Did you also implement the xm/xend side of resizing?

My goal was to not have the end-user do anything other than what was minimally required to resizing the device on the host side. Once the device is resized on the host side, this capacity change is propagated to the guest without having to invoke any xm command.

Quoted 4 lines
Quoted 4 lines
Quoted 3 lines

Oh, even better!
What version of the kernel did you test with? 2.6.27?

I tested this on 2.6.32. The patches should apply to earlier kernels without

too much trouble.

Quoted 2 lines
Quoted 2 lines
Quoted 8 lines
Quoted 4 lines

Great!

Jeremy: Hopefully you can add this patch to your tree.

It applied fairly cleanly, but I haven't tested it yet. Ky, by 2.6.32 I assume I mean your one, not pvops? (Because your patch is touching blkfront in the wrong place.)

Yes. This patch was against our sles11 sp1.

Regards,

K. Y

Quoted 7 lines

J

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel

#8 lore raw
Quoted 59 lines · Ky Srinivasan
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines

On 3/11/2010 at 4:44 PM, in message<[email protected]>, Jeremy

Quoted 53 lines · Fitzhardinge
Quoted 39 lines · Pasi Kärkkäinen
Quoted 36 lines · Ky Srinivasan
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines

On 3/9/2010 at 3:35 PM, in message<[email protected]>, Pasi

Quoted 28 lines · Kärkkäinen
Quoted 25 lines · Ky Srinivasan
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines

On 3/9/2010 at 3:15 PM, in message<[email protected]>, Pasi

Quoted 10 lines · Kärkkäinen
Quoted 4 lines · Ky Srinivasan

The attached patch supports dynamic resizing of vbds.

Nice! Did you also implement the xm/xend side of resizing?

My goal was to not have the end-user do anything other than what was minimally required to resizing the device on the host side. Once the device is resized on the host side, this capacity change is propagated to the guest without having to invoke any xm command.

Quoted 6 lines
Quoted 6 lines
Quoted 4 lines

Oh, even better!
What version of the kernel did you test with? 2.6.27?

I tested this on 2.6.32. The patches should apply to earlier kernels without

too much trouble.

Quoted 4 lines
Quoted 2 lines

Great!

Quoted 9 lines
Quoted 7 lines
Quoted 3 lines

Jeremy: Hopefully you can add this patch to your tree.

It applied fairly cleanly, but I haven't tested it yet. Ky, by 2.6.32 I assume I mean your one, not pvops? (Because your patch is touching blkfront in the wrong place.)

Yes. This patch was against our sles11 sp1.

What happens if the frontend doesn't support the resize, and the device shrinks? Will the backend just raise IO errors for out of range requests?

J

#9 lore raw
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines

On 3/11/2010 at 6:13 PM, in message <[email protected]>, Jeremy

Quoted 67 lines · Fitzhardinge
Quoted 66 lines · Ky Srinivasan
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines

On 3/11/2010 at 4:44 PM, in message<[email protected]>, Jeremy

Quoted 60 lines · Fitzhardinge
Quoted 39 lines · Pasi Kärkkäinen
Quoted 36 lines · Ky Srinivasan
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines

On 3/9/2010 at 3:35 PM, in message<[email protected]>, Pasi

Quoted 28 lines · Kärkkäinen
Quoted 25 lines · Ky Srinivasan
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines

On 3/9/2010 at 3:15 PM, in message<[email protected]>, Pasi

Quoted 10 lines · Kärkkäinen
Quoted 4 lines · Ky Srinivasan

The attached patch supports dynamic resizing of vbds.

Nice! Did you also implement the xm/xend side of resizing?

My goal was to not have the end-user do anything other than what was minimally required to resizing the device on the host side. Once the device is resized on the host side, this capacity change is propagated to the guest without having to invoke any xm command.

Quoted 6 lines
Quoted 6 lines
Quoted 4 lines

Oh, even better!
What version of the kernel did you test with? 2.6.27?

I tested this on 2.6.32. The patches should apply to earlier kernels without

too much trouble.

Quoted 7 lines
Quoted 2 lines

Great!

Jeremy: Hopefully you can add this patch to your tree.

It applied fairly cleanly, but I haven't tested it yet. Ky, by 2.6.32 I assume I mean your one, not pvops? (Because your patch is touching blkfront in the wrong place.)

Quoted 5 lines
Quoted 2 lines

Yes. This patch was against our sles11 sp1.

What happens if the frontend doesn't support the resize, and the device shrinks? Will the backend just raise IO errors for out of range requests?

Clearly, resizing is an operation that ought to be done with great care and co-ordination between the administrators of the guest and the host. If the device on the host side is shrunk without co-ordinating with the guest, seeing I/O errors will be the least of our problems!
The situation you describe can occur today without this patch - consider the case where an LVM based device is resized on the host side (device is shrunk as in your example). We will be generating I/O errors for out of range request on the backend in this scenario. Assuming all the co-ordination is done, this patch automates propagating the capacity change without having to detach and attach the storage from the guest.

Regards,

K. Y

Quoted 7 lines

J

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel

#10 lore raw
In reply to Ky Srinivasan
Quoted 4 lines · On Tuesday 09 March 2010 20:56:11 Ky Srinivasan wrote:

The attached patch supports dynamic resizing of vbds.

Thank you for this.

The patch applied succesfully against the gentoo-xen kernel (2.6.29-xen-r4)

I will test the patch on my system during the next week and provide feedback.

--
Joost Roeleveld

#11 lore raw
Quoted 12 lines · J. Roeleveld
Quoted 4 lines · On Tuesday 09 March 2010 20:56:11 Ky Srinivasan wrote:

The attached patch supports dynamic resizing of vbds.

Thank you for this.

The patch applied succesfully against the gentoo-xen kernel (2.6.29-xen-r4)

I will test the patch on my system during the next week and provide feedback.

Quoted 8 lines

--
Joost Roeleveld

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel

I tested the patch on xen-sources-2.6.31-r12 and it appears to work perfectly:

dom0: VBD Resize: new size 172032
domU: Setting capacity to 172032

I extended the filesystem and filled up the available space, then extended again:

dom0: VBD Resize: new size 376832
domU: Setting capacity to 376832

fsck, badblocks, and testing a tarball I had filled the filesystem with revealed no problems, so I decided to try reducing the filesystem, first using resize2fs, then reducing the size of the block device, although some errors were logged in domU the operation seemed to work ok:

dom0: VBD Resize: new size 114688
domU: Setting capacity to 114688
domU: end_request: I/O error, dev sdb1, sector 212984
domU: Buffer I/O error on device sdb1, logical block 26623

I did notice that it seemed to be necessary to "poke" the device using cfdisk /dev/sdb1 before domU would notice the new size, but on the whole everything works nicely and this is a very useful new feature!

Andy

#12 lore raw
Quoted 22 lines · Andrew Lyon
Quoted 12 lines · J. Roeleveld
Quoted 4 lines · On Tuesday 09 March 2010 20:56:11 Ky Srinivasan wrote:

The attached patch supports dynamic resizing of vbds.

Thank you for this.

The patch applied succesfully against the gentoo-xen kernel (2.6.29-xen-r4)

I will test the patch on my system during the next week and provide feedback.

Quoted 8 lines

--
Joost Roeleveld

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel

Quoted 5 lines

I tested the patch on xen-sources-2.6.31-r12 and it appears to work perfectly:

dom0: VBD Resize: new size 172032
domU: Setting capacity to 172032

Btw it would be good to add the vbd-device and domU name to these log entries in the dom0, and the device name in domU!

Quoted 12 lines

I extended the filesystem and filled up the available space, then extended again:

dom0: VBD Resize: new size 376832
domU: Setting capacity to 376832

fsck, badblocks, and testing a tarball I had filled the filesystem with revealed no problems, so I decided to try reducing the filesystem, first using resize2fs, then reducing the size of the block device, although some errors were logged in domU the operation seemed to work ok:

Quoted 9 lines

dom0: VBD Resize: new size 114688
domU: Setting capacity to 114688
domU: end_request: I/O error, dev sdb1, sector 212984
domU: Buffer I/O error on device sdb1, logical block 26623

I did notice that it seemed to be necessary to "poke" the device using cfdisk /dev/sdb1 before domU would notice the new size, but on the whole everything works nicely and this is a very useful new feature!

Good to hear it works!

-- Pasi

#13 lore raw
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines

On 3/14/2010 at 10:06 AM, in message <[email protected]>, Pasi

Quoted 26 lines · Kärkkäinen
Quoted 4 lines · Andrew Lyon
Quoted 3 lines · J. Roeleveld
Quoted 2 lines · On Tuesday 09 March 2010 20:56:11 Ky Srinivasan wrote:

The attached patch supports dynamic resizing of vbds.

Quoted 8 lines
Quoted 8 lines
Quoted 2 lines

Thank you for this.

The patch applied succesfully against the gentoo-xen kernel (2.6.29-xen-r4)

I will test the patch on my system during the next week and provide

feedback.

Quoted 12 lines
Quoted 9 lines

--
Joost Roeleveld

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel

I tested the patch on xen-sources-2.6.31-r12 and it appears to work perfectly:

Quoted 7 lines
Quoted 3 lines

dom0: VBD Resize: new size 172032
domU: Setting capacity to 172032

Btw it would be good to add the vbd-device and domU name to these log entries in the dom0,
and the device name in domU!

Agreed. Will send out the patch soon.

K. Y

Quoted 26 lines
Quoted 13 lines

I extended the filesystem and filled up the available space, then extended again:

dom0: VBD Resize: new size 376832
domU: Setting capacity to 376832

fsck, badblocks, and testing a tarball I had filled the filesystem with revealed no problems, so I decided to try reducing the filesystem, first using resize2fs, then reducing the size of the block device, although some errors were logged in domU the operation seemed to work ok:

Quoted 9 lines

dom0: VBD Resize: new size 114688
domU: Setting capacity to 114688
domU: end_request: I/O error, dev sdb1, sector 212984
domU: Buffer I/O error on device sdb1, logical block 26623

I did notice that it seemed to be necessary to "poke" the device using cfdisk /dev/sdb1 before domU would notice the new size, but on the whole everything works nicely and this is a very useful new feature!

Good to hear it works!

-- Pasi

#14 lore raw
In reply to Pasi Kärkkäinen
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines

On 3/14/2010 at 10:06 AM, in message <[email protected]>, Pasi

Quoted 26 lines · Kärkkäinen
Quoted 4 lines · Andrew Lyon
Quoted 3 lines · J. Roeleveld
Quoted 2 lines · On Tuesday 09 March 2010 20:56:11 Ky Srinivasan wrote:

The attached patch supports dynamic resizing of vbds.

Quoted 8 lines
Quoted 8 lines
Quoted 2 lines

Thank you for this.

The patch applied succesfully against the gentoo-xen kernel (2.6.29-xen-r4)

I will test the patch on my system during the next week and provide

feedback.

Quoted 12 lines
Quoted 9 lines

--
Joost Roeleveld

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel

I tested the patch on xen-sources-2.6.31-r12 and it appears to work perfectly:

Quoted 7 lines
Quoted 3 lines

dom0: VBD Resize: new size 172032
domU: Setting capacity to 172032

Btw it would be good to add the vbd-device and domU name to these log entries in the dom0,
and the device name in domU!

Agreed. Will send out the patch soon.

K. Y

Quoted 26 lines
Quoted 13 lines

I extended the filesystem and filled up the available space, then extended again:

dom0: VBD Resize: new size 376832
domU: Setting capacity to 376832

fsck, badblocks, and testing a tarball I had filled the filesystem with revealed no problems, so I decided to try reducing the filesystem, first using resize2fs, then reducing the size of the block device, although some errors were logged in domU the operation seemed to work ok:

Quoted 9 lines

dom0: VBD Resize: new size 114688
domU: Setting capacity to 114688
domU: end_request: I/O error, dev sdb1, sector 212984
domU: Buffer I/O error on device sdb1, logical block 26623

I did notice that it seemed to be necessary to "poke" the device using cfdisk /dev/sdb1 before domU would notice the new size, but on the whole everything works nicely and this is a very useful new feature!

Good to hear it works!

-- Pasi

#15 lore raw
Quoted 8 lines · Ky Srinivasan
Quoted 8 lines
Quoted 7 lines
Quoted 1 line

I tested the patch on xen-sources-2.6.31-r12 and it appears to work perfectly:

dom0: VBD Resize: new size 172032
domU: Setting capacity to 172032

Quoted 6 lines
Quoted 3 lines

Btw it would be good to add the vbd-device and domU name to these log entries in the dom0,
and the device name in domU!

Agreed. Will send out the patch soon.

Hey,

Did you send this patch? I'm just wondering if I missed it..

-- Pasi

Quoted 27 lines
Quoted 26 lines
Quoted 13 lines

I extended the filesystem and filled up the available space, then extended again:

dom0: VBD Resize: new size 376832
domU: Setting capacity to 376832

fsck, badblocks, and testing a tarball I had filled the filesystem with revealed no problems, so I decided to try reducing the filesystem, first using resize2fs, then reducing the size of the block device, although some errors were logged in domU the operation seemed to work ok:

Quoted 9 lines

dom0: VBD Resize: new size 114688
domU: Setting capacity to 114688
domU: end_request: I/O error, dev sdb1, sector 212984
domU: Buffer I/O error on device sdb1, logical block 26623

I did notice that it seemed to be necessary to "poke" the device using cfdisk /dev/sdb1 before domU would notice the new size, but on the whole everything works nicely and this is a very useful new feature!

Good to hear it works!

-- Pasi

#16 lore raw
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines

On 7/20/2010 at 2:27 PM, in message <[email protected]>, Pasi

Quoted 14 lines · Kärkkäinen
Quoted 9 lines · Ky Srinivasan
Quoted 9 lines
Quoted 7 lines
Quoted 1 line

I tested the patch on xen-sources-2.6.31-r12 and it appears to work perfectly:

dom0: VBD Resize: new size 172032
domU: Setting capacity to 172032

Btw it would be good to add the vbd-device and domU name to these log

entries

Quoted 3 lines
Quoted 2 lines

in the dom0,
and the device name in domU!

Quoted 8 lines
Quoted 2 lines

Agreed. Will send out the patch soon.

Hey,

Did you send this patch? I'm just wondering if I missed it..

-- Pasi

If I recall correctly I think I sent the patches out.

K. Y

Quoted 28 lines
Quoted 28 lines
Quoted 27 lines
Quoted 14 lines

I extended the filesystem and filled up the available space, then extended again:

dom0: VBD Resize: new size 376832
domU: Setting capacity to 376832

fsck, badblocks, and testing a tarball I had filled the filesystem with revealed no problems, so I decided to try reducing the filesystem, first using resize2fs, then reducing the size of the block device, although some errors were logged in domU the operation seemed to work ok:

Quoted 9 lines

dom0: VBD Resize: new size 114688
domU: Setting capacity to 114688
domU: end_request: I/O error, dev sdb1, sector 212984
domU: Buffer I/O error on device sdb1, logical block 26623

I did notice that it seemed to be necessary to "poke" the device using cfdisk /dev/sdb1 before domU would notice the new size, but on the whole everything works nicely and this is a very useful new feature!

Good to hear it works!

-- Pasi

#17 lore raw
Quoted 21 lines · Ky Srinivasan
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines

On 7/20/2010 at 2:27 PM, in message <[email protected]>, Pasi

Quoted 17 lines · Kärkkäinen
Quoted 9 lines · Ky Srinivasan
Quoted 9 lines
Quoted 7 lines
Quoted 1 line

I tested the patch on xen-sources-2.6.31-r12 and it appears to work perfectly:

dom0: VBD Resize: new size 172032
domU: Setting capacity to 172032

Btw it would be good to add the vbd-device and domU name to these log

entries

Quoted 5 lines
Quoted 2 lines

in the dom0,
and the device name in domU!

Agreed. Will send out the patch soon.

Quoted 7 lines
Quoted 5 lines

Hey,

Did you send this patch? I'm just wondering if I missed it..

-- Pasi

If I recall correctly I think I sent the patches out.

Hmm.. I don't seem to be able to find them.
Care to send them again?

-- Pasi

#18 lore raw
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines

On 7/20/2010 at 2:50 PM, in message <[email protected]>, Pasi

Quoted 28 lines · Kärkkäinen
Quoted 3 lines · Ky Srinivasan
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines

On 7/20/2010 at 2:27 PM, in message <[email protected]>,

Pasi

Quoted 5 lines
Quoted 4 lines · Kärkkäinen
Quoted 3 lines · Ky Srinivasan
Quoted 3 lines
Quoted 3 lines
Quoted 1 line

I tested the patch on xen-sources-2.6.31-r12 and it appears to work

perfectly:

Quoted 17 lines
Quoted 17 lines
Quoted 6 lines
Quoted 6 lines
Quoted 4 lines

dom0: VBD Resize: new size 172032
domU: Setting capacity to 172032

Btw it would be good to add the vbd-device and domU name to these log

entries

Quoted 5 lines
Quoted 2 lines

in the dom0,
and the device name in domU!

Agreed. Will send out the patch soon.

Hey,

Did you send this patch? I'm just wondering if I missed it..

Quoted 8 lines
Quoted 3 lines
Quoted 1 line

-- Pasi

If I recall correctly I think I sent the patches out.

Hmm.. I don't seem to be able to find them.
Care to send them again?

-- Pasi

I will dig this up and send it out.

Regards,

K. Y

Quoted 6 lines

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel

#19 lore raw
Quoted 4 lines
Quoted 4 lines

Hmm.. I don't seem to be able to find them.
Care to send them again?

Quoted 8 lines
Quoted 1 line

-- Pasi

I will dig this up and send it out.

Regards,

K. Y

found this in my archives:

The attached patch supports dynamic resizing of vbds. This patch fixes a bug in the previous version of this patch that was sent out. With this patch you can perform "online" resizing of file systems that support online resizing.

Subject: Propagate changed size of VBDs
References: bnc#583677
Patch-mainline: n/a

Support dynamic resizing of virtual block devices. This patch supports both file backed block devices as well as physical devices that can be dynamically resized on the host side.

drivers/xen/blkback/blkback.c +3 -0
Index: linux/drivers/xen/blkback/blkback.c
===================================================================
@@ -209,6 +209,7 @@ static void print_stats(blkif_t *blkif)
 int blkif_schedule(void *arg)
 {
 	blkif_t *blkif = arg;
+	struct vbd *vbd = &blkif->vbd;
 
 	blkif_get(blkif);
 
@@ -218,6 +219,8 @@ int blkif_schedule(void *arg)
 	while (!kthread_should_stop()) {
 		if (try_to_freeze())
 			continue;
+		if (unlikely(vbd->size != vbd_size(vbd)))
+			vbd_resize(blkif);
 
 		wait_event_interruptible(
 			blkif->wq,
drivers/xen/blkback/vbd.c +43 -0

52 lines not on this page · raw message

drivers/xen/blkback/common.h +2 -0
Index: linux/drivers/xen/blkback/common.h
===================================================================
@@ -56,6 +56,7 @@ struct vbd {
 	unsigned char  type;        /* VDISK_xxx */
 	u32            pdevice;     /* phys device that this vbd maps to */
 	struct block_device *bdev;
+	sector_t       size;        /* Cached size parameter */
 };
 
 struct backend_info;
@@ -116,6 +117,7 @@ blkif_t *blkif_alloc(domid_t domid);
 void blkif_disconnect(blkif_t *blkif);
 void blkif_free(blkif_t *blkif);
 int blkif_map(blkif_t *blkif, unsigned long shared_page, unsigned int evtchn);
+void vbd_resize(blkif_t *blkif);
 
 #define blkif_get(_b) (atomic_inc(&(_b)->refcnt))
 #define blkif_put(_b)					\
drivers/xen/blkfront/blkfront.c +18 -2
Index: linux/drivers/xen/blkfront/blkfront.c
===================================================================
@@ -328,9 +328,25 @@ static void connect(struct blkfront_info
 	unsigned int binfo;
 	int err;
 
-	if ((info->connected == BLKIF_STATE_CONNECTED) ||
-	    (info->connected == BLKIF_STATE_SUSPENDED) )
+	switch (info->connected) {
+	case BLKIF_STATE_CONNECTED:
+		/*
+		 * Potentially, the back-end may be signalling
+		 * a capacity change; update the capacity.
+		 */
+		err = xenbus_scanf(XBT_NIL, info->xbdev->otherend,
+				   "sectors", "%Lu", &sectors);
+		if (XENBUS_EXIST_ERR(err))
+			return;
+		printk(KERN_INFO "Setting capacity to %Lu\n",
+		       sectors);
+		set_capacity(info->gd, sectors);
+		revalidate_disk(info->gd);
+
+		/* fall through */
+	case BLKIF_STATE_SUSPENDED:
 		return;
+	}
 
 	DPRINTK("blkfront.c:connect:%s.\n", info->xbdev->otherend);
 

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel

#20 lore raw
Quoted 8 lines · J. Roeleveld
Quoted 8 lines
Quoted 5 lines

Hmm.. I don't seem to be able to find them.
Care to send them again?

-- Pasi

I will dig this up and send it out.

Quoted 8 lines
Quoted 4 lines

Regards,

K. Y

found this in my archives:

Thanks, but unfortunately this is not the patch that adds useful status/resize information printing..

The patch you attached is already merged into Jeremy's xen.git kernel trees.

-- Pasi

Quoted 153 lines

The attached patch supports dynamic resizing of vbds. This patch fixes a bug in the previous version of this patch that was sent out. With this patch you can perform "online" resizing of file systems that support online resizing.

Subject: Propagate changed size of VBDs
References: bnc#583677
Patch-mainline: n/a

Support dynamic resizing of virtual block devices. This patch supports both file backed block devices as well as physical devices that can be dynamically resized on the host side.

Index: linux/drivers/xen/blkback/blkback.c
===================================================================

drivers/xen/blkback/blkback.c +3 -0
@@ -209,6 +209,7 @@ static void print_stats(blkif_t *blkif)
 int blkif_schedule(void *arg)
 {
 	blkif_t *blkif = arg;
+	struct vbd *vbd = &blkif->vbd;
 
 	blkif_get(blkif);
 
@@ -218,6 +219,8 @@ int blkif_schedule(void *arg)
 	while (!kthread_should_stop()) {
 		if (try_to_freeze())
 			continue;
+		if (unlikely(vbd->size != vbd_size(vbd)))
+			vbd_resize(blkif);
 
 		wait_event_interruptible(
 			blkif->wq,

Index: linux/drivers/xen/blkback/vbd.c
===================================================================

drivers/xen/blkback/vbd.c +43 -0
@@ -73,6 +73,7 @@ int vbd_create(blkif_t *blkif, blkif_vde
 	}
 
 	vbd->bdev = bdev;
+	vbd->size = vbd_size(vbd);
 
 	if (vbd->bdev->bd_disk == NULL) {
 		DPRINTK("vbd_creat: device %08x doesn't exist.\n",
@@ -120,3 +121,45 @@ int vbd_translate(struct phys_req *req,
  out:
 	return rc;
 }
+
+void vbd_resize(blkif_t *blkif)
+{
+	struct vbd *vbd = &blkif->vbd;
+	struct xenbus_transaction xbt;
+	int err;
+	struct xenbus_device *dev = blkif->be->dev;
+	unsigned long long new_size = vbd_size(vbd);
+
+	printk(KERN_INFO "VBD Resize: new size %Lu\n", new_size);
+	vbd->size = new_size;
+again:
+	err = xenbus_transaction_start(&xbt);
+	if (err) {
+		printk(KERN_WARNING "Error starting transaction");
+		return;
+	}
+	err = xenbus_printf(xbt, dev->nodename, "sectors", "%Lu",
+			    vbd_size(vbd));
+	if (err) {
+		printk(KERN_WARNING "Error writing new size");
+		goto abort;
+	}
+	/*
+	 * Write the current state; we will use this to synchronize
+	 * the front-end. If the current state is "connected" the
+	 * front-end will get the new size information online.
+	 */
+	err = xenbus_printf(xbt, dev->nodename, "state", "%d", dev->state);
+	if (err) {
+		printk(KERN_WARNING "Error writing the state");
+		goto abort;
+	}
+
+	err = xenbus_transaction_end(xbt, 0);
+	if (err == -EAGAIN)
+		goto again;
+	if (err)
+		printk(KERN_WARNING "Error ending transaction");
+abort:
+	xenbus_transaction_end(xbt, 1);
+}

Index: linux/drivers/xen/blkback/common.h
===================================================================

drivers/xen/blkback/common.h +2 -0
@@ -56,6 +56,7 @@ struct vbd {
 	unsigned char  type;        /* VDISK_xxx */
 	u32            pdevice;     /* phys device that this vbd maps to */
 	struct block_device *bdev;
+	sector_t       size;        /* Cached size parameter */
 };
 
 struct backend_info;
@@ -116,6 +117,7 @@ blkif_t *blkif_alloc(domid_t domid);
 void blkif_disconnect(blkif_t *blkif);
 void blkif_free(blkif_t *blkif);
 int blkif_map(blkif_t *blkif, unsigned long shared_page, unsigned int evtchn);
+void vbd_resize(blkif_t *blkif);
 
 #define blkif_get(_b) (atomic_inc(&(_b)->refcnt))
 #define blkif_put(_b)					\

Index: linux/drivers/xen/blkfront/blkfront.c
===================================================================

drivers/xen/blkfront/blkfront.c +18 -2
@@ -328,9 +328,25 @@ static void connect(struct blkfront_info
 	unsigned int binfo;
 	int err;
 
-	if ((info->connected == BLKIF_STATE_CONNECTED) ||
-	    (info->connected == BLKIF_STATE_SUSPENDED) )
+	switch (info->connected) {
+	case BLKIF_STATE_CONNECTED:
+		/*
+		 * Potentially, the back-end may be signalling
+		 * a capacity change; update the capacity.
+		 */
+		err = xenbus_scanf(XBT_NIL, info->xbdev->otherend,
+				   "sectors", "%Lu", &sectors);
+		if (XENBUS_EXIST_ERR(err))
+			return;
+		printk(KERN_INFO "Setting capacity to %Lu\n",
+		       sectors);
+		set_capacity(info->gd, sectors);
+		revalidate_disk(info->gd);
+
+		/* fall through */
+	case BLKIF_STATE_SUSPENDED:
 		return;
+	}
 
 	DPRINTK("blkfront.c:connect:%s.\n", info->xbdev->otherend);
 

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel

#21 lore raw

Pasi,

I am attaching a patch that prints additional information when a vbd is resized. Note that on the domu side, the generic block layer already prints information on the device that is being resized.

Quoted 1 line
Quoted 1 line
Quoted 1 line

On 7/20/2010 at 3:06 PM, in message <[email protected]>, Pasi

Quoted 183 lines · Kärkkäinen
Quoted 8 lines · J. Roeleveld
Quoted 8 lines
Quoted 5 lines

Hmm.. I don't seem to be able to find them.
Care to send them again?

-- Pasi

I will dig this up and send it out.

Quoted 8 lines
Quoted 4 lines

Regards,

K. Y

found this in my archives:

Thanks, but unfortunately this is not the patch that adds useful status/resize information printing..

The patch you attached is already merged into Jeremy's xen.git kernel trees.

-- Pasi

Quoted 2 lines

The attached patch supports dynamic resizing of vbds. This patch fixes a bug

in

Quoted 1 line

the previous version of this patch that was sent out. With this patch you

can

Quoted 106 lines

perform "online" resizing of file systems that support online resizing.

Subject: Propagate changed size of VBDs
References: bnc#583677
Patch-mainline: n/a

Support dynamic resizing of virtual block devices. This patch supports both file backed block devices as well as physical devices that can be dynamically resized on the host side.

Index: linux/drivers/xen/blkback/blkback.c
===================================================================

drivers/xen/blkback/blkback.c +3 -0
@@ -209,6 +209,7 @@ static void print_stats(blkif_t *blkif)
 int blkif_schedule(void *arg)
 {
 	blkif_t *blkif = arg;
+	struct vbd *vbd = &blkif->vbd;
 
 	blkif_get(blkif);
 
@@ -218,6 +219,8 @@ int blkif_schedule(void *arg)
 	while (!kthread_should_stop()) {
 		if (try_to_freeze())
 			continue;
+		if (unlikely(vbd->size != vbd_size(vbd)))
+			vbd_resize(blkif);
 
 		wait_event_interruptible(
 			blkif->wq,

Index: linux/drivers/xen/blkback/vbd.c
===================================================================

drivers/xen/blkback/vbd.c +43 -0
@@ -73,6 +73,7 @@ int vbd_create(blkif_t *blkif, blkif_vde
 	}
 
 	vbd->bdev = bdev;
+	vbd->size = vbd_size(vbd);
 
 	if (vbd->bdev->bd_disk == NULL) {
 		DPRINTK("vbd_creat: device %08x doesn't exist.\n",
@@ -120,3 +121,45 @@ int vbd_translate(struct phys_req *req,
  out:
 	return rc;
 }
+
+void vbd_resize(blkif_t *blkif)
+{
+	struct vbd *vbd = &blkif->vbd;
+	struct xenbus_transaction xbt;
+	int err;
+	struct xenbus_device *dev = blkif->be->dev;
+	unsigned long long new_size = vbd_size(vbd);
+
+	printk(KERN_INFO "VBD Resize: new size %Lu\n", new_size);
+	vbd->size = new_size;
+again:
+	err = xenbus_transaction_start(&xbt);
+	if (err) {
+		printk(KERN_WARNING "Error starting transaction");
+		return;
+	}
+	err = xenbus_printf(xbt, dev->nodename, "sectors", "%Lu",
+			    vbd_size(vbd));
+	if (err) {
+		printk(KERN_WARNING "Error writing new size");
+		goto abort;
+	}
+	/*
+	 * Write the current state; we will use this to synchronize
+	 * the front-end. If the current state is "connected" the
+	 * front-end will get the new size information online.
+	 */
+	err = xenbus_printf(xbt, dev->nodename, "state", "%d", dev->state);
+	if (err) {
+		printk(KERN_WARNING "Error writing the state");
+		goto abort;
+	}
+
+	err = xenbus_transaction_end(xbt, 0);
+	if (err == -EAGAIN)
+		goto again;
+	if (err)
+		printk(KERN_WARNING "Error ending transaction");
+abort:
+	xenbus_transaction_end(xbt, 1);
+}

Index: linux/drivers/xen/blkback/common.h
===================================================================

drivers/xen/blkback/common.h +1 -0
@@ -56,6 +56,7 @@ struct vbd {
 	unsigned char  type;        /* VDISK_xxx */
 	u32            pdevice;     /* phys device that this vbd maps to */
 	struct block_device *bdev;
+	sector_t       size;        /* Cached size parameter */
 };
 
 struct backend_info;

drivers/xen/blkback/common.h blkif_t *blkif_alloc(domid_t domid); · line 119

Quoted 3 lines
drivers/xen/blkback/common.h +0 -0
@@ -116,6 +117,7 @@ blkif_t *blkif_alloc(domid_t domid);
 void blkif_disconnect(blkif_t *blkif);
 void blkif_free(blkif_t *blkif);
 int blkif_map(blkif_t *blkif, unsigned long shared_page, unsigned int 

evtchn);

Quoted 37 lines
drivers/xen/blkback/common.h +1 -0
+void vbd_resize(blkif_t *blkif);
 
 #define blkif_get(_b) (atomic_inc(&(_b)->refcnt))
 #define blkif_put(_b)					\

Index: linux/drivers/xen/blkfront/blkfront.c
===================================================================

drivers/xen/blkfront/blkfront.c +18 -2
@@ -328,9 +328,25 @@ static void connect(struct blkfront_info
 	unsigned int binfo;
 	int err;
 
-	if ((info->connected == BLKIF_STATE_CONNECTED) ||
-	    (info->connected == BLKIF_STATE_SUSPENDED) )
+	switch (info->connected) {
+	case BLKIF_STATE_CONNECTED:
+		/*
+		 * Potentially, the back-end may be signalling
+		 * a capacity change; update the capacity.
+		 */
+		err = xenbus_scanf(XBT_NIL, info->xbdev->otherend,
+				   "sectors", "%Lu", &sectors);
+		if (XENBUS_EXIST_ERR(err))
+			return;
+		printk(KERN_INFO "Setting capacity to %Lu\n",
+		       sectors);
+		set_capacity(info->gd, sectors);
+		revalidate_disk(info->gd);
+
+		/* fall through */
+	case BLKIF_STATE_SUSPENDED:
 		return;
+	}
 
 	DPRINTK("blkfront.c:connect:%s.\n", info->xbdev->otherend);
 
Quoted 4 lines

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel

Quoted 4 lines

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel

Subject: Print additional information when a vbd is resized.

drivers/xen/blkback/vbd.c +2 -0
Index: linux/drivers/xen/blkback/vbd.c
===================================================================
@@ -130,6 +130,8 @@ void vbd_resize(blkif_t *blkif)
 	struct xenbus_device *dev = blkif->be->dev;
 	unsigned long long new_size = vbd_size(vbd);
 
+	printk(KERN_INFO "VBD Resize: Domid: %d, Device: (%d, %d)\n",
+		blkif->domid, MAJOR(vbd->pdevice), MINOR(vbd->pdevice));
 	printk(KERN_INFO "VBD Resize: new size %Lu\n", new_size);
 	vbd->size = new_size;
 again:
drivers/xen/blkfront/blkfront.c +1 -1
Index: linux/drivers/xen/blkfront/blkfront.c
===================================================================
@@ -340,7 +340,7 @@ static void connect(struct blkfront_info
 				   "sectors", "%Lu", &sectors);
 		if (XENBUS_EXIST_ERR(err))
 			return;
-		printk(KERN_INFO "Setting capacity to %Lu\n",
+		printk(KERN_INFO "Changing capacity to %Lu sectors\n",
 		       sectors);
 		set_capacity(info->gd, sectors);
 		revalidate_disk(info->gd);

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel

#22 lore raw

Re: [PATCH]: Support dynamic resizing of vbds / print additional information patch

Quoted 6 lines · Ky Srinivasan

Pasi,

I am attaching a patch that prints additional information when a vbd is resized. Note that on the domu side, the generic block layer already prints information on the device that is being resized.

Thanks.

Jeremy: Please merge this patch.

-- Pasi

Quoted 223 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines

On 7/20/2010 at 3:06 PM, in message <[email protected]>, Pasi

Quoted 183 lines · Kärkkäinen
Quoted 8 lines · J. Roeleveld
Quoted 8 lines
Quoted 5 lines

Hmm.. I don't seem to be able to find them.
Care to send them again?

-- Pasi

I will dig this up and send it out.

Quoted 8 lines
Quoted 4 lines

Regards,

K. Y

found this in my archives:

Thanks, but unfortunately this is not the patch that adds useful status/resize information printing..

The patch you attached is already merged into Jeremy's xen.git kernel trees.

-- Pasi

Quoted 2 lines

The attached patch supports dynamic resizing of vbds. This patch fixes a bug

in

Quoted 1 line

the previous version of this patch that was sent out. With this patch you

can

Quoted 106 lines

perform "online" resizing of file systems that support online resizing.

Subject: Propagate changed size of VBDs
References: bnc#583677
Patch-mainline: n/a

Support dynamic resizing of virtual block devices. This patch supports both file backed block devices as well as physical devices that can be dynamically resized on the host side.

Index: linux/drivers/xen/blkback/blkback.c
===================================================================

drivers/xen/blkback/blkback.c +3 -0
@@ -209,6 +209,7 @@ static void print_stats(blkif_t *blkif)
 int blkif_schedule(void *arg)
 {
 	blkif_t *blkif = arg;
+	struct vbd *vbd = &blkif->vbd;
 
 	blkif_get(blkif);
 
@@ -218,6 +219,8 @@ int blkif_schedule(void *arg)
 	while (!kthread_should_stop()) {
 		if (try_to_freeze())
 			continue;
+		if (unlikely(vbd->size != vbd_size(vbd)))
+			vbd_resize(blkif);
 
 		wait_event_interruptible(
 			blkif->wq,

Index: linux/drivers/xen/blkback/vbd.c
===================================================================

drivers/xen/blkback/vbd.c +43 -0
@@ -73,6 +73,7 @@ int vbd_create(blkif_t *blkif, blkif_vde
 	}
 
 	vbd->bdev = bdev;
+	vbd->size = vbd_size(vbd);
 
 	if (vbd->bdev->bd_disk == NULL) {
 		DPRINTK("vbd_creat: device %08x doesn't exist.\n",
@@ -120,3 +121,45 @@ int vbd_translate(struct phys_req *req,
  out:
 	return rc;
 }
+
+void vbd_resize(blkif_t *blkif)
+{
+	struct vbd *vbd = &blkif->vbd;
+	struct xenbus_transaction xbt;
+	int err;
+	struct xenbus_device *dev = blkif->be->dev;
+	unsigned long long new_size = vbd_size(vbd);
+
+	printk(KERN_INFO "VBD Resize: new size %Lu\n", new_size);
+	vbd->size = new_size;
+again:
+	err = xenbus_transaction_start(&xbt);
+	if (err) {
+		printk(KERN_WARNING "Error starting transaction");
+		return;
+	}
+	err = xenbus_printf(xbt, dev->nodename, "sectors", "%Lu",
+			    vbd_size(vbd));
+	if (err) {
+		printk(KERN_WARNING "Error writing new size");
+		goto abort;
+	}
+	/*
+	 * Write the current state; we will use this to synchronize
+	 * the front-end. If the current state is "connected" the
+	 * front-end will get the new size information online.
+	 */
+	err = xenbus_printf(xbt, dev->nodename, "state", "%d", dev->state);
+	if (err) {
+		printk(KERN_WARNING "Error writing the state");
+		goto abort;
+	}
+
+	err = xenbus_transaction_end(xbt, 0);
+	if (err == -EAGAIN)
+		goto again;
+	if (err)
+		printk(KERN_WARNING "Error ending transaction");
+abort:
+	xenbus_transaction_end(xbt, 1);
+}

Index: linux/drivers/xen/blkback/common.h
===================================================================

drivers/xen/blkback/common.h +1 -0
@@ -56,6 +56,7 @@ struct vbd {
 	unsigned char  type;        /* VDISK_xxx */
 	u32            pdevice;     /* phys device that this vbd maps to */
 	struct block_device *bdev;
+	sector_t       size;        /* Cached size parameter */
 };
 
 struct backend_info;

drivers/xen/blkback/common.h blkif_t *blkif_alloc(domid_t domid); · line 119

Quoted 3 lines
drivers/xen/blkback/common.h +0 -0
@@ -116,6 +117,7 @@ blkif_t *blkif_alloc(domid_t domid);
 void blkif_disconnect(blkif_t *blkif);
 void blkif_free(blkif_t *blkif);
 int blkif_map(blkif_t *blkif, unsigned long shared_page, unsigned int 

evtchn);

Quoted 37 lines
drivers/xen/blkback/common.h +1 -0
+void vbd_resize(blkif_t *blkif);
 
 #define blkif_get(_b) (atomic_inc(&(_b)->refcnt))
 #define blkif_put(_b)					\

Index: linux/drivers/xen/blkfront/blkfront.c
===================================================================

drivers/xen/blkfront/blkfront.c +18 -2
@@ -328,9 +328,25 @@ static void connect(struct blkfront_info
 	unsigned int binfo;
 	int err;
 
-	if ((info->connected == BLKIF_STATE_CONNECTED) ||
-	    (info->connected == BLKIF_STATE_SUSPENDED) )
+	switch (info->connected) {
+	case BLKIF_STATE_CONNECTED:
+		/*
+		 * Potentially, the back-end may be signalling
+		 * a capacity change; update the capacity.
+		 */
+		err = xenbus_scanf(XBT_NIL, info->xbdev->otherend,
+				   "sectors", "%Lu", &sectors);
+		if (XENBUS_EXIST_ERR(err))
+			return;
+		printk(KERN_INFO "Setting capacity to %Lu\n",
+		       sectors);
+		set_capacity(info->gd, sectors);
+		revalidate_disk(info->gd);
+
+		/* fall through */
+	case BLKIF_STATE_SUSPENDED:
 		return;
+	}
 
 	DPRINTK("blkfront.c:connect:%s.\n", info->xbdev->otherend);
 
Quoted 4 lines

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel

Quoted 4 lines

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel

Subject: Print additional information when a vbd is resized.

Index: linux/drivers/xen/blkback/vbd.c
===================================================================

drivers/xen/blkback/vbd.c +2 -0
@@ -130,6 +130,8 @@ void vbd_resize(blkif_t *blkif)
 	struct xenbus_device *dev = blkif->be->dev;
 	unsigned long long new_size = vbd_size(vbd);
 
+	printk(KERN_INFO "VBD Resize: Domid: %d, Device: (%d, %d)\n",
+		blkif->domid, MAJOR(vbd->pdevice), MINOR(vbd->pdevice));
 	printk(KERN_INFO "VBD Resize: new size %Lu\n", new_size);
 	vbd->size = new_size;
 again:

Index: linux/drivers/xen/blkfront/blkfront.c
===================================================================

drivers/xen/blkfront/blkfront.c +1 -1
@@ -340,7 +340,7 @@ static void connect(struct blkfront_info
 				   "sectors", "%Lu", &sectors);
 		if (XENBUS_EXIST_ERR(err))
 			return;
-		printk(KERN_INFO "Setting capacity to %Lu\n",
+		printk(KERN_INFO "Changing capacity to %Lu sectors\n",
 		       sectors);
 		set_capacity(info->gd, sectors);
 		revalidate_disk(info->gd);
#23 lore raw

Re: [PATCH]: Support dynamic resizing of vbds / print additional information patch

Quoted 10 lines · Pasi Kärkkäinen
Quoted 6 lines · Ky Srinivasan

Pasi,

I am attaching a patch that prints additional information when a vbd is resized. Note that on the domu side, the generic block layer already prints information on the device that is being resized.

Thanks.

Jeremy: Please merge this patch.

Done. Well, the blkback part at least; I skipped the front bit just because it was only a message change and I was too lazy to split it into a separate branch...

J

#24 lore raw
In reply to Andrew Lyon
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines

On 3/14/2010 at 9:49 AM, in message

<[email protected]>, Andrew Lyon

Quoted 7 lines · <[email protected]> wrote:
Quoted 6 lines · J. Roeleveld
Quoted 4 lines · On Tuesday 09 March 2010 20:56:11 Ky Srinivasan wrote:

The attached patch supports dynamic resizing of vbds.

Quoted 6 lines
Quoted 5 lines

Thank you for this.

The patch applied succesfully against the gentoo-xen kernel (2.6.29-xen-r4)

I will test the patch on my system during the next week and provide

feedback.

Thanks. Looking forward to your feedback.

K. Y

Quoted 42 lines
Quoted 9 lines

--
Joost Roeleveld

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel

I tested the patch on xen-sources-2.6.31-r12 and it appears to work perfectly:

dom0: VBD Resize: new size 172032
domU: Setting capacity to 172032

I extended the filesystem and filled up the available space, then extended again:

dom0: VBD Resize: new size 376832
domU: Setting capacity to 376832

fsck, badblocks, and testing a tarball I had filled the filesystem with revealed no problems, so I decided to try reducing the filesystem, first using resize2fs, then reducing the size of the block device, although some errors were logged in domU the operation seemed to work ok:

dom0: VBD Resize: new size 114688
domU: Setting capacity to 114688
domU: end_request: I/O error, dev sdb1, sector 212984
domU: Buffer I/O error on device sdb1, logical block 26623

I did notice that it seemed to be necessary to "poke" the device using cfdisk /dev/sdb1 before domU would notice the new size, but on the whole everything works nicely and this is a very useful new feature!

Andy

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel

#25 lore raw
Quoted 16 lines · On Tuesday 16 March 2010 03:50:18 Ky Srinivasan wrote:
Quoted 1 line
Quoted 1 line
Quoted 1 line

On 3/14/2010 at 9:49 AM, in message

<[email protected]>, Andrew Lyon

Quoted 11 lines · <[email protected]> wrote:
Quoted 10 lines · J. Roeleveld
Quoted 3 lines · On Tuesday 09 March 2010 20:56:11 Ky Srinivasan wrote:

The attached patch supports dynamic resizing of vbds.

Thank you for this.

The patch applied succesfully against the gentoo-xen kernel (2.6.29-xen-r4)

Quoted 7 lines
Quoted 3 lines
Quoted 1 line

I will test the patch on my system during the next week and provide

feedback.

Thanks. Looking forward to your feedback.

K. Y

Ok, finally got time to test it.
Not seen any major crashes, but my domU and filesystem did end up in an unusable state.

I also noticed that the change-entries in the logs didn't show up until I "touched" the drive.
Eg: "ls <mount point>"

When trying to do an online resize, "resize2fs" refused, saying the filesystem was already using the full space:
--
storage ~ # resize2fs /dev/sdb1
resize2fs 1.41.9 (22-Aug-2009)
The filesystem is already 104857600 blocks long. Nothing to do! --

This was then 'resolved' by umount/mount of the filesystem:
--
storage ~ # umount /data/homes/
storage ~ # mount /data/homes/
storage ~ # resize2fs /dev/sdb1
resize2fs 1.41.9 (22-Aug-2009)
Filesystem at /dev/sdb1 is mounted on /data/homes; on-line resizing required old desc_blocks = 25, new_desc_blocks = 29
Performing an on-line resize of /dev/sdb1 to 117964800 (4k) blocks. --

These actions were take in the domU.

The patch informs the domU about the new size, but the new size is not cascaded to all the levels.

I'm not familiar enough with the kernel internals to point to where the missing part is.

My ideal situation would allow the folliowing to work without additional steps:

dom0: lvresize -L+10G /dev/vg/foo
domU: resizefs /dev/sdb1

(with "/dev/vg/foo" exported to domU as "/dev/sdb1")

Right now, I need to do the following:
dom0: lvresize -L+10G /dev/vg/foo
domU: ls /mnt/sdb1
domU: umount /mnt/sdb1
domU: mount /mnt/sdb1
domU: resizefs /dev/sdb1

During the 2nd attempt, when trying to umount the filesystem after increasing it again leads to the domU having a 100% I/O wait.
The logs themselves do not, however, show any usefull information.

I waited for about 30 minutes and saw no change to this situation.

I am afraid that for now I will revert back to not having this patch applied and use the 'current' method of increasing the filesystem sizes.

Please let me know if there is any further testing I can help with.

--
Joost Roeleveld

#26 lore raw
Quoted 7 lines · On Tuesday 16 March 2010 22:24:02 J. Roeleveld wrote:
Quoted 6 lines · On Tuesday 16 March 2010 03:50:18 Ky Srinivasan wrote:
Quoted 1 line
Quoted 1 line
Quoted 1 line

On 3/14/2010 at 9:49 AM, in message

<[email protected]>, Andrew Lyon

Quoted 1 line · <[email protected]> wrote:

On Fri, Mar 12, 2010 at 10:41 AM, J. Roeleveld <[email protected]>

Quoted 74 lines · wrote:
Quoted 10 lines
Quoted 10 lines
Quoted 10 lines · On Tuesday 09 March 2010 20:56:11 Ky Srinivasan wrote:
Quoted 3 lines

The attached patch supports dynamic resizing of vbds.

Thank you for this.

The patch applied succesfully against the gentoo-xen kernel (2.6.29-xen-r4)

Quoted 7 lines
Quoted 3 lines
Quoted 1 line

I will test the patch on my system during the next week and provide

feedback.

Thanks. Looking forward to your feedback.

K. Y

Ok, finally got time to test it.
Not seen any major crashes, but my domU and filesystem did end up in an unusable state.

I also noticed that the change-entries in the logs didn't show up until I "touched" the drive.
Eg: "ls <mount point>"

When trying to do an online resize, "resize2fs" refused, saying the
filesystem was already using the full space:
--
storage ~ # resize2fs /dev/sdb1
resize2fs 1.41.9 (22-Aug-2009)
The filesystem is already 104857600 blocks long. Nothing to do! --

This was then 'resolved' by umount/mount of the filesystem:
--
storage ~ # umount /data/homes/
storage ~ # mount /data/homes/
storage ~ # resize2fs /dev/sdb1
resize2fs 1.41.9 (22-Aug-2009)
Filesystem at /dev/sdb1 is mounted on /data/homes; on-line resizing
required old desc_blocks = 25, new_desc_blocks = 29
Performing an on-line resize of /dev/sdb1 to 117964800 (4k) blocks. --

These actions were take in the domU.

The patch informs the domU about the new size, but the new size is not cascaded to all the levels.

I'm not familiar enough with the kernel internals to point to where the missing part is.

My ideal situation would allow the folliowing to work without additional steps:

dom0: lvresize -L+10G /dev/vg/foo
domU: resizefs /dev/sdb1

(with "/dev/vg/foo" exported to domU as "/dev/sdb1")

Right now, I need to do the following:
dom0: lvresize -L+10G /dev/vg/foo
domU: ls /mnt/sdb1
domU: umount /mnt/sdb1
domU: mount /mnt/sdb1
domU: resizefs /dev/sdb1

During the 2nd attempt, when trying to umount the filesystem after
increasing it again leads to the domU having a 100% I/O wait.
The logs themselves do not, however, show any usefull information.

I waited for about 30 minutes and saw no change to this situation.

Quoted 8 lines

I am afraid that for now I will revert back to not having this patch
applied and use the 'current' method of increasing the filesystem sizes.

Please let me know if there is any further testing I can help with.

--
Joost Roeleveld

Update,

After killing the domU, I saw the following in my dom0:

--
VBD Resize: new size 943718400
VBD Resize: new size 1048576000

INFO: task blkback.3.sdb1:21647 blocked for more than 480 seconds.

"echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
blkback.3.sdb D 0000000000000002 0 21647 2
ffff88002b54f550 0000000000000246 ffff88002ef08000 0000000600000000 ffff88002f9bf800 ffffffff806952c0 ffffffff806952c0 ffff88002eeee550 ffff88002b54f778 000000002eee6800 0000000000000000 ffff88002b54f778

Call Trace:
 [<ffffffff804d6ece>] printk+0x4e/0x58
 [<ffffffff804d9387>] __down_read+0x101/0x119
 [<ffffffff803d301e>] xenbus_transaction_start+0x15/0x62
 [<ffffffff803d8843>] vbd_resize+0x50/0x120
 [<ffffffff803d747c>] blkif_schedule+0x7e/0x4ae
 [<ffffffff803d73fe>] blkif_schedule+0x0/0x4ae
 [<ffffffff8023f8de>] kthread+0x47/0x73
 [<ffffffff8020b2ea>] child_rip+0xa/0x20
 [<ffffffff8023f897>] kthread+0x0/0x73
 [<ffffffff8020b2e0>] child_rip+0x0/0x20

--

(this was the result from "dmesg"

The ID of the domU was "3" and the device of the filesystem in the domU is "sdb1"
Eg. this matches the above error-message.

--
Joost

#27 lore raw
Quoted 97 lines · On Tuesday 16 March 2010 22:27:12 J. Roeleveld wrote:
Quoted 62 lines · On Tuesday 16 March 2010 22:24:02 J. Roeleveld wrote:
Quoted 3 lines · On Tuesday 16 March 2010 03:50:18 Ky Srinivasan wrote:

Thanks. Looking forward to your feedback.

K. Y

Ok, finally got time to test it.
Not seen any major crashes, but my domU and filesystem did end up in an unusable state.

I also noticed that the change-entries in the logs didn't show up until I "touched" the drive.
Eg: "ls <mount point>"

When trying to do an online resize, "resize2fs" refused, saying the
filesystem was already using the full space:
--
storage ~ # resize2fs /dev/sdb1
resize2fs 1.41.9 (22-Aug-2009)
The filesystem is already 104857600 blocks long. Nothing to do! --

This was then 'resolved' by umount/mount of the filesystem:
--
storage ~ # umount /data/homes/
storage ~ # mount /data/homes/
storage ~ # resize2fs /dev/sdb1
resize2fs 1.41.9 (22-Aug-2009)
Filesystem at /dev/sdb1 is mounted on /data/homes; on-line resizing
required old desc_blocks = 25, new_desc_blocks = 29
Performing an on-line resize of /dev/sdb1 to 117964800 (4k) blocks. --

These actions were take in the domU.

The patch informs the domU about the new size, but the new size is not cascaded to all the levels.

I'm not familiar enough with the kernel internals to point to where the missing part is.

My ideal situation would allow the folliowing to work without additional steps:

dom0: lvresize -L+10G /dev/vg/foo
domU: resizefs /dev/sdb1

(with "/dev/vg/foo" exported to domU as "/dev/sdb1")

Right now, I need to do the following:
dom0: lvresize -L+10G /dev/vg/foo
domU: ls /mnt/sdb1
domU: umount /mnt/sdb1
domU: mount /mnt/sdb1
domU: resizefs /dev/sdb1

During the 2nd attempt, when trying to umount the filesystem after
increasing it again leads to the domU having a 100% I/O wait.
The logs themselves do not, however, show any usefull information.

I waited for about 30 minutes and saw no change to this situation.

Quoted 7 lines

I am afraid that for now I will revert back to not having this patch
applied and use the 'current' method of increasing the filesystem sizes.

Please let me know if there is any further testing I can help with.

--
Joost Roeleveld

Update,

After killing the domU, I saw the following in my dom0:

--
VBD Resize: new size 943718400
VBD Resize: new size 1048576000

INFO: task blkback.3.sdb1:21647 blocked for more than 480 seconds.

"echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
blkback.3.sdb D 0000000000000002 0 21647 2
ffff88002b54f550 0000000000000246 ffff88002ef08000 0000000600000000 ffff88002f9bf800 ffffffff806952c0 ffffffff806952c0 ffff88002eeee550 ffff88002b54f778 000000002eee6800 0000000000000000 ffff88002b54f778

Call Trace:
 [<ffffffff804d6ece>] printk+0x4e/0x58
 [<ffffffff804d9387>] __down_read+0x101/0x119
 [<ffffffff803d301e>] xenbus_transaction_start+0x15/0x62
 [<ffffffff803d8843>] vbd_resize+0x50/0x120
 [<ffffffff803d747c>] blkif_schedule+0x7e/0x4ae
 [<ffffffff803d73fe>] blkif_schedule+0x0/0x4ae
 [<ffffffff8023f8de>] kthread+0x47/0x73
 [<ffffffff8020b2ea>] child_rip+0xa/0x20
 [<ffffffff8023f897>] kthread+0x0/0x73
 [<ffffffff8020b2e0>] child_rip+0x0/0x20

--

Quoted 9 lines

(this was the result from "dmesg"

The ID of the domU was "3" and the device of the filesystem in the domU is "sdb1"
Eg. this matches the above error-message.

--
Joost

Update 2:
Trying to start the domU after killing it failed as the device was still listed as "in-use".

I hope all this helps, if you require any specific information, I am happy to provide it as long as the information is physically on the server. Please note, I had to reboot the physical machine to get the domU back up again and the LV has been recreated as I no longer trusted the actual file- system. (rather start 'fresh' before loading data into it then to find out there is an issue once it's filled)

--
Joost

#28 lore raw
In reply to J. Roeleveld
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines

On 3/16/2010 at 5:27 PM, in message <[email protected]>,

Quoted 116 lines · J. Roeleveld
Quoted 7 lines · On Tuesday 16 March 2010 22:24:02 J. Roeleveld wrote:
Quoted 6 lines · On Tuesday 16 March 2010 03:50:18 Ky Srinivasan wrote:
Quoted 1 line
Quoted 1 line
Quoted 1 line

On 3/14/2010 at 9:49 AM, in message

<[email protected]>, Andrew Lyon

Quoted 1 line · <[email protected]> wrote:

On Fri, Mar 12, 2010 at 10:41 AM, J. Roeleveld <[email protected]>

Quoted 74 lines · wrote:
Quoted 10 lines
Quoted 10 lines
Quoted 10 lines · On Tuesday 09 March 2010 20:56:11 Ky Srinivasan wrote:
Quoted 3 lines

The attached patch supports dynamic resizing of vbds.

Thank you for this.

The patch applied succesfully against the gentoo-xen kernel (2.6.29-xen-r4)

Quoted 7 lines
Quoted 3 lines
Quoted 1 line

I will test the patch on my system during the next week and provide

feedback.

Thanks. Looking forward to your feedback.

K. Y

Ok, finally got time to test it.
Not seen any major crashes, but my domU and filesystem did end up in an unusable state.

I also noticed that the change-entries in the logs didn't show up until I "touched" the drive.
Eg: "ls <mount point>"

When trying to do an online resize, "resize2fs" refused, saying the
filesystem was already using the full space:
--
storage ~ # resize2fs /dev/sdb1
resize2fs 1.41.9 (22-Aug-2009)
The filesystem is already 104857600 blocks long. Nothing to do! --

This was then 'resolved' by umount/mount of the filesystem:
--
storage ~ # umount /data/homes/
storage ~ # mount /data/homes/
storage ~ # resize2fs /dev/sdb1
resize2fs 1.41.9 (22-Aug-2009)
Filesystem at /dev/sdb1 is mounted on /data/homes; on-line resizing
required old desc_blocks = 25, new_desc_blocks = 29
Performing an on-line resize of /dev/sdb1 to 117964800 (4k) blocks. --

These actions were take in the domU.

The patch informs the domU about the new size, but the new size is not cascaded to all the levels.

I'm not familiar enough with the kernel internals to point to where the missing part is.

My ideal situation would allow the folliowing to work without additional steps:

dom0: lvresize -L+10G /dev/vg/foo
domU: resizefs /dev/sdb1

(with "/dev/vg/foo" exported to domU as "/dev/sdb1")

Right now, I need to do the following:
dom0: lvresize -L+10G /dev/vg/foo
domU: ls /mnt/sdb1
domU: umount /mnt/sdb1
domU: mount /mnt/sdb1
domU: resizefs /dev/sdb1

During the 2nd attempt, when trying to umount the filesystem after
increasing it again leads to the domU having a 100% I/O wait.
The logs themselves do not, however, show any usefull information.

I waited for about 30 minutes and saw no change to this situation.

Quoted 8 lines

I am afraid that for now I will revert back to not having this patch
applied and use the 'current' method of increasing the filesystem sizes.

Please let me know if there is any further testing I can help with.

--
Joost Roeleveld

Update,

After killing the domU, I saw the following in my dom0:

--
VBD Resize: new size 943718400
VBD Resize: new size 1048576000

INFO: task blkback.3.sdb1:21647 blocked for more than 480 seconds.

"echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
blkback.3.sdb D 0000000000000002 0 21647 2
ffff88002b54f550 0000000000000246 ffff88002ef08000 0000000600000000 ffff88002f9bf800 ffffffff806952c0 ffffffff806952c0 ffff88002eeee550 ffff88002b54f778 000000002eee6800 0000000000000000 ffff88002b54f778

Call Trace:
 [<ffffffff804d6ece>] printk+0x4e/0x58
 [<ffffffff804d9387>] __down_read+0x101/0x119
 [<ffffffff803d301e>] xenbus_transaction_start+0x15/0x62
 [<ffffffff803d8843>] vbd_resize+0x50/0x120
 [<ffffffff803d747c>] blkif_schedule+0x7e/0x4ae
 [<ffffffff803d73fe>] blkif_schedule+0x0/0x4ae
 [<ffffffff8023f8de>] kthread+0x47/0x73
 [<ffffffff8020b2ea>] child_rip+0xa/0x20
 [<ffffffff8023f897>] kthread+0x0/0x73
 [<ffffffff8020b2e0>] child_rip+0x0/0x20
Quoted 1 line

--

Looks like the xenbus state is corrupt - the thread servicing I/O requests on the host side is blocked on the "transaction lock". Looking at the stack, the thread did not return from the resize call. I am not sure what triggered this, but this explains the long (never-ending I/O wait you saw in the guest. Could you send me the /var/log/messages on the host when you got into this situation.

Regards,

K. Y

Quoted 14 lines

(this was the result from "dmesg"

The ID of the domU was "3" and the device of the filesystem in the domU is "sdb1"
Eg. this matches the above error-message.

--
Joost

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel

#29 lore raw
In reply to J. Roeleveld
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines

On 3/16/2010 at 5:24 PM, in message <[email protected]>,

Quoted 25 lines · J. Roeleveld
Quoted 16 lines · On Tuesday 16 March 2010 03:50:18 Ky Srinivasan wrote:
Quoted 1 line
Quoted 1 line
Quoted 1 line

On 3/14/2010 at 9:49 AM, in message

<[email protected]>, Andrew Lyon

Quoted 11 lines · <[email protected]> wrote:
Quoted 10 lines · J. Roeleveld
Quoted 3 lines · On Tuesday 09 March 2010 20:56:11 Ky Srinivasan wrote:

The attached patch supports dynamic resizing of vbds.

Thank you for this.

The patch applied succesfully against the gentoo-xen kernel (2.6.29-xen-r4)

Quoted 7 lines
Quoted 3 lines
Quoted 1 line

I will test the patch on my system during the next week and provide

feedback.

Thanks. Looking forward to your feedback.

K. Y

Quoted 7 lines

Ok, finally got time to test it.
Not seen any major crashes, but my domU and filesystem did end up in an unusable state.

I also noticed that the change-entries in the logs didn't show up until I "touched" the drive.
Eg: "ls <mount point>"

This is by design. The change made to the device on the host will be propagated to the device in the guest in the context of the dedicated thread in the host that services I/O requests for the device under question. If there is any activity on the device the size information (if it has changed) will be propagated to the guest.

Quoted 27 lines

When trying to do an online resize, "resize2fs" refused, saying the filesystem
was already using the full space:
--
storage ~ # resize2fs /dev/sdb1
resize2fs 1.41.9 (22-Aug-2009)
The filesystem is already 104857600 blocks long. Nothing to do! --

This was then 'resolved' by umount/mount of the filesystem:
--
storage ~ # umount /data/homes/

storage ~ # mount /data/homes/

storage ~ # resize2fs /dev/sdb1
resize2fs 1.41.9 (22-Aug-2009)
Filesystem at /dev/sdb1 is mounted on /data/homes; on-line resizing required old desc_blocks = 25, new_desc_blocks = 29
Performing an on-line resize of /dev/sdb1 to 117964800 (4k) blocks. --

Quoted 4 lines

These actions were take in the domU.

The patch informs the domU about the new size, but the new size is not cascaded to all the levels.

You are right. This patch only sets the capacity of the device in the guest to correctly track the capacity of the corresponding device on the host side and nothing more. So in your example, I suspect if on the host side you had mounted the LVM device, and subsequently resized the device, you would see a similar behavior as you saw here (with the patch) - you may have to umount/mount to see the changes in size and this patch is not going to address this.

Even with this restriction, I would submit it is a step in the right direction. In environments where dom0 and domu administrators are different, this patch significantly simplifies the co-ordination required to dynamically provision storage - the actions to be performed on dom0 side are independent of the actions to be performed on the domu side, and domu side may choose to do what needs to be done on the domu side when it is most convenient for the domu side.

Furthermore, applications that do not cache the metadata or applications that can be forced to re-read the metadata without having to umount/mount the device, we can have a truly dynamic environment.

Quoted 11 lines

I'm not familiar enough with the kernel internals to point to where the missing part is.

My ideal situation would allow the folliowing to work without additional steps:

dom0: lvresize -L+10G /dev/vg/foo
domU: resizefs /dev/sdb1

(with "/dev/vg/foo" exported to domU as "/dev/sdb1")

If this worked on the native physical hardware, then I would think it would work here as well.

Quoted 8 lines

Right now, I need to do the following:
dom0: lvresize -L+10G /dev/vg/foo
domU: ls /mnt/sdb1
domU: umount /mnt/sdb1
domU: mount /mnt/sdb1
domU: resizefs /dev/sdb1

This is restriction imposed by the FS.

Quoted 3 lines

During the 2nd attempt, when trying to umount the filesystem after increasing
it again leads to the domU having a 100% I/O wait.

Could you give the exact steps to reproduce this problem.

Quoted 7 lines

The logs themselves do not, however, show any usefull information.

I waited for about 30 minutes and saw no change to this situation.

I am afraid that for now I will revert back to not having this patch applied

and use the 'current' method of increasing the filesystem sizes.

Thank you for taking the time to test. Hopefully, I will be able to fix the problem you are seeing.

Regards,

K. Y

Quoted 10 lines

Please let me know if there is any further testing I can help with.

--
Joost Roeleveld

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel

#30 lore raw
In reply to Andrew Lyon
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines

On 3/14/2010 at 9:49 AM, in message

<[email protected]>, Andrew Lyon

Quoted 17 lines · <[email protected]> wrote:
Quoted 11 lines · J. Roeleveld
Quoted 4 lines · On Tuesday 09 March 2010 20:56:11 Ky Srinivasan wrote:

The attached patch supports dynamic resizing of vbds.

Thank you for this.

The patch applied succesfully against the gentoo-xen kernel (2.6.29-xen-r4)

I will test the patch on my system during the next week and provide

feedback.

Quoted 4 lines

--
Joost Roeleveld

Quoted 7 lines
Quoted 5 lines

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel

I tested the patch on xen-sources-2.6.31-r12 and it appears to work perfectly:

Thanks for the testing.

K. Y

Quoted 16 lines

dom0: VBD Resize: new size 172032
domU: Setting capacity to 172032

I extended the filesystem and filled up the available space, then extended again:

dom0: VBD Resize: new size 376832
domU: Setting capacity to 376832

fsck, badblocks, and testing a tarball I had filled the filesystem with revealed no problems, so I decided to try reducing the filesystem, first using resize2fs, then reducing the size of the block device, although some errors were logged in domU the operation seemed to work ok:

Quoted 8 lines

dom0: VBD Resize: new size 114688
domU: Setting capacity to 114688
domU: end_request: I/O error, dev sdb1, sector 212984
domU: Buffer I/O error on device sdb1, logical block 26623

I did notice that it seemed to be necessary to "poke" the device using cfdisk /dev/sdb1 before domU would notice the new size, but on the whole everything works nicely and this is a very useful new feature!

The capacity change is noticed on the back-end only when there is some activity on the device as this is done in the context of the dedicated thread.

K. Y

Quoted 7 lines

Andy

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel