Moving thin pool somewhere else

tne

New Member
Apr 6, 2021
9
0
1
54
Hello.
I'm testing Proxmox VE and I'm in a bit of a struggle with LVs.
I have a 512GB SSD which holds the system and the default pve VG with its LVs. I have another disk, a 2TB HDD that I'd like to use for VM data. As I understood the thin pool is what holds these data.

I created a partition on the HDD, created a PV on the disk and now I'm not sure of the best way to proceed.
Since it's an HDD and not an SSD, its performance are... lower than the SSD. At first I made a new VG with the intent of creating a specific LV inside. But I don't know if the web interface would allow me to put VM data in that LV.
Then I removed that VG and instead added the PV to the pve VG so that I could extend the thin pool over the new PV. But I stopped here because I worried that the rootfs and swap could overlap on the slower HDD and that is something I don't want (for now).

What would be the best strategy to implement here ?

Thank you in advance.
 
Your first path was actually quite good. Create an LVM with thin provisioning and add it through the GUI (Datacenter -> Storage).
There you can choose "VM images" to be put there and afterwards you'll have all of Proxmox's possibilities like creating disks on it, moving disks there, etc.
 
Thanks for your reply !
I suppose I do need to create a thin pool LV on he PV/VG for the new disk ?
 
Exactly. When you add the storage, Proxmox will probably suggest the unused LV, or you have to define the path.
 
I must have done something wrong : the new LV isn't proposed for VM drives storage. Only local-lvm is selectable through the VM creation "hard drive" storage combo-box.
Here are the commands I used :
Code:
pvcreate --metadatasize 250k -y -ff /dev/sda1
vgcreate vmdata /dev/sda1
lvcreate -L 1.8T -T -c 256K -n vmstore vmdata

And the results :
Code:
# pvs
  PV             VG     Fmt  Attr PSize    PFree
  /dev/nvme0n1p3 pve    lvm2 a--  <476.44g <16.00g
  /dev/sda1      vmdata lvm2 a--    <1.82t  18.90g
# vgs
  VG     #PV #LV #SN Attr   VSize    VFree
  pve      1   3   0 wz--n- <476.44g <16.00g
  vmdata   1   1   0 wz--n-   <1.82t  18.90g
# lvs
  LV      VG     Attr       LSize    Pool Origin Data%  Meta%  Move Log Cpy%Sync Convert
  data    pve    twi-a-tz-- <349.31g             0.00   0.48
  root    pve    -wi-ao----   96.00g
  swap    pve    -wi-ao----    8.00g
  vmstore vmdata twi-a-tz--    1.80t             0.00   3.85
# pvdisplay /dev/sda1
  --- Physical volume ---
  PV Name               /dev/sda1
  VG Name               vmdata
  PV Size               <1.82 TiB / not usable <4.07 MiB
  Allocatable           yes
  PE Size               4.00 MiB
  Total PE              476931
  Free PE               4839
  Allocated PE          472092
  PV UUID               fIQZbp-LIpu-IDcF-clUj-LGKX-fWgc-TSOunx
# vgdisplay vmdata
  --- Volume group ---
  VG Name               vmdata
  System ID
  Format                lvm2
  Metadata Areas        1
  Metadata Sequence No  12
  VG Access             read/write
  VG Status             resizable
  MAX LV                0
  Cur LV                1
  Open LV               0
  Max PV                0
  Cur PV                1
  Act PV                1
  VG Size               <1.82 TiB
  PE Size               4.00 MiB
  Total PE              476931
  Alloc PE / Size       472092 / 1.80 TiB
  Free  PE / Size       4839 / 18.90 GiB
  VG UUID               Pkzg94-xAi2-Ovui-hnL3-eFty-LYR9-rvFMQb
# lvdisplay vmdata/vmstore
  --- Logical volume ---
  LV Name                vmstore
  VG Name                vmdata
  LV UUID                ev0HvJ-crjU-u1OI-gRfI-bDPS-ITMX-f4cYrh
  LV Write Access        read/write
  LV Creation host, time tne-pve, 2021-04-07 12:20:14 +0200
  LV Pool metadata       vmstore_tmeta
  LV Pool data           vmstore_tdata
  LV Status              available
  # open                 0
  LV Size                1.80 TiB
  Allocated pool data    0.00%
  Allocated metadata     3.85%
  Current LE             471860
  Segments               1
  Allocation             inherit
  Read ahead sectors     auto
  - currently set to     256
  Block device           253:7
 
Did you add the LV under Datacenter->Storage? There you can also choose what to put on that storage (VM images in that case).
 

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!