3

I extended the /home LVM volume for my KVM guest by 500G via

lvresize -v -L +500G /dev/engi/v-sbuild-home

and rebooted my guest system to update the available disk space.

After the reboot I wanted to use resize2fs to enlarge the home partition on my Debian guest. It returned with an error that the filesystem is already 104857600 blocks big and there is nothing to do for the filesystem.

I than checked in parted and fdisk how big the disk is and it still shows the old 400GiB instead of the 900 GiB. qemu-img and virt-manager on the host show the correct enlarged disk size. Is there any way to force a rescan on the guest or did I forget anything in my workflow? I resized another home partition the exact same way a few weeks before without any problems. If you need any more information please ask.

Thanks in advance for all your help.

HibikiTaisuna
  • 273
  • 2
  • 10

1 Answers1

6

Take a look at running virsh blockresize [domain] [device] --size [newsize] on the host to update its idea of the VM storage volume after extending the underlying LVM volume.

tobyd
  • 471
  • 1
  • 3
  • 12
  • Doesn't this happen on a restart of the guest as well? Libvirt already shows the correct size of the volume. EDIT: Never mind, your command did work. I thought a restart would do the same thing. Thanks for your help. – HibikiTaisuna Mar 20 '17 at 15:27
  • 3
    A restart is not enough, because it doesn't stop the qemu process. A stop/start should work though – dyasny Mar 20 '17 at 15:31
  • @HibikiTaisuna The restart of VM doesn't help. You need to shutdown VM. Libvirt daemon will reread the disk storage automatically after full shutdown of VM. Then you can start this VM. – Mikhail Khirgiy Mar 20 '17 at 15:59
  • 1
    @MikhailKhirgiy it's actually qemu-kvm, not libvirt. – dyasny Mar 20 '17 at 19:54