Ask Your Question

Revision history [back]

Hi p.bagherpour. When you create an instance, really you are creating a VM in an hypervisor (KVM as example). That VM have a .img file associated with it, with all data on it (operating system, files created, applications installed, etc). Types of storage in OpenStack:

  • Ephemeral: data will remain in the instance until is terminated saved in the local nova storage.
  • Persistent: data will be copied to a persistent hard drive through a connection to libvirt (ISCSi, rbd, etc).

Instance Status Actions:

  • Terminate / Delete: Terminate eliminates the instance completely. Ephemeral storage is lost, persistent storage is not lost because is not stored in the instance itself.
  • Shut down: Shut down just power off the instance, data still present when the instance is resumed.
  • Restart: Shutdown + Start, data remain.

In the hypervisor means:

  • terminate == delete all the data
  • shutdown == stop the libvirt domain
  • restart == stop and start libvirt domain

To add a little more information:

Ephemeral storage is often located locally in compute node at /var/lib/nova/instances.

Persistent storage is a connection to an external storage backend (cinder) which creates a ISCSi or rbd connection to the storage (Ceph in the case of rdb).

So, removing an instance with ephemeral storage for the OS in /dev/vda and a Cinder volume in /dev/vdb. Nova will delete ephemeral data in /var/lib/nova/instances/instance_UUID and also remove the connection present in the instance's xml to the block storage, but the data will remain in the storage backend.

Regards