How to setup LVM datastore

This is my first try to setup OpenNebula for my homelab and I struggle to add a LVM Datastore.
My setup is front-end and node installed on 1 system.
I have an extra 1TB disk which I want to add as a system datastore.
I followed the documentation but somehow I don’t see how get the 1TB disk as datastore.


Versions of the related components and OS (frontend, hypervisors, VMs):
Ubuntu 16.4
Opennebula 5.4.1.
KVM

Steps to reproduce:
Create a physical volume: pvcreate /dev/sdb
Create new volume group: vgcreate vg-one /dev/sdb
Create logical volume and use all available space: lvcreate -l 100%FREE -n system vg-one

Create ds.config
NAME = lvm_system
TM_MAD = fs_lvm
TYPE = SYSTEM_DS
VG_NAME = vg-one
BRIDGE_LIST = localhost

Create datastore
onedatastore create ds.config

Current results:
List datastores
onedatastore list
ID NAME SIZE AVAIL CLUSTERS IMAGES TYPE DS TM STAT
0 system - - 0 0 sys - ssh on
1 default 269G 94% 0 0 img fs ssh on
2 files 269G 94% 0 0 fil fs ssh on
102 lvm_system 269G 94% 0 0 sys - fs_lvm on

Expected results:
I would expect a 1TB disk if I issue the “onedatastore list” command.

@Darrell_Chin_On Have you found a solution?

2 Likes