March 9, 20251 yr Hi everyone. As per title my problem is quite simple actually : i have a vm which has a 60G qcow2 and yet with just 30G reported by the vm OS, it's reported as full (99.9% root folder used <-- see screenshots ). What can i do to solve the problem?
March 9, 20251 yr Solution If you increased the vdisk size you forgot to also increase the partition size in the VM. Expand it in gparted.
March 9, 20251 yr Author can i do it directly inside the vm while it's live? Edit: Stupid question, all my IO and changes are blocked so no way to do it. I'll mount an ISO as a second HDD. Thank you! Edited March 9, 20251 yr by lory995
March 9, 20251 yr You have an lvm so there's yet one more step - Grow vdisk - Grow lvm - Grow partition - Grow filesystem This shows the first 2 were done, the latter 2 probably not, you have to mount the lvm to do those
March 10, 20251 yr Author To solve this i first checked the name of my root folder partition on the disk with : lory@ubuntuvm1:~$ lsblk NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT loop0 7:0 0 63.7M 1 loop /snap/core20/2434 loop1 7:1 0 55.4M 1 loop /snap/core18/2855 loop2 7:2 0 63.8M 1 loop /snap/core20/2496 loop3 7:3 0 91.9M 1 loop /snap/lxd/24061 loop4 7:4 0 55.4M 1 loop /snap/core18/2846 loop5 7:5 0 91.9M 1 loop /snap/lxd/29619 loop6 7:6 0 44.3M 1 loop /snap/snapd/23258 loop7 7:7 0 44.4M 1 loop /snap/snapd/23545 loop8 7:8 0 71M 1 loop /snap/prometheus/86 sr0 11:0 1 528M 0 rom vda 252:0 0 60G 0 disk ├─vda1 252:1 0 1.1G 0 part /boot/efi ├─vda2 252:2 0 2G 0 part /boot └─vda3 252:3 0 57G 0 part └─ubuntu--vg-ubuntu--lv 253:0 0 28.5G 0 lvm / Then: lory@ubuntuvm1:~$ sudo lvextend -l +100%FREE /dev/mapper/ubuntu--vg-ubuntu--lv Size of logical volume ubuntu-vg/ubuntu-lv changed from 28.47 GiB (7289 extents) to <56.95 GiB (14578 extents). Logical volume ubuntu-vg/ubuntu-lv successfully resized. Then: lory@ubuntuvm1:~$ sudo resize2fs /dev/mapper/ubuntu--vg-ubuntu--lv resize2fs 1.45.5 (07-Jan-2020) Filesystem at /dev/mapper/ubuntu--vg-ubuntu--lv is mounted on /; on-line resizing required old_desc_blocks = 4, new_desc_blocks = 8 The filesystem on /dev/mapper/ubuntu--vg-ubuntu--lv is now 14927872 (4k) blocks long. Mission Accomplished: lory@ubuntuvm1:~$ df -h Filesystem Size Used Avail Use% Mounted on udev 1.9G 0 1.9G 0% /dev tmpfs 392M 41M 352M 11% /run /dev/mapper/ubuntu--vg-ubuntu--lv 56G 28G 26G 52% / Thank you very much for your help @Kilrah Edited March 10, 20251 yr by lory995
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.