I've never used LVM before, after trying vgs and vgdisplay, I get nothing on on the screen, the command goes through but just blank.
Especially when running commands like lvreduce that might destroy data...especially without the needed prequisites like shrinking filesystems and partitions on that LV first.not having a grasp of the basics and trying commands blindly leads to pitfalls
Did the command reduce it by 32G or reduce it to 32G. In this case it is the same answer but I'm looking at different numbers. I couldn't find the syntax definition of "lvreduce" anywhere in the Proxmox admin guide! All I could find was "resize".excellent tutorial, a lot of fear but actually it was 2 commands:
and from 64GB it became 32GBCode:lvm lvreduce -L -32g pve/vm-103-disk-0 qm rescan
I couldn't find the syntax definition of "lvreduce" anywhere in the Proxmox admin guide!
man lvreduce show the docs to that command:-L|--size [-]Size[m|UNIT]
Specifies the new size of the LV. The --size and
--extents options are alternate methods of specifying
size. The total number of physical extents used will be
greater when redundant data is needed for RAID levels.
When the plus + or minus - prefix is used, the value is
not an absolute size, but is relative and added or
subtracted from the current size.
-34g.root@server:/mnt/storage# lvreduce -r -L 10G /dev/pve/vm-100-disk-1
fsadm: Cannot get FSTYPE of "/dev/mapper/pve-vm--100--disk--1".
Filesystem check failed.
root@server:/mnt/storage# lsblk -f /dev/pve/vm-100-disk-1
NAME FSTYPE FSVER LABEL UUID FSAVAIL FSUSE% MOUNTPOINTS
pve-vm--100--disk--1
root@server:/mnt/storage# file -L -s /dev/pve/vm-100-disk-1
/dev/pve/vm-100-disk-1: DOS/MBR boot sector
See also: https://forum.proxmox.com/threads/a...roxmox-vm-need-to-reduce-it-lvm-setup.161252/I'm new to Proxmox and recently ran into an issue with disk management. Here's the situation:
I'm new to Proxmox and recently ran into an issue with disk management. Here's the situation:
I created an Ubuntu 24 server VM with an initial disk size of 150 GB. Later, I realized I needed to add an additional 25 GB, but I accidentally extended the disk by 175 GB, bringing the total size to 325 GB.
How did you go with this ?
I too put in the new total rather than just the extraAll of the extra space remains unallocated.
Thanks
Just to be sure: You "only" changed the data inside of the virtual disk to fit into a smaller disk?Hi, I shrinked a Vm from 600GB to 320GB by load a LiveCD and shrinking via gparted. That worked fine so far, but the GUI -> VM -> Hardware still show 600GB.
How to change the displayed size?
sudo e2fsck -f /dev/sda2 && sudo resize2fs 40G /dev/sda2


zfs set volsize=56G local-vmpool/vm-102-disk-1
qm rescan

Hi, @Proxoxosudo e2fsck -f /dev/sda2 && sudo resize2fs -40G /dev/sda2
resize2fs accordingly to the documentation doesn't support negative number.man resize2fs ):df ) after that command, that the fs was really shrunk?Sorry, that was a typo, corrected it in my original post. Indeed, I checked and the fs was really shrunk.Hi, @Proxoxo
If you really issued the above command, I suspect that you didn't shring the fs, in fact.
resize2fsaccordingly to the documentation doesn't support negative number.
It must be the new size, not the difference relative to the current size (seeman resize2fs):
"The size parameter specifies the requested new size of the file system."
Have you verified (e.g. withdf) after that command, that the fs was really shrunk?
We use essential cookies to make this site work, and optional cookies to enhance your experience.