I got a problem with OpenNebula 4.14. If I create a datastore via the dashboard (sunstone) wizard (not tested CLI) it ignores the BASE_PATH and instead creates the datastore in /var/lib/one/datastores/.
I checked sched.log and oned.log for permission errors but didn’t find anything. User oneadmin is also the owner of those folders.
hosts are h0, h1 and controller and h0 and h1 are in one cluster.
I want to create a datastore in /srv/datastores/ on h0.
I mounted /srv/datastores/ from h0 on h1 and controller via NFS.
Now, if i create a datastore with BASE_PATH set to /srv/datstores/ it creates the datastore in /var/lib/one/datastores/ on the controller instead of /srv/datastores/ on h0.
/var/lib/one/ is physically on the controller but mounted on both h0 and h1 via NFS.
I got a problem with OpenNebula 4.14. If I create a datastore via the
dashboard (sunstone) wizard (not tested CLI) it ignores the BASE_PATH
and instead creates the datastore in /var/lib/one/datastores/.
I checked sched.log and oned.log for permission errors but didn’t
find anything. User oneadmin is also the owner of those folders.
hosts are h0, h1 and controller and h0 and h1 are in one cluster.
I want to create a datastore in /srv/datastores/ on h0.
I mounted /srv/datastores/ from h0 on h1 and controller via NFS.
Now, if i create a datastore with BASE_PATH set to /srv/datstores/
it creates the datastore in /var/lib/one/datastores/ on the
controller instead of /srv/datastores/ on h0.
/var/lib/one/ is physically on the controller but mounted on both h0 and h1 via NFS.
You should take a thorough read of the documentation:
DATASTORE_LOCATION : Path for Datastores. It IS the same for all the hosts and front-end. It defaults to /var/lib/one/datastores (in self-contained mode defaults to $ONE_LOCATION/var/datastores). Each datastore has its own directory (called BASE_PATH) in the form: $DATASTORE_LOCATION/<datastore_id> . You can symlink this directory to any other path if needed. BASE_PATH is generated from this attribute each time oned is started.
In short - the BASE_PATH is a generated variable and you should use symlinks instead. I’d recommend to use separate symlink for each BASE_PATH.
Following your question you should create directories with the datastore_ids and symlinks to them in the DATASTORE_LOCATION. Lets say for example you have a SYSTEM datastore with ID 100 and an IMAGE datastore with ID 101 both with TM_MAD set to shared.