From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ross Boylan Subject: Re: expanding virtual disk based on lvm Date: Tue, 04 Sep 2012 11:58:15 -0700 Message-ID: <1346785095.4329.32.camel@corn.betterworld.us> References: <1346185598.26275.28.camel@corn.betterworld.us> <5045F9E7.70501@redhat.com> Mime-Version: 1.0 Content-Type: text/plain Content-Transfer-Encoding: 7bit Cc: ross@biostat.ucsf.edu, kvm@vger.kernel.org To: Avi Kivity Return-path: Received: from upstrm185.psg-ucsf.org ([38.99.193.74]:14157 "EHLO biostat.ucsf.edu" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1757486Ab2IDS6X (ORCPT ); Tue, 4 Sep 2012 14:58:23 -0400 In-Reply-To: <5045F9E7.70501@redhat.com> Sender: kvm-owner@vger.kernel.org List-ID: On Tue, 2012-09-04 at 15:53 +0300, Avi Kivity wrote: > On 08/28/2012 11:26 PM, Ross Boylan wrote: > > My vm launches with -hda /dev/turtle/VD0 -hdb /dev/turtle/VD1, where VD0 > > and VD1 are lvm logical volumes. I used lvextend to expand them, but > > the VM, started after the expansion, does not seem to see the extra > > space. > > > > What do I need to so that the space will be recognized? > > IDE (-hda) does not support rechecking the size. Try booting with > virtio-blk. Additionally, you may need to request the guest to rescan > the drive (no idea how to do that). Nor am I sure whether qemu will > emulate the request correctly. > Thank you for the suggestion. I think the "physical" recognition of the new virtual disk size was accomplished when I restarted the VM, without any other steps. I've had plenty of other problems, but I think at the VM level things are good. I needed to manually resize the last partition with fdisk. None of the other tools (cfdisk, parted, gparted) would manipulate the partition table, for reasons that became apparent. The resized partitions were in an mdadm RAID1 array. When I expanded them it meant the raid superblock was no longer found (theory), and the RAID could not be reassembled (fact). I've attempted to fix that by recreating the array, but mdadm is refusing to use the UUID I specify, instead modifying it with the localhost name. The virtual disks are for a Debian lenny VM, but the only other spare VM around was squeeze, and mdadm in squeeze does the localhost rewriting. By the way, it's really great to have a VM's as a testing area in which I can discover these problems without trashing my real system. Thanks to everyone who made it possible. Ross Boylan