From: "Ky Srinivasan" Subject: Re: [PATCH]: Support dynamic resizing of vbds Date: Wed, 17 Mar 2010 09:09:50 -0600 Message-ID: <4BA09C5E02000030000816BB@sinclair.provo.novell.com> References: <4B96456B0200003000080E91@sinclair.provo.novell.com> <4B9E9D8A020000300008154C@sinclair.provo.novell.com> <201003162224.02105.joost@antarean.org> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable Return-path: In-Reply-To: <201003162224.02105.joost@antarean.org> Content-Disposition: inline List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: "J. Roeleveld" , xen-devel@lists.xensource.com List-Id: xen-devel@lists.xenproject.org >>> On 3/16/2010 at 5:24 PM, in message <201003162224.02105.joost@antarean= .org>, "J. Roeleveld" wrote:=20 > On Tuesday 16 March 2010 03:50:18 Ky Srinivasan wrote: >> >>> On 3/14/2010 at 9:49 AM, in message >>=20 >> , Andrew = Lyon >>=20 >> wrote: >> > On Fri, Mar 12, 2010 at 10:41 AM, J. Roeleveld = wrote: >> >> On Tuesday 09 March 2010 20:56:11 Ky Srinivasan wrote: >> >>> The attached patch supports dynamic resizing of vbds. >> >>> >> >>> Signed-off-by: K. Y. Srinivasan >> >> >> >> 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. >>=20 >> Thanks. Looking forward to your feedback. >>=20 >> K. Y >=20 > Ok, finally got time to test it. > Not seen any major crashes, but my domU and filesystem did end up in = an=20 > unusable state. >=20 > I also noticed that the change-entries in the logs didn't show up until = I=20 > "touched" the drive. > Eg: "ls " 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. >=20 > When trying to do an online resize, "resize2fs" refused, saying the=20 > filesystem=20 > was already using the full space: > -- > storage ~ # resize2fs /dev/sdb1 =20 > resize2fs 1.41.9 (22-Aug-2009) =20 > The filesystem is already 104857600 blocks long. Nothing to do! > -- >=20 > This was then 'resolved' by umount/mount of the filesystem: > -- > storage ~ # umount /data/homes/ = =20 > = =20 > = =20 > =20 > storage ~ # mount /data/homes/ = =20 > = =20 > = =20 > =20 > storage ~ # resize2fs /dev/sdb1=20 > resize2fs 1.41.9 (22-Aug-2009) =20 > Filesystem at /dev/sdb1 is mounted on /data/homes; on-line resizing = required > old desc_blocks =3D 25, new_desc_blocks =3D 29 = =20 > Performing an on-line resize of /dev/sdb1 to 117964800 (4k) blocks. = =20 > -- >=20 > These actions were take in the domU. >=20 > The patch informs the domU about the new size, but the new size is = not=20 > 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.=20 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. >=20 > I'm not familiar enough with the kernel internals to point to where = the=20 > missing part is. >=20 > My ideal situation would allow the folliowing to work without additional= =20 > steps: >=20 > dom0: lvresize -L+10G /dev/vg/foo > domU: resizefs /dev/sdb1 >=20 > (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. >=20 > 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 >=20 This is restriction imposed by the FS. > During the 2nd attempt, when trying to umount the filesystem after=20 > increasing=20 > it again leads to the domU having a 100% I/O wait. Could you give the exact steps to reproduce this problem.=20 > The logs themselves do not, however, show any usefull information. >=20 > I waited for about 30 minutes and saw no change to this situation. >=20 > I am afraid that for now I will revert back to not having this patch = applied=20 >=20 > 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.=20 Regards, K. Y >=20 > Please let me know if there is any further testing I can help with. >=20 > -- > Joost Roeleveld >=20 > _______________________________________________ > Xen-devel mailing list > Xen-devel@lists.xensource.com > http://lists.xensource.com/xen-devel