[SOLVED] Storage: Combining Smaller SSD's to Create One Larger Storage Repository

epretorious

New Member
Jan 19, 2024
21
3
3
practicalxenserver.info
I have two unused smaller SSD's that I'd like to combine to create one larger storage repository.

Is that possible? e.g., Is it possible to combine the SSD's using LVM and then to create a storage repository using the entire LVM volume group / logical volume?

TIA,
Eric Pretorious
Reno, Nevada
 
Last edited:
Something like this:
Code:
bb vss provision -c 8GiB --with-disk
== Created vss: service-79 (VSS1862194C406018B5)

== VSS: service-79 (VSS1862194C406018B5)
label                 service-79
serial                VSS1862194C406018B5
uuid                  f7df115c-77a5-4731-a3e6-ca9359a8a4a7
created               2024-01-24 17:41:25 -0500
status                online
current time          2024-01-24T22:41+00:00

bb vss provision -c 8GiB --with-disk
== Created vss: service-80 (VSS1862194C406018AD)

== VSS: service-80 (VSS1862194C406018AD)
label                 service-80
serial                VSS1862194C406018AD
uuid                  5ea836bc-0e00-4a6d-8477-0bf24f80ffa4
created               2024-01-24 17:41:28 -0500
status                online
current time          2024-01-24T22:41+00:00

 bb host attach -d service-79/disk-1
================================================================
service-79/disk-1 attached (read-write) to pve7demo1 as /dev/sdc
================================================================

bb host attach -d service-80/disk-1
================================================================
service-80/disk-1 attached (read-write) to pve7demo1 as /dev/sdd
================================================================

pvcreate /dev/sdc
  Physical volume "/dev/sdc" successfully created.
 
pvcreate /dev/sdd
  Physical volume "/dev/sdd" successfully created.
 
vgcreate ds1 /dev/sdc /dev/sdd

lvcreate -L 15G -n ds1 ds1
  Logical volume "ds1" created.
 
lvconvert --type thin-pool ds1/ds1
  Thin pool volume with chunk size 64.00 KiB can address at most <15.88 TiB of data.
  WARNING: Converting ds1/ds1 to thin pool's data volume with metadata wiping.
  THIS WILL DESTROY CONTENT OF LOGICAL VOLUME (filesystem etc.)
Do you really want to convert ds1/ds1? [y/n]: y
  Converted ds1/ds1 to thin pool.
 
 pvesm add lvmthin  --content images,rootdir --vgname ds1 --thinpool ds1 ds1
 
pvesm alloc ds1 3002 vm-3002-disk-1 1G
  Logical volume "vm-3002-disk-1" created.
successfully created 'ds1:vm-3002-disk-1'

pvesm status
Name             Type     Status           Total            Used       Available        %
bb-iscsi   blockbridge     active    274877906944       122159104    274755747840    0.04%
bb-nvme    blockbridge     active    274877906944       122159104    274755747840    0.04%
ds1           lvmthin     active        15728640               0        15728640    0.00%
local             dir     active        13162912         9523368         3002708   72.35%
local-lvm     lvmthin     active         7340032               0         7340032    0.00%
nfs               nfs     active       176820224        26423552       150396672   14.94%
pbsdemo           pbs     active        32716560         2811016        28211440    8.59%

https://pve.proxmox.com/wiki/Storage:_LVM_Thin

Blockbridge : Ultra low latency all-NVME shared storage for Proxmox - https://www.blockbridge.com/proxmox
 
Something like this:
Code:
bb vss provision -c 8GiB --with-disk
== Created vss: service-79 (VSS1862194C406018B5)

== VSS: service-79 (VSS1862194C406018B5)
label                 service-79
serial                VSS1862194C406018B5
uuid                  f7df115c-77a5-4731-a3e6-ca9359a8a4a7
created               2024-01-24 17:41:25 -0500
status                online
current time          2024-01-24T22:41+00:00

bb vss provision -c 8GiB --with-disk
== Created vss: service-80 (VSS1862194C406018AD)

== VSS: service-80 (VSS1862194C406018AD)
label                 service-80
serial                VSS1862194C406018AD
uuid                  5ea836bc-0e00-4a6d-8477-0bf24f80ffa4
created               2024-01-24 17:41:28 -0500
status                online
current time          2024-01-24T22:41+00:00

 bb host attach -d service-79/disk-1
================================================================
service-79/disk-1 attached (read-write) to pve7demo1 as /dev/sdc
================================================================

bb host attach -d service-80/disk-1
================================================================
service-80/disk-1 attached (read-write) to pve7demo1 as /dev/sdd
================================================================

pvcreate /dev/sdc
  Physical volume "/dev/sdc" successfully created.
 
pvcreate /dev/sdd
  Physical volume "/dev/sdd" successfully created.
 
vgcreate ds1 /dev/sdc /dev/sdd

lvcreate -L 15G -n ds1 ds1
  Logical volume "ds1" created.
 
lvconvert --type thin-pool ds1/ds1
  Thin pool volume with chunk size 64.00 KiB can address at most <15.88 TiB of data.
  WARNING: Converting ds1/ds1 to thin pool's data volume with metadata wiping.
  THIS WILL DESTROY CONTENT OF LOGICAL VOLUME (filesystem etc.)
Do you really want to convert ds1/ds1? [y/n]: y
  Converted ds1/ds1 to thin pool.
 
 pvesm add lvmthin  --content images,rootdir --vgname ds1 --thinpool ds1 ds1
 
pvesm alloc ds1 3002 vm-3002-disk-1 1G
  Logical volume "vm-3002-disk-1" created.
successfully created 'ds1:vm-3002-disk-1'

pvesm status
Name             Type     Status           Total            Used       Available        %
bb-iscsi   blockbridge     active    274877906944       122159104    274755747840    0.04%
bb-nvme    blockbridge     active    274877906944       122159104    274755747840    0.04%
ds1           lvmthin     active        15728640               0        15728640    0.00%
local             dir     active        13162912         9523368         3002708   72.35%
local-lvm     lvmthin     active         7340032               0         7340032    0.00%
nfs               nfs     active       176820224        26423552       150396672   14.94%
pbsdemo           pbs     active        32716560         2811016        28211440    8.59%

https://pve.proxmox.com/wiki/Storage:_LVM_Thin

Blockbridge : Ultra low latency all-NVME shared storage for Proxmox - https://www.blockbridge.com/proxmox

What is all of that?!

WTH,
Eric P.
 
What is all of that?!
Eric, I apologize about confusion. Let me break this down and annotate the commands for easier consumption.

1) Since I am using a virtualized installation of PVE and do not have SAS disks attached, I am going to use Blockbridge storage to attach two iSCSI disks using Blockbridge CLI. These will be the basis disks from which we will later create our PVE storage. These commands are not available to you since you are not running Blockbridge storage:
bb vss provision -c 8GiB --with-disk
== Created vss: service-79 (VSS1862194C406018B5)

== VSS: service-79 (VSS1862194C406018B5)
label service-79
serial VSS1862194C406018B5
uuid f7df115c-77a5-4731-a3e6-ca9359a8a4a7
created 2024-01-24 17:41:25 -0500
status online
current time 2024-01-24T22:41+00:00

bb vss provision -c 8GiB --with-disk
== Created vss: service-80 (VSS1862194C406018AD)

== VSS: service-80 (VSS1862194C406018AD)
label service-80
serial VSS1862194C406018AD
uuid 5ea836bc-0e00-4a6d-8477-0bf24f80ffa4
created 2024-01-24 17:41:28 -0500
status online
current time 2024-01-24T22:41+00:00

bb host attach -d service-79/disk-1
================================================================
service-79/disk-1 attached (read-write) to pve7demo1 as /dev/sdc
================================================================

bb host attach -d service-80/disk-1
================================================================
service-80/disk-1 attached (read-write) to pve7demo1 as /dev/sdd
================================================================

2) The next step is to create physical LVM volumes on our two new disks. Although you may be familiar with how LVM functions, other forum members may benefit from the full procedure:
pvcreate /dev/sdc
Physical volume "/dev/sdc" successfully created.

pvcreate /dev/sdd
Physical volume "/dev/sdd" successfully created.

3) The next step is to combine our two PVs into a single Volume Group (VG). This directly relates to your original query:
vgcreate ds1 /dev/sdc /dev/sdd

4) Next we need to create a Logical Volume pool and optionally convert it to Thin Pool. The second part may not be applicable, especially if you plan to run your SAS storage as Shared.
lvcreate -L 15G -n ds1 ds1
Logical volume "ds1" created.

lvconvert --type thin-pool ds1/ds1
Thin pool volume with chunk size 64.00 KiB can address at most <15.88 TiB of data.
WARNING: Converting ds1/ds1 to thin pool's data volume with metadata wiping.
THIS WILL DESTROY CONTENT OF LOGICAL VOLUME (filesystem etc.)
Do you really want to convert ds1/ds1? [y/n]: y
Converted ds1/ds1 to thin pool.

5) Now that the prep work is done we finally get to PVE commands that you asked about. Specifically this command adds PVE storage object of thin-lvm type to your PVE configuration:
pvesm add lvmthin --content images,rootdir --vgname ds1 --thinpool ds1 ds1

6) We are now able to create VM images (disks) on our new storage. The command below manually allocates a disk
pvesm alloc ds1 3002 vm-3002-disk-1 1G
Logical volume "vm-3002-disk-1" created.
successfully created 'ds1:vm-3002-disk-1'

7) We can also show status of our newly created storage:
pvesm status
Name Type Status Total Used Available %
ds1 lvmthin active 15728640 0 15728640 0.00%

I hope this clarifies things and helps in your configuration. Note that steps 5 through 7 can also be done from PVE GUI if you feel more comfortable there: Datacenter>Storage>Add

Sincerely.



Blockbridge : Ultra low latency all-NVME shared storage for Proxmox - https://www.blockbridge.com/proxmox
 
Creating disks using blockbridge (you can ignore that), then the LVM stuff you said you already know and at the end adding a LVM-Thin storage in PVE.
 

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!