Disk size different between proxmox and vm

spleenftw

Member
Oct 6, 2023
56
0
6
Hello folks,

I got this VM :
1697619209716.png

So the disk size should be 128gig.

But when i run a df -h on the vm, this is what i'm seeing :

df -h Filesystem Size Used Avail Use% Mounted on udev 969M 0 969M 0% /dev tmpfs 198M 936K 197M 1% /run /dev/sda1 62G 37G 22G 63% / tmpfs 986M 0 986M 0% /dev/shm tmpfs 5.0M 0 5.0M 0% /run/lock tmpfs 198M 0 198M 0% /run/user/1001

So i wonder where the other 64gig are ?
 
Hello, could you please send us the VM configuration? This is at `/etc/pve/qemu-server/VM_ID.conf`, could you please also send us the output of `lsblk` from inside the VM?
 
Hello, could you please send us the VM configuration? This is at `/etc/pve/qemu-server/VM_ID.conf`, could you please also send us the output of `lsblk` from inside the VM?
Hey !
There you go :

Code:
root@pivoine:/etc/pve/qemu-server# cat 450.conf
agent: 1
balloon: 0
boot: order=scsi0
cores: 1
cpu: host
memory: 2048
meta: creation-qemu=7.2.0,ctime=1683909965
name: portainer
net1: virtio=82:86:6B:E4:6E:15,bridge=vmbr2,firewall=1
numa: 0
onboot: 1
ostype: l26
scsi0: ZFS_Samsung_2To:vm-450-disk-0,discard=on,iothread=1,size=128G,ssd=1
scsihw: virtio-scsi-single
smbios1: uuid=c92d86ab-48a0-42c0-b81d-e9223b954e72
sockets: 1
startup: order=3
tags: 
vmgenid: afc301f3-8ee0-4e86-ab78-309a0e38411a

Code:
ansible@Portainer:~$ lsblk

NAME   MAJ:MIN RM  SIZE RO TYPE MOUNTPOINT

sda      8:0    0  128G  0 disk

├─sda1   8:1    0   63G  0 part /

├─sda2   8:2    0    1K  0 part

└─sda5   8:5    0  975M  0 part
 
lsblk says that you indeed have a 128G drive, but the root partition only has assigned 64G. Since you have two partitions after the root partition expanding the partition might prove to be difficult. It might prove easier to make backups and start anew.
 
lsblk says that you indeed have a 128G drive, but the root partition only has assigned 64G. Since you have two partitions after the root partition expanding the partition might prove to be difficult. It might prove easier to make backups and start anew.
is there a way to easily shrink the 128G drive to 64 ?
 
There are ways, but it is a rather tricky operation. If you decide to try either to shrink the disk or expand the partition make sure you do a backup first.
 
i did an lvm lvreduce -L -64g /dev/pve/vm-450-disk-0 and then a qm rescan but there's still 128gig attached if i'm doing a lsblk, even though proxmox is showing 64gig
 
My guess would be you are running portainer on ubuntu? Because the Ubuntu installer won't use the whole disk by default unless you tell it to do so.
 
My guess would be you are running portainer on ubuntu? Because the Ubuntu installer won't use the whole disk by default unless you tell it to do so.
i think it was a 64gig disk base. Then i added 64gig one day without really using it. So i just shrunked it back to 64gig, every thing is still working perfectly.
 

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!