Any possible to use local lvm as storage backend with fs_lvm dm/tm

hi,

I just get into opennebula not long, I would like to use lvm as storage backend. but didn’t have SAN, any possible to use the host’s local lvm as storage backend? I don’t need the migrated-live or other else HA function. according to the official doc, there are alway suggest to use a shared lun for lvm’s backend.

I got 3 host, each has 2x300G sas and 3x1T sata, running centos 7.5, the one’s version is 5.6.0

There is no necessary to have SAN to use LVM as storage backend, but in production with High Load it’s strongly reccomended.

You should to do following:
On the ONE node:

  • create System and Image datastores. Don’t forget to set BRIDGET_LIST (space separated list of all yours hypervisor nodes). Examples of mentioned datastores configs present in the LVM drivers documentation.
  • put your VM image in the just created Image datastore as regular file.
  • create template that uses this image.

On the hypervisor node:

  • initialize 31T SATA as PV (physical volume) via pvcreate command.
  • initialize VG (Volume Group) with the name vg-one-<system_ds_id_got_in_ONE_node.
  • satisfy all requirements for the node (it’s need to allow oneadmin to create/destroy LV (Logical Volume).

Now, you can instantiate your template.

thank you @Yurij_Goncharuk
I will try and report back. that would be fantastic if fs_lvm dm/tm can use local host’s lvm instead of a shared storage/LUN.

I have been success setup fs_lvm on single node, but when migrate a vm from node-4 to node-5, it failed.

onevm migrate $vm-id $host-id

here is the log:

Fri Nov 16 21:42:52 2018 [Z0][TM][I]: Command execution failed (exit code: 5): /var/lib/one/remotes/tm/fs_lvm/mv node-5:/var/lib/one/datastores/106/36/disk.0 node-6:/var/lib/one/datastores/106/36/disk.0 36 107
Fri Nov 16 21:42:52 2018 [Z0][TM][E]: mv: Command "        set -ex -o pipefail
Fri Nov 16 21:42:52 2018 [Z0][TM][I]: sudo sync
Fri Nov 16 21:42:52 2018 [Z0][TM][I]: sudo lvscan
Fri Nov 16 21:42:52 2018 [Z0][TM][I]: sudo lvchange -ay "/dev/vg-one-106/lv-one-36-0"
Fri Nov 16 21:42:52 2018 [Z0][TM][I]:
Fri Nov 16 21:42:52 2018 [Z0][TM][I]: hostname -f >"/var/lib/one/datastores/106/36/.host" || :" failed: + sudo sync
Fri Nov 16 21:42:53 2018 [Z0][TM][I]: + sudo lvscan
Fri Nov 16 21:42:53 2018 [Z0][TM][I]: + sudo lvchange -ay /dev/vg-one-106/lv-one-36-0
Fri Nov 16 21:42:53 2018 [Z0][TM][I]: Failed to find logical volume "vg-one-106/lv-one-36-0"
Fri Nov 16 21:42:53 2018 [Z0][TM][E]: Error activating disk /var/lib/one/datastores/106/36/disk.0
Fri Nov 16 21:42:53 2018 [Z0][TM][E]: Error executing image transfer script: Error activating disk /var/lib/one/datastores/106/36/disk.0
Fri Nov 16 21:42:53 2018 [Z0][VM][I]: New LCM state is PROLOG_MIGRATE_FAILURE

does the fs_lvm datastore type fully support deploy on local host(not from a shared lun)