How to add a new disk as LVM-thin remove the LVM-thin from previous disk?

FiNaR

New Member
Sep 23, 2021
24
2
3
53
Hello,

I have just added a new ssd (NVME) to my Proxmox server and I am confused on how to set this new disk as LVM-thin

Architecture/Configuration:
  • NUC i7
  • Primary Disk (where proxmox is installed): SATA 500GB
  • Additional Disk (Newly added): NVME 1TB
from the web-interface I have:
  • wiped the disk
  • initialized with GPT
Now I am staked on what's next....

The desire (and I do not know if it is a good idea or not), is to have the new disk dedicated to LVM-thin, while leaving the SATA for Proxmox os + all ISO images, therefore I would like to:
  • remove the LVM-thin partition form the SATA
  • add the LVM-thin to NVME
Questions:
  • does it make sense my ask?
  • if yes, how to I achieve the end result?

1654934426107.png
 
Hi,

the setup always depends on what you are planning todo :). Sometimes it might make sense to split the IO load of the VMs over different disks.

For the new disk, you would create a new LVM-Thin and then add it under Datacenter/Storage to your available storage. You can then move your existing vm disks onto the new storage via selecting a VM/Hardware/Disk Action/Move Storage/
 
the setup always depends on what you are planning todo :). Sometimes it might make sense to split the IO load of the VMs over different disks.

For the new disk, you would create a new LVM-Thin and then add it under Datacenter/Storage to your available storage. You can then move your existing vm disks onto the new storage via selecting a VM/Hardware/Disk Action/Move Storage/
thank you, considering my "small" environment (just one node on an Intel NUC) I was thinking to give all "the ssd nvme speed" to the VMs, hence the desire to dedicate the nvme to LVM-thin....

I do not need to move any image, because I have started from scratch... what I had before to install the new nvme was just playing around/testing...

Now I have clear ideas on what to do, but I am not too sure how to "execute it" :)

Following your suggestion:

  • you would create a new LVM-Thin --> do you mean "thin pool"? ?
  • add it under Datacenter/Storage --> this is clear
I kind of get the process, but I have two doubt:

  • instead of creating a new thin pool, can I extend the existing one so that the local-lvm (PVE) thin pool includes the nvme as well?
  • once "extended" or created new, how to I remove the lvm-thin form the SATA SSD and extend the space for ISO images?
my desire, as end result is:

  • SSD SATA (local (pve)): running proxmox os + storing ISO images
  • SSD NVME (local-lvm (pve)): VMs
any support is much appreciated :)

Thank you
 
Hi,

with lvm-thin I mean a thin pool :)

I'm not sure why you want to extend the existing lvm pool to include the NVMe and then remove the SATA drive. You can just remove the local-lvm storage and create a new storage on the nvme with the same name ;). Would be much less fidling around with LVM.
 
with lvm-thin I mean a thin pool :)

perfect, then we are aligned :)

I'm not sure why you want to extend the existing lvm pool to include the NVMe and then remove the SATA drive. You can just remove the local-lvm storage and create a new storage on the nvme with the same name ;). Would be much less fidling around with LVM.
you are right... I was overcomplicating things!

do you suggest to:
  • remove the local-lvm from SATA --> how do I do that? do you have any terminal commands for this?
    • this will leave the SATA with an empty space... how will I extend the "ISO image" space to this "empty space"?
  • ad second step create the thin pool and add it in storage
it actually makes more sense :) just wondering if you can help on how to remove the local-lvm from SATA and then "fill in the empty space left...

Thank you
 
Hi,
for the SATA drive, you can remove the old Logical volume via the GUI and then resize the root partition:

Code:
# add one Gigabyte to root LV
lvresize -L +1G pve/root

# resize ext4 partition
resize2fs /dev/mapper/pve-root

This would increase the space for the root mount, you need to check your Volume group (pve) and logical volume (pve-root) names to get the right LV to resize.
 
SATA drive, you can remove the old Logical volume via the GUI

do you mean just selecting the LVM partition and clicking "Wipe Disk"?

out of curiosity, what exactly contains in LVM? where the ISO images are stored?

1655286877248.png


luckily I am still highly testing, hence breaking everything would be ok :)
 
Very bad idea doing that, this is where your root partition lives as well ;).

You can check under Datacenter/Storage/local-lvm you should see the the name of the thin pool and the volume group:
1655287284148.png

Under node/Disks/LVM-Thin there should be a data logical volume named "data" in my case that you can delete.
 
  • Like
Reactions: melroy89

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!