[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: RAW / Qcow disk image online resizing


  • To: Charles Koprowski <charles@xxxxxxxxxx>, "xen-users@xxxxxxxxxxxxx" <xen-users@xxxxxxxxxxxxx>
  • From: Steven C Timm <timm@xxxxxxxx>
  • Date: Thu, 23 Dec 2021 14:50:31 +0000
  • Accept-language: en-US
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=fnal.gov; dmarc=pass action=none header.from=fnal.gov; dkim=pass header.d=fnal.gov; arc=none
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=AMkEvKD7twzelAIVifUgZD+hgu8lQswWyJfb29EhXgM=; b=eS0xa99xqoJ9KeFoVjbFkmS9sbAOYrXHwNKezhJ8OFWU6HlAZlmiSFaywmBj5Domcj6LIX0HEVyqDJ5YUTWOli0/1+cOsxRDk6UbujUrE+eAo6M37Z7J+Jm1yXHs+GFMPShMGhW+CBYpaaks+P+56WAk1LD6/7p0OECfo938V9SERGsCzsyA1UFhwd5I7m7fElVZZ5OM2HxwLE89uaRt7wUPyynEvEGt5cClVZmHVpOICtRa8bp0vI3n8Kt7pLx85RuKOX+egywpgpEseZLroeyXSZfUDLRkpXS/PqsBdeLwRKGQvZPF2R1RCvknCTNtl/f9gQ7hesNa+QIqWnsPOA==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=auVYDb9s0Gy7xoSOwik7eHH+x9Ujo7ijQHrD/zRqfbeVJdoCVjqXQgDFv8yfEfp9lI7Kh651ZCHvvlS1mOY6G/H+f+26Xp1WDAMDD6nfZUPcdBAyZZFI4NOe+Gn1wx86z7YGqxq6/FytnLR34DkGWCN1fh5YsuqVj9yIUi+CD395QG/rdEDW182TKrktpKiY6rorGl1nkHVPr9EFRrlQdorVHAPvxOsz7AHTLWYsMe8QcrSPNuaIILqgquPyVj9Pyn98f6R0WV+t/6CBJ7tRe0juXZAH/yiHfB7S1RD47SiA/4fumkc7MMLy7KK/egeEC+H4zTf1GVAK+uPnREhL0Q==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=fnal.gov;
  • Delivery-date: Thu, 23 Dec 2021 14:51:33 +0000
  • List-id: Xen user discussion <xen-users.lists.xenproject.org>
  • Suggested_attachment_session_id: d9f4bf79-69fa-9aa3-f27c-36cee32e00b2
  • Thread-index: AQHX9meodsIhifgh8Uikj6dSovI5naw/+EQAgAAzC/s=
  • Thread-topic: RAW / Qcow disk image online resizing

Charles, you didn't say if the image is the boot image or an external device that's mounted by the VM.  If it's the boot image
I am almost sure you have to reboot when you extend the qcow2--actually whenever I've done it I've actually shut down before
even growing the qcow2 image and resizing the file system.  Note I haven't been running Xen for quite some time and there might be new features now of which I am unaware, but as far as I know it doesn't depend on the hypervisor you are using, KVM has same issue.

Steve Timm.

From: Xen-users <xen-users-bounces@xxxxxxxxxxxxxxxxxxxx> on behalf of Charles Koprowski <charles@xxxxxxxxxx>
Sent: Thursday, December 23, 2021 5:45 AM
To: xen-users@xxxxxxxxxxxxx <xen-users@xxxxxxxxxxxxx>
Subject: Re: RAW / Qcow disk image online resizing
 
I found from https://documentation.suse.com/fr-fr/sles/12-SP5/html/SLES-all/cha-xen-admin.html#sec-xen-config-sparse that we can propagate the new size of a RAW image with losetup.

First detect the correct loop device with the command:

losetup -j /path/to/disk.img

Then resize the loop device, for example /dev/loop0, with the following command:

losetup -c /dev/loop0

But I have not yet found an equivalent for Qcow.

Regards,

Le mar. 21 déc. 2021 à 13:34, Charles Koprowski <charles@xxxxxxxxxx> a écrit :
Hello,

Is it possible to expand the disk capacity of a domU that uses a RAW or Qcow disk image?

I usually do this with domUs whose disks are LVM volumes using lvextend from the dom0 and then resize2fs from the domU.

But when I extend a RAW or Qcow image with qemu-img extend, the new disk size is not propagated to the domU until the next reboot.

Thank you

Regards,

--
Charles


--
Charles 

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.