Create a new datastore


I’ve OpenNebula with the three default datastores but I’d like to create a new one (system type and shared transfer mode). However, I don’t want the new datastore to share the space allocated for the other three ones.

What I want is that the space of the new datastore comes from a 2 TB volume which I’ve imported to a folder under /mnt which is separated from the other datastores.

I understand that all the datastores must be located under /var/lib/one/datastores. I’ve created the datastore and convert the folder 100 as a symlink to the path where the volume has been mounted. After restarting oned service, sunstone shows the new datastore with the correct space. However, now if I deploy a VM it hangs on PROLOG state.

My questions are:

  • What is the correct way for creating a new system datastore? (separated from the other ones)
  • Could I change the BASE_PATH parameter for a specific datastore? (for instance instead of creating the symlink I’d specify the mounted directory of the new datastore as the BASE_PATH parameter).
  • Does this type of datastore and transfer mode (shared and system) allow to save live copies of the VMs disks?

Thank you so much for your help,

Best regards

Hi malfonso,

Regarding the PROLOG state, could you paste the sched.log file on the Frontend Server?
I think there could be some helpful informations why it doesn’t bootup.

Best Regards

Hi Pecadis,

Thank you for your reply.

I cannot send information from shed.log because I deleted the VM and I don’t know what was its ID.

However, I deleted the datastore and I hope someone can explain (or send me a link to a good explanation) how to create a datastore with separated storage.

Thank you very much

Hi malfonso,

you can find the configuration of the datastores in /etc/one/oned.conf

#  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.
#  DATASTORE_CAPACITY_CHECK: Checks that there is enough capacity before
#  creating a new image. Defaults to Yes
#  DEFAULT_IMAGE_TYPE: This can take values
#       OS        Image file holding an operating system
#       CDROM     Image file holding a CDROM
#       DATABLOCK Image file holding a datablock, created as an empty block
#  DEFAULT_DEVICE_PREFIX: This can be set to
#       hd        IDE prefix
#       sd        SCSI
#       vd        KVM virtual disk
#  DEFAULT_CDROM_DEVICE_PREFIX: Same as above but for CDROM devices.

#DATASTORE_LOCATION  = /var/lib/one/datastores




I have also tried the symlink as you did and it worked on my hosts.

The sched.log file can be found on the Front-end server on /var/log/one/sched.log
It’s not within a VM.

I think the solution of your PROLOG problem is not within your setting of the Symlink. It could be found in the sched.log file.
I guess you have already read the docs?

Best Regards

Hi Pecadis,

I meant that since I deleted the VM, I cannot find information about it in the log because I don’t know its ID. However, I’ve looked for the content of sched.log the day I created the VM but unfortunately there is nothing.

Ok, so you created the datastore with the symlink and it worked… good! I should create it once again in order to check VM deployment.

I read the docs but it is not very clear for me. Could you check the value of BASE_PATH of your new datastore once you’ve symlink /var/lib/one/datastores/[new ID] to /mount_point?

One last question: I suppose your symlink in reality is the folder [new ID] itself which is below /var/lib/one/datastores and inside the directory there are folders for new VMs (in case it is a system datastore). Is that correct?

Thank you very much

Hi malfonso,

as i have created the datastore, one question came up. did you chown the datastore to the oneadmin user?

The Base_path value is still pointing on /var/lib/one/datastore/[datastore ID]

Best Regards

Hi Percadis,

Yes, the owner was oneadmin.

I should create once again the datastore and check if the VM is deployed correctly.

I’ll let you know.

Best regards, thank you so much

Hi malfonso,

my steps

  • create the target folder (in my example it was /mnt/113)
  • create the symlink in /var/lib/one/datastore
  • chmod both directories to oneadmin
  • create the datastore in sunstone

Hopefully it will work for you.


Hi @Pecadis,

Thank you for describing your steps, I have done them. But with some issue.
The datasource FILES and IMAGES seem correctly configured but SYSTEM not. It doesn’t show the capacity of the storage (please see image attached). Have you had this issue?