Hi all,
Running ubuntu18 with kvm. currently running 2 vms. each vm is ubuntu 18. Both are sitting in the /dev/lvg/vmstorage on the host server. one vm is 99G and the other is 45G.
I would like to increase the storage space in one of the VM's using LVM.
I have already increased the size of the vm image using:
on the host server, and it increased from 150G to 170G.
The current size of the vm is 99G, would like to add +20G
But I can seem to increase the size on the vm guest side:
I tried:
But it is not letting me
What do I need to do?
Running ubuntu18 with kvm. currently running 2 vms. each vm is ubuntu 18. Both are sitting in the /dev/lvg/vmstorage on the host server. one vm is 99G and the other is 45G.
Code:
root@serv:/home/admin# ls -l /var/vmstorage/
total 105637884
-rw------- 1 libvirt-qemu kvm 48325984256 Nov 21 22:22 mailserv
-rw------- 1 libvirt-qemu kvm 106316892016 Nov 21 22:22 webserv
I have already increased the size of the vm image using:
Code:
root@serv:/home/admin# qemu-img resize /var/vmstorage/webserv +20G
Image resized.
root@serv:/home/admin# lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
sda 8:0 0 1.7T 0 disk
├─sda1 8:1 0 1.9G 0 part /boot
├─sda2 8:2 0 1K 0 part
└─sda5 8:5 0 1.6T 0 part
├─LVG-root 253:0 0 4G 0 lvm /
├─LVG-usr 253:1 0 6G 0 lvm /usr
├─LVG-var 253:2 0 4G 0 lvm /var
├─LVG-tmp 253:3 0 3.5G 0 lvm /tmp
├─LVG-bak 253:4 0 7.5G 0 lvm /bak
├─LVG-srv 253:5 0 3.8G 0 lvm /srv
├─LVG-opt 253:6 0 52G 0 lvm /opt
├─LVG-home 253:7 0 1.8G 0 lvm /home
├─LVG-isostorage 253:8 0 5G 0 lvm /var/isostorage
└─LVG-vmstorage 253:9 0 170G 0 lvm /var/vmstorage
sr0 11:0 1 1024M 0 rom
sr1 11:1 1 1024M 0 rom
The current size of the vm is 99G, would like to add +20G
But I can seem to increase the size on the vm guest side:
I tried:
Code:
root@webserv:/home/admin# lvextend -l 100%FREE -r /dev/webserv-vg/root
New size of 0 not permitted.
root@webserv:/home/admin# lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
sr0 11:0 1 1024M 0 rom
vda 252:0 0 119G 0 disk
└─vda1 252:1 0 99G 0 part
├─webserv--vg-root 253:0 0 98G 0 lvm /
└─webserv--vg-swap_1 253:1 0 980M 0 lvm [SWAP]
root@webserv:/home/admin# lvextend -L+20G -r /dev/webserv-vg/root
Insufficient free space: 5120 extents needed, but only 0 available
root@webserv:/home/admin#
What do I need to do?