# Any possible to use local lvm as storage backend with fs\_lvm dm/tm

**URL:** <https://forum.opennebula.io/t/any-possible-to-use-local-lvm-as-storage-backend-with-fs-lvm-dm-tm/6635>\
**Category:** Product Support\
**Created:** [November 13, 2018, 8:13am UTC](https://forum.opennebula.io/t/any-possible-to-use-local-lvm-as-storage-backend-with-fs-lvm-dm-tm/6635 "2018-11-13T08:13:24Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![ioiioi](https://yyz1.discourse-cdn.com/flex031/user_avatar/forum.opennebula.io/ioiioi/32/4479_2.png) [@ioiioi](https://forum.opennebula.io/u/ioiioi)\
**Post date:** [November 13, 2018, 8:13am UTC](https://forum.opennebula.io/t/any-possible-to-use-local-lvm-as-storage-backend-with-fs-lvm-dm-tm/6635/1 "2018-11-13T08:13:24Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Yurij\_Goncharuk](https://yyz1.discourse-cdn.com/flex031/user_avatar/forum.opennebula.io/yurij_goncharuk/32/5826_2.png) [@Yurij\_Goncharuk](https://forum.opennebula.io/u/Yurij_Goncharuk)\
**Post date:** [November 13, 2018, 8:52am UTC](https://forum.opennebula.io/t/any-possible-to-use-local-lvm-as-storage-backend-with-fs-lvm-dm-tm/6635/2 "2018-11-13T08:52:59Z")

</div>

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](http://docs.opennebula.org/5.6/deployment/open_cloud_storage_setup/lvm_drivers.html).
- 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](http://docs.opennebula.org/5.6/deployment/open_cloud_storage_setup/lvm_drivers.html#node-setup) for the node (it’s need to allow **oneadmin** to create/destroy LV (Logical Volume).

Now, you can instantiate your template.

---

<div class="post-metadata">

**Author:** ![ioiioi](https://yyz1.discourse-cdn.com/flex031/user_avatar/forum.opennebula.io/ioiioi/32/4479_2.png) [@ioiioi](https://forum.opennebula.io/u/ioiioi)\
**Post date:** [November 13, 2018, 9:15am UTC](https://forum.opennebula.io/t/any-possible-to-use-local-lvm-as-storage-backend-with-fs-lvm-dm-tm/6635/3 "2018-11-13T09:15:58Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![ioiioi](https://yyz1.discourse-cdn.com/flex031/user_avatar/forum.opennebula.io/ioiioi/32/4479_2.png) [@ioiioi](https://forum.opennebula.io/u/ioiioi)\
**Post date:** [November 16, 2018, 1:49pm UTC](https://forum.opennebula.io/t/any-possible-to-use-local-lvm-as-storage-backend-with-fs-lvm-dm-tm/6635/4 "2018-11-16T13:49:10Z")

</div>

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

```auto
onevm migrate $vm-id $host-id

```

here is the log:

```auto
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)
