VMs: Not showing full drive space?

oguruma

Member
Mar 26, 2020
34
2
13
35
I have a 20G Ubuntu VM that I have set up with LVM. Storage is from a ZFS Pool.

My virtualmin dashboard that I installed on that VM is telling me I have used 4GB of 4.82GB drive space.


Where did the other 16G of space go?
 
What's your LVM layout inside the VM (lvs -a)? Potentially the installer only reserved what's necessary from the available disk space on the root LVM volume.
 
What's your LVM layout inside the VM (lvs -a)? Potentially the installer only reserved what's necessary from the available disk space on the root LVM volume.

LV VG Attr LSize Pool Origin Data% Meta% Move Log Cpy%Sync Convert
ubuntu-lv ubuntu-vg -wi-ao---- 4.00g

fdisk -l shows
Code:
Disk /dev/loop0: 89.1 MiB, 93417472 bytes, 182456 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes


Disk /dev/loop1: 93.9 MiB, 98484224 bytes, 192352 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes


Disk /dev/sda: 20 GiB, 21474836480 bytes, 41943040 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: gpt
Disk identifier: 6D6D35B1-F58F-4817-8E36-ADA8D209D7E8

Device       Start      End  Sectors Size Type
/dev/sda1  2048 4095 2048 1M BIOS boot
/dev/sda2     4096  2101247  2097152   1G Linux filesystem
/dev/sda3  2101248 41940991 39839744  19G Linux filesystem


Disk /dev/mapper/ubuntu--vg-ubuntu--lv: 4 GiB, 4294967296 bytes, 8388608 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
jrangel@rangelnet:~$
 
As you can see your LV for root is only 4G in size. You should be able to expand it using 'lvextend' and 'resize2fs'. See here for example.
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!