MOHAMMAD MATEEN ASLAM
2009-Feb-28 14:23 UTC
[Fedora-xen] Xen to KVM Migration - How to resize LVM Partisions using KVM
Hi, I am migrating from Xen to KVM. I have created a VM which is based on LVM (/dev/VolGroupV00/vm). I have installed FC-10 on VM with swap, / and /var partisions. Now i want to resize my / and /var partisions. I have resized LVM (/dev/VolGroupV00/vm), how to resize inner partisions (/, /var) of LVM ? Can anyone guide me how KVM deals with LVM and how to manage resizing in a painless way. Regards Mohammad Mateen _________________________________________________________________ Windows Liveā¢ Contacts: Organize your contact list. http://windowslive.com/connect/post/marcusatmicrosoft.spaces.live.com-Blog-cns!503D1D86EBB2B53C!2285.entry?ocid=TXT_TAGLM_WL_UGC_Contacts_032009
Dale Bewley
2009-Mar-01 19:03 UTC
Re: [Fedora-xen] Xen to KVM Migration - How to resize LVM Partisions using KVM
On Sat, 2009-02-28 at 14:23 +0000, MOHAMMAD MATEEN ASLAM wrote:> Hi, I am migrating from Xen to KVM. I have created a VM which is > based on LVM (/dev/VolGroupV00/vm). I have installed FC-10 on VM with > swap, / and /var partisions. > > Now i want to resize my / and /var partisions. I have resized LVM > (/dev/VolGroupV00/vm), how to resize inner partisions (/, /var) of > LVM ? > > Can anyone guide me how KVM deals with LVM and how to manage resizing > in a painless way.Apparently you are not using LVM inside the guest. I would do so for flexibility. If you want to resize the guest partitions from the host, you can make your guest''s "hard drive" available in the host by using kpartx. You can then manipulate this device to resize the partitions on it. ''kpartx -av /dev/VolGroupV00/vm'' will create /dev/mapper/VolGroupV00-vm. Resize it as you would any disk (see parted, resize2fs) then remove the device mapping with ''kpartx -dv /dev/VolGroupV00/vm'' when done. See http://fedoraproject.org/wiki/Getting_started_with_virtualization#Accessing_data_on_guest_disk_images And I have some tangentially related but not directly applicable notes at http://tofu.org/drupal/node/55 http://tofu.org/drupal/node/60 Hopefully that was at least marginally helpful.