# Local Storage for each host

**URL:** <https://forum.opennebula.io/t/local-storage-for-each-host/1458>\
**Category:** Product Support\
**Created:** [November 12, 2015, 8:47am UTC](https://forum.opennebula.io/t/local-storage-for-each-host/1458 "2015-11-12T08:47:30Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Mustafa\_Akin](https://yyz1.discourse-cdn.com/flex031/user_avatar/forum.opennebula.io/mustafa_akin/32/4371_2.png) [@Mustafa\_Akin](https://forum.opennebula.io/u/Mustafa_Akin)\
**Post date:** [November 12, 2015, 8:47am UTC](https://forum.opennebula.io/t/local-storage-for-each-host/1458/1 "2015-11-12T08:47:30Z")

</div>

Hi there, we have installed OpenNebula on 10 node + 1 controller node. Following the installation, /var/lib/one is exported o all nodes. If we leave the default config, all the VM images reside in controller node. I have created a new datastore, with ssh transfer. The new image store id is 101. However, when I create a new VM, it gets transferred to id 0 datastore, (I found with following procedure: I logged in the machine that vm resides and used virsh dumpxml to findout where it is) and of course since /var/lib/one is exported to each node, when it gets copied to datastore 0, it is actually on the controller node and the following confirms it:

```
$ df disk.1
Filesystem 1K-blocks Used Available Use% Mounted on
172.16.0.3:/var/lib/one/ 558286560 4325048 525579096 1% /var/lib/one

```

What should we do? Should we export only parts of /var/lib/one, or can we direct it to use another place?

---

<div class="post-metadata">

**Author:** ![Arash](https://avatars.discourse-cdn.com/v4/letter/a/da6949/32.png) [@Arash](https://forum.opennebula.io/u/Arash)\
**Post date:** [November 12, 2015, 10:03am UTC](https://forum.opennebula.io/t/local-storage-for-each-host/1458/2 "2015-11-12T10:03:44Z")

</div>

Hello  
I think your problem is you have a new system datastore called x and still your vms deploy on default datastore  
you have to set Base path to your datastore directory and attribute BASE\_PATH to parent datastore directory  
for example first one in /var/lib/datastores/112 and second one is /var/lib/one  
if you want to use each server storage as vms storage use lvm but better solution is using dfs as storage system use all servers storage as one storage . and then create two system datastore for image and second system ( if you need files so create one directory for that too )

---

<div class="post-metadata">

**Author:** ![ruben](https://yyz1.discourse-cdn.com/flex031/user_avatar/forum.opennebula.io/ruben/32/19_2.png) [@ruben](https://forum.opennebula.io/u/ruben)\
**Post date:** [November 20, 2015, 9:40am UTC](https://forum.opennebula.io/t/local-storage-for-each-host/1458/3 "2015-11-20T09:40:56Z")

</div>

Hi Mustafa Akin:

Please also double check that this is a system datastore… and as Arash said you may need to export manually the datastore dirs, i.e. /var/lib/one/0 and/var/lib/one/1 and not the whole /var/lib/one so /var/lib/one/101 will be local.

Cheers
