Storage Creation (Datastore) in Open nebula

Hi,
Can anyone please help me to how can I create the local datastore in the KVM host and map it into the open nebula step by step, I followed the doc but it is not working for me…
I have done the below steps.
create lvm volume with xfs filesystem on it and its 4TB volume mounted as /vms, how can I map this /vm in the open nebula and use it for the VMs? I know this will be the System datastore which will hold the VMs.
Please help me

Hello @Nimesis,

Welcome to this forum, hope we can help you as much as possible.

First I would suggest to check our documentation:
https://docs.opennebula.io/6.10/open_cluster_deployment/storage_setup/local_ds.html
https://docs.opennebula.io/6.10/open_cluster_deployment/storage_setup/nas_ds.html

Where you can probably find some information about how to proceed.

However, you should ensure your LVM volume is properfly formatted with the xfs filesystem, and mounted at /vms

Then you’ll need to create a symbolic link:

  • OpenNebula stores datastores in /var/lib/one/datastores/<DATASTORE_ID>.
  • To utilize your existing /vms mount point, create a symbolic link from the intended datastore directory to /vms.

You will need to define and verify the Datastore Template. To be able to deploy it later.

In any case, if you need more help, or the Documentation is not clear enough, feel free to comment, and we will try to guide you better.

Cheers,

Hi,

Thanks for sharing the steps… I followed the below steps.

KVM Host side.
[root@opennebula-kvm ~]# df -hT /vms
Filesystem Type Size Used Avail Use% Mounted on
/dev/mapper/vmsvg-vmslv xfs 4.4T 32G 4.4T 1% /vms
[root@opennebula-kvm ~]#

ln -s /vms /var/lib/one/datastores/300
[root@opennebula-kvm ~]# ls -l /var/lib/one/datastores/
total 0
drwxrwxr-x. 4 oneadmin oneadmin 40 Jan 16 16:31 0
drwxrwxr-x. 3 oneadmin oneadmin 31 Jan 17 13:44 100
lrwxrwxrwx. 1 root root 4 Jan 23 15:26 300 → /vms ==> No9t sure the owner and group will be oneadmin or not.

Opennebula Host:
oneadmin@open-nebula:~$ cat local-datastore.conf
NAME = “kvm-local”
TM_MAD = “ssh”
TYPE = “SYSTEM_DS”
BASE_PATH = “/var/lib/one/datastores/300”
CLUSTER = “default”
oneadmin@open-nebula:~$

oneadmin@open-nebula:~$ onedatastore list
ID NAME SIZE AVA CLUSTERS IMAGES TYPE DS TM STAT
100 kvm-local - - 0 0 sys - ssh on
2 files 34.6G 62% 0 0 fil fs ssh on
1 default 34.6G 62% 0 1 img fs ssh on
0 system - - 0 0 sys - ssh on

I don’t know why the type (System) is not showing the size of the datastore I assume it should show the 4TB :frowning:

Regards.

Hello @Nimesis,

If you need to re-review the monitoring, check the logs:
https://docs.opennebula.io/6.10/installation_and_configuration/opennebula_services/monitoring.html#service-control-and-logs

To help increase verbosity, you can take a look into this:

Hope it helps.

Cheers,