lvs and lvdisplays showing nothing

hdryx

New Member
Apr 5, 2024
3
0
1
Hi,

I'm new to Proxmox and i just installed my first VM.

I figured out that the space allocated to the volume was to high so i'm trying to follow this tutorial to reduce it : https://dallas.lu/pve-reduce-ubuntu-vm-disk-size/

My problem is that in the first step, the 2 commands lvs and lvdisplay (executed from SystemRescueCD) are not showing anything.

This is my Hard Disk config inside the VM :

2024-04-05_09h35_15.png

In gparted i can see the whole disk and the partitions.

What am i mission ?

Thank you for your help
 
You are storing the virtual disks as qcow2 image files on "local" and that is a directory storage and not a LVM storage or LVM-Thin storage.
So you are not seeing them as they don't use LVs.
Google how to shrink qcow2 image files.

And keep in mind that you will have to shrink the guests partitions and filesystem before shrinking a virtual disk, or you will corrupt it.
Have proper backups as shrinking virtual disks can always cause data-loss.
 
Last edited:
Thank you for your answer, and just to be sure, as i just starting into proxmox, is this a good practice to use directory storage instead of LVM ?
 
By default you can't store VMs/LXCs on "local" and the only purpose, that the "local-lvm" (LVM-Thin block storage) exists, is to store those. So, no isn't best practice but will work.
Even better would be some redundant raid with a checksumming filesystem like ZFS and/or dedicated disks/mirrors for system and VM/LXC storage.
 
Last edited:
Ok i was able to reduce the size of the disk :

i used gparted from the live disk to reduce the size of the disk then i shrink it :

Code:
qemu-img resize /var/lib/vz/images/102/vm-102-disk-1.qcow2 --shrink 42G
 

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!