a little help with partitioning

darkchina811

New Member
Oct 30, 2022
9
1
3
Hello everybody, I have been reading for some time but this is my first post. I was able to setup two separate host each running a few VMs, and all is fine so far, but I have a problem with partitioning.

Basically the host does not have enough disk space so I cannot run updates anymore.

Here is two screenshots to understand disk usage better.

Capture01.JPG

Capture02.JPG

the disk /dev/mapper/pve-root is only 4.7 GB and I would need to enlarge that. I don't remember having given an option to make this bigger when I installed the host but it is probably my fault.

is there any way to increase this space like booting with a USB stick with GParted so that I don't have to re-install the whole host?

many thanks!
 
Hello everybody, I have been reading for some time but this is my first post. I was able to setup two separate host each running a few VMs, and all is fine so far, but I have a problem with partitioning.

Basically the host does not have enough disk space so I cannot run updates anymore.

Here is two screenshots to understand disk usage better.

View attachment 42751

View attachment 42752

the disk /dev/mapper/pve-root is only 4.7 GB and I would need to enlarge that. I don't remember having given an option to make this bigger when I installed the host but it is probably my fault.
That option is hidden behind the "Advanced Options" button hwne doing the install.
is there any way to increase this space like booting with a USB stick with GParted so that I don't have to re-install the whole host?
What's the output of lvs and vgs? Your third partition is using LVM and got a 2.4GiB swap LV and a 4.75GiB LV used as the root filesystem. But the partition itself is 19.5GiB, so the question is where the remaining 12.3 GiB are used for. Usually for the "local-lvm" LVM-thin storage, but you didn't showed us enough infos. In case it is used for that and in case you store all your guests only on that 4th ext4 partition as qcow2 files, then you could destroy that LVM-thin pool and extend the root filesystem LV.
 
thank you for your help. please tell me how to show you the missing information.

now that you mention it, I thought I chose 20 GB for the Proxmox OS partition. I myself cannot explain why the partition is almost 20 GB but only 4.7 GB in use.

you are correct I only store guests disks as qcow2 files. I would also be ok in downsizing the 4th ext4 partition as I realized that I don't need that much space.

I would like to give at least 40 GB for the Proxmox OS, can you guide me on how to do that?

I appreciate it!
 
thank you for your help. please tell me how to show you the missing information.
You type in "lvs" and "vgs" into the console and show us the output.
now that you mention it, I thought I chose 20 GB for the Proxmox OS partition. I myself cannot explain why the partition is almost 20 GB but only 4.7 GB in use.
Yes but PVE will use 3/4 of the space for guests. So you end up with 5GB for the root filesystem. Increasing it to something like 18GB should be a big problem. You will find some threads here explaining how to remove the LVM-thin pool and extend the root LV with the space you get that way.
For example here: https://forum.proxmox.com/threads/need-to-delete-local-lvm-and-reuse-the-size.34087/
you are correct I only store guests disks as qcow2 files. I would also be ok in downsizing the 4th ext4 partition as I realized that I don't need that much space.
Thats bigger problem as shrinking the ext4 partition will only free up space after the end of partition 4. But you need the space between partition 3 and 4 in order to extend the third partition with the LVM. So you would to also move that 4th partition to the end. I think I did that once with gparted. But I would always backup everything before trying such big partition/filesystem modifications.

Might be easier to just reinstall PVE with proper partitions.

By the way...why did you create a ext4 partition instead of using LVM-thin uses by default? Do you really need the features of qcow2? LVM-Thin should have less overhead, as there isn't an additional filesystem like ext4 and its not using copy-on-write. But it still got snapshot capability and thin provisioning.
 
Capture03.JPG

here you go.

I will check the link you provided, thanks.

yes Gparted will also move partitions, no problem. I would be ok with 400 GB for the last partition and all the rest for the Proxmox OS (I don't want to face this situation again in future).

I don't have an answer to your last question, it was my first attempts with Proxmox and I am self taught by just googling articles or reading forums. I have 25 years computer experience but I started with Linux and VMs just recently. I suppose that I needed the capability to import some VMs from Virtualbox and thus I needed the qcow2 format... makes sense?
 
I suppose that I needed the capability to import some VMs from Virtualbox and thus I needed the qcow2 format... makes sense?
You don't really need the qcow2 format for that. "qm importdisk" can import a qcow2 file and store it as a raw format on an LVM-thin pool.
here you go.

I will check the link you provided, thanks.
So according to your screenshot you could delete the data LV and extend the root LV by 10.38 GiB to get a 15 GiB root LV. This should be fine for most stuff. I usually recommend 16 to 32GiB just for PVE itself without space for other files like ISOs and LXC templates. 15GiB isn't that far off and might still be fine.
If you still want more space, you would need to:
-shrink the ext4 fs of partition 4
-shrink partition 4
-move partition 4 to the end
-extend partition 3
-extend the PV
-extend the VG
-extend the root LV
-extend the filesystem the root LV is using
 
1 -shrink the ext4 fs of partition 4
2 -shrink partition 4
3 -move partition 4 to the end
4 -extend partition 3
5 -extend the PV
6 -extend the VG
7 -extend the root LV
8 -extend the filesystem the root LV is using

Thank you. I numbered your list for easier reading. I guess I'll try to backup the VMs on an external USB hard drive and then try to accomplish 1 - 2 - 3 - 4 with Gparted, I am confident I can do it.

then I will get back to you because 5 to 8 are not really clear to me.
 

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!