Local Storage for each host

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?

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 )

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