# Fs\_lvm Datastore Config

**URL:** https://forum.opennebula.io/t/fs-lvm-datastore-config/2908
**Category:** Product Support
**Created:** [September 10, 2016, 2:23am UTC](https://forum.opennebula.io/t/fs-lvm-datastore-config/2908 "2016-09-10T02:23:36Z")
**Posts on this page:** 10
**Page:** 1

<div class="post-metadata">

### Author: ![ccesario](https://avatars.discourse-cdn.com/v4/letter/c/f19dbf/32.png) [@ccesario](https://forum.opennebula.io/u/ccesario)
#### Post date: [September 10, 2016, 2:23am UTC](https://forum.opennebula.io/t/fs-lvm-datastore-config/2908/1 "2016-09-10T02:23:36Z")

</div>

Hi folks,

Currenlty I’m trying configure fs\_lvm datastore according this guide  
[http://docs.opennebula.org/5.0/deployment/open\_cloud\_storage\_setup/lvm\_drivers.html](http://docs.opennebula.org/5.0/deployment/open_cloud_storage_setup/lvm_drivers.html)

But it seems that doe not working as expected, it seems that NodeHost with LVM config does not mount/read/make available the datastore using the proper VG named as documentation.

Currently my host/node are mapped the volumes using SAN. It follow the desgin.

Could someone please give me the correct direction about this config?

Thanks in advance!

Carlos

 ![](https://canada1.discourse-cdn.com/flex031/uploads/opennebula/original/2X/8/8e024f9fead81eb67eae73c9067c7288051dcb67.png)

---

<div class="post-metadata">

### Author: ![atodorov\_storpool](https://yyz1.discourse-cdn.com/flex031/user_avatar/forum.opennebula.io/atodorov_storpool/32/5327_2.png) [@atodorov\_storpool](https://forum.opennebula.io/u/atodorov_storpool)
#### Post date: [September 10, 2016, 7:22am UTC](https://forum.opennebula.io/t/fs-lvm-datastore-config/2908/2 "2016-09-10T07:22:39Z")

</div>

Hi,

Can you provide the log of the failed VM? you can find it in the frontend `/var/log/one/<VM_ID>.log`

Kind Regards,  
Anton Todorov

---

<div class="post-metadata">

### Author: ![ccesario](https://avatars.discourse-cdn.com/v4/letter/c/f19dbf/32.png) [@ccesario](https://forum.opennebula.io/u/ccesario)
#### Post date: [September 10, 2016, 11:34am UTC](https://forum.opennebula.io/t/fs-lvm-datastore-config/2908/3 "2016-09-10T11:34:12Z")

</div>

Hello Anton,

Well, I don’t have VM’s running in his environment yet.  
As you can see the main problem it seems that datastores 103 and 104 are using the FrontEnd local filesystem, instead Node Volume Groups (500 GB each).

[root@opennebula ~]# onedatastore list  
ID NAME SIZE AVAIL CLUSTERS IMAGES TYPE DS TM STAT  
0 system - - 0 0 sys - ssh on  
1 default 17.5G 90% 0 0 img fs ssh on  
2 files 17.5G 90% 0 0 fil fs ssh on  
**105 lvm\_system 17.5G 90% 0 0 sys - fs\_lvm on**  
**106 production 17.5G 90% 0 0 img fs fs\_lvm on**

All datastores has the same size.

Have you any idea abou fix it ?

best regards,

Carlos

---

<div class="post-metadata">

### Author: ![jmelis](https://yyz1.discourse-cdn.com/flex031/user_avatar/forum.opennebula.io/jmelis/32/24_2.png) [@jmelis](https://forum.opennebula.io/u/jmelis)
#### Post date: [September 13, 2016, 8:47am UTC](https://forum.opennebula.io/t/fs-lvm-datastore-config/2908/4 "2016-09-13T08:47:18Z")

</div>

When you register a new image into the datastore you should place it in the production datastore: `oneimage create ... -d production`. It will be stored as a **file** , not as an LVM.

When the VM is instantiated, this file will be dumped to a new LV in vg-one-105 (which is the system DS). You can remove vg-one-106 as it will not me used, the naming schema of vg-one- is for **system ds** ’s, not for regular image datastores.

---

<div class="post-metadata">

### Author: ![ccesario](https://avatars.discourse-cdn.com/v4/letter/c/f19dbf/32.png) [@ccesario](https://forum.opennebula.io/u/ccesario)
#### Post date: [September 13, 2016, 3:15pm UTC](https://forum.opennebula.io/t/fs-lvm-datastore-config/2908/5 "2016-09-13T15:15:19Z")

</div>

Hi @jmelis.

Thank you by your feedback.  
Yes , you are rigth, but the problem it seems the disk/dtastore it is only limited on frontend host.

---

<div class="post-metadata">

### Author: ![ccesario](https://avatars.discourse-cdn.com/v4/letter/c/f19dbf/32.png) [@ccesario](https://forum.opennebula.io/u/ccesario)
#### Post date: [September 13, 2016, 3:23pm UTC](https://forum.opennebula.io/t/fs-lvm-datastore-config/2908/6 "2016-09-13T15:23:11Z")

</div>

Well, I think that now I have discovered the problem.  
After read the code, it seems that variable BRIDGE\_LIST it is needed.

After create the datastore with **BRIDGE\_LIST** it works.

> cat ds.conf  
> NAME = lvm\_system  
> TM\_MAD = fs\_lvm  
> TYPE = SYSTEM\_DS  
> BRIDGE\_LIST = 192.168.0.43

> cat ds.conf  
> NAME = production  
> DS\_MAD = fs  
> TM\_MAD = fs\_lvm  
> DISK\_TYPE = “BLOCK”  
> TYPE = IMAGE\_DS  
> SAFE\_DIRS=“/var/tmp /tmp”  
> BRIDGE\_LIST = 192.168.0.43

---

<div class="post-metadata">

### Author: ![jmelis](https://yyz1.discourse-cdn.com/flex031/user_avatar/forum.opennebula.io/jmelis/32/24_2.png) [@jmelis](https://forum.opennebula.io/u/jmelis)
#### Post date: [September 13, 2016, 3:24pm UTC](https://forum.opennebula.io/t/fs-lvm-datastore-config/2908/7 "2016-09-13T15:24:00Z")

</div>

glad it worked!

---

<div class="post-metadata">

### Author: ![UAnton](https://yyz1.discourse-cdn.com/flex031/user_avatar/forum.opennebula.io/uanton/32/6309_2.png) [@UAnton](https://forum.opennebula.io/u/UAnton)
#### Post date: [September 18, 2016, 1:46pm UTC](https://forum.opennebula.io/t/fs-lvm-datastore-config/2908/8 "2016-09-18T13:46:50Z")

</div>

Deleted. I found problem. Image datastore not use VG. Documentation is misleading! Why create LVM IMAGE\_DS if it is not used in any way?

---

<div class="post-metadata">

### Author: ![jmelis](https://yyz1.discourse-cdn.com/flex031/user_avatar/forum.opennebula.io/jmelis/32/24_2.png) [@jmelis](https://forum.opennebula.io/u/jmelis)
#### Post date: [September 19, 2016, 8:08am UTC](https://forum.opennebula.io/t/fs-lvm-datastore-config/2908/9 "2016-09-19T08:08:12Z")

</div>

If it does say so we should remove it! As far as I can see it says that images are stored as regular files:

> Images are stored as regular files (under the usual path: /var/lib/one/datastores/) in the Image Datastore, but they will be dumped into a Logical Volumes (LV) upon virtual machine creation. The virtual machines will run from Logical Volumes in the node.

[http://docs.opennebula.org/5.0/deployment/open\_cloud\_storage\_setup/lvm\_drivers.html#datastore-layout](http://docs.opennebula.org/5.0/deployment/open_cloud_storage_setup/lvm_drivers.html#datastore-layout)

---

<div class="post-metadata">

### Author: ![miljan](https://yyz1.discourse-cdn.com/flex031/user_avatar/forum.opennebula.io/miljan/32/5119_2.png) [@miljan](https://forum.opennebula.io/u/miljan)
#### Post date: [September 15, 2018, 9:53am UTC](https://forum.opennebula.io/t/fs-lvm-datastore-config/2908/10 "2018-09-15T09:53:02Z")

</div>

Hi,

I made an identical topology as shown in figure [https://canada1.discourse-cdn.com/flex031/uploads/opennebula/original/2X/8/8e024f9fead81eb67eae73c9067c7288051dcb67.png](https://canada1.discourse-cdn.com/flex031/uploads/opennebula/original/2X/8/8e024f9fead81eb67eae73c9067c7288051dcb67.png), except that I added another KVM node.

On the opennebula frontend, I made two datastores as shown in the picture (lvm\_script with id 110 and production with id 111, in my case). I added variable BRIDGE\_LIST = node1.kvm.lvm node2.kvm.lvm.

Nodes:  
Both of my nodes are connected to SAN on the same “volume”. From it I made two partitions from which I created two LVM physical volumes. I created LVM volume groups under the name vg-one- \<system\_ds\_id\> (vg-one-110 and vg-one-111). Each volume group has one physical volume.

The question is:  
What should I do now with LVM physical volumes and LVM volume groups? Should I create a LVM logical volume and under what name? Or does it work open-nebula automatically? I do not understand the instructions:[https://docs.opennebula.org/5.4/deployment/open\_cloud\_storage\_setup/lvm\_drivers.html#datastore-layout](https://docs.opennebula.org/5.4/deployment/open_cloud_storage_setup/lvm_drivers.html#datastore-layout)  
It shows that there are LVM logical volumes.

 ![Screenshot%20(74)](https://canada1.discourse-cdn.com/flex031/uploads/opennebula/original/2X/3/36f769fd0965388d1d658f852590652794be84a2.png)

Also, it’s not clear to me which filesystem type (E.g. ext4) should be and where to mount?

The documentation says:

"_ **Frontend Setup** _

_The frontend needs to have access to the datastore images, mounting the associated directory._ "  
I do not understand what I need to mount in the frontend?

_" **Node Setup** _

_Nodes need to meet the following requirements:_

_LVM2 must be available in hosts._ OK.

_lvmetad must be disabled. Set this parameter in /etc/lvm/lvm.conf: use\_lvmetad = 0, and disable the lvm2-lvmetad.service if running._ OK.

_Oneadmin needs to belong to the disk group._ OK.

_All the nodes need to have access to the same LUNs._ OK.

_A LVM VG needs to be created in the shared LUNs for each datastore following name: vg-one- \<system\_ds\_id\>. This just needs to be done in one node._ OK.

_Virtual Machine disks are symbolic links to the block devices. However, additional VM files like checkpoints or deployment files are stored under / var / lib / one / datastores / . Be sure to have enough local space._ Ok.

_All nodes need to have access to the images and system datastores, mounting the associated directories."_ I do not understand where to mount?

Thanks in advance!

Miljan
