Resizing root partition and giving proxmox more space

bobalo

New Member
Mar 10, 2014
9
2
1
Hello proxmox experts. I have a issue with my dedicated server running proxmox. The provider gave us a 128 GB SSD , where only 58GB is assigned as storage in proxmox. How can I assign more storage room since 50% of my SSD is unused atm. This may be helpful :
5ttsHUY.png
 
Last edited:
although it'snot directly related to swap, see also this page for lvresize usage

http://pve.proxmox.com/wiki/Extending_Local_Container_Storage#Generic_Notes_on_lvresize

Marco
Thanks alot Marco! I was able to resize pve-data with 20GB + , however I shrinked the size of pve-root (left it with only 2GB , 1GB was used so it had 1GB free) and now proxmox is not responding.
Trying to reboot the daemon gives I/O error. Is there any way to fix this? Can't seem to resize pve-root anymore. That's what I get when messin 'round :)
 
now proxmox is not responding.Trying to reboot the daemon gives I/O error. Is there any way to fix this?

which daemon, and have you got any text error? If not try to restart the whole machine, or restart services from the command line, it could be more verbose and get some clues...

I don't know, however, if and how this could be related to pve-root free space, or total size... sorry...

Marco
 
Thanks alot Marco! I was able to resize pve-data with 20GB + , however I shrinked the size of pve-root (left it with only 2GB , 1GB was used so it had 1GB free) and now proxmox is not responding.
Trying to reboot the daemon gives I/O error. Is there any way to fix this? Can't seem to resize pve-root anymore. That's what I get when messin 'round :)

You have to resize the filesystem as well.. you just resized the underlying layer.
 
boot with a rescue cd and resize pve-root

i don't find solution without rescue cd maybe there is one

do something like :
sudo lvm vgchange -a y ; sudo e2fsck -f /dev/mapper/pve-root ; sudo resize2fs -f /dev/mapper/pve-root 30G ; sudo lvm lvreduce -L30G /dev/mapper/pve-root
 
  • Like
Reactions: majorgear
boot with a rescue cd and resize pve-root

i don't find solution without rescue cd maybe there is one

do something like :
sudo lvm vgchange -a y ; sudo e2fsck -f /dev/mapper/pve-root ; sudo resize2fs -f /dev/mapper/pve-root 30G ; sudo lvm lvreduce -L30G /dev/mapper/pve-root


3 logical volume(s) in volume group "pve" now active
-bash: /sbin/e2fsck: Input/output error
resize2fs 1.42.5 (29-Jul-2012)
Filesystem at /dev/mapper/pve-root is mounted on /; on-line resizing required
old_desc_blocks = 2, new_desc_blocks = 2
resize2fs: Read-only file system While checking for on-line resizing support
Positive sign not permitted - use lvextend
Run `lvreduce --help' for more information.

I'll try with the rescue CD
 
  • Like
Reactions: majorgear
Thanks for writing this.

However, the last lvconvert command gave me an error:
Code:
# lvconvert --type thin-pool pve/data
  Command on LV pve/data does not accept LV type thinpool.
  Command not permitted on LV pve/data.
#

Any thoughts?
Ran into the same issue.
Did you find a solution?
 
Ran into the same issue.
Did you find a solution?
It's been a while since I came across this, but I think I just ignored it. If I remember well, the error was reported because pve/data is already configured as thin-pool, so conversion to the same type is non-sensical (at least that's what lvconvert thinks).
 
I am in the same situation where I ran out of space but I have the problem that Proxmox and a VM are on the same NVMe.
So the LV data contains a VM which is occupying about 45% of the 900Gb while I assigned around 100G to the proxmox installation.
Does this method create problems, like erasing data or it is safe? Maybe just to have a backup just in case?

I run into this issue while I was storing data on TrueNAS (installed on another NVMe) on another HDD. I run out of space in pve/root and I got lock out of proxmox, so I had to delete bunch of software to free up some space. At the moment I am at this point and that's why I want to add more room to pve/root.

/dev/mapper/pve-root 98497780 85636608 7811624 92% /


Screenshot 2023-02-11 at 1.21.40 PM.png

Screenshot 2023-02-11 at 1.56.04 PM.png

would this work for me resizing data to 650G and give the rest to pve/root? As I understand the lvremove will not delete my VM but just the metadata underlying. So it safe for me to do this?

Code:
# Remove pve-data logical volume.
lvremove /dev/pve/data -y

# Create it again with a new size.
lvcreate -L 650G -n data pve -T

# Give pve-root all the other size.
lvresize -l +100%FREE /dev/pve/root

# Resize pve-root file system
resize2fs /dev/mapper/pve-root



The doc is great btw!
thxs
 
Last edited:
WARNING: The commands provided in the Google Docs document is going to cause data loss!

Be sure to backup all machines on this host on another storage!
 

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!