define ephemeral disk in OpenStack and compare with persistent storage


What Is

root disk vs ephemeral disk in OpenStack. What is Ephemeral Disk. Define Ephemeral storage openstack. ephemeral disk openstack. Understanding difference between ephemeral storage and root disk. ephemeral disk in Openstack vs root disk. define ephemeral disk. Persistent storage in openstack. root disk in openstack. ephemeral storage in openstack are short lived for short time.

define ephemeral disk in OpenStack and compare with persistent storage
OpenStack recognises two types of storage: ephemeral storage and persistent storage in Openstack

 

Define ephemeral storage

  • Ephemeral storage in OpenStack is associated only to a specific Compute instance and very short lived.
  • As its name suggests, a user who actively uses a virtual machine in the OpenStack environment will lose the associated disks once the VM is terminated.
  • This type of storage is useful for basic runtime requirements, such as storing the instance’s operating system for short time such as only one day.
  • Ephemeral disks can be created and attached either locally on the storage of the hypervisor host or hosted on external storage by the means of NFS mount. Using the last option, it is possible to migrate virtual machines between multiple compute nodes since the instance root disk sits on a shared storage accessible by more than one hypervisor host.

 

Define persistent storage

  • on the other hand, persistent storage in OpenStack is designed to survive ("persist") independent of any running instance.
  • Powering off the virtual machine does not affect the data on a persistent storage in OpenStack.
  • The persistent storage in OpenStack is used for any data that needs to be reused, either by different instances or beyond the life of a specific instance.
  • We can divide persistent storage in OpenStack into three options: object storage, file share storage, and block storage with the code names Swift, Manila, and Cinder, respectively
  • I have written another article on comparison and differences between cinder and swift storage using flow charts.

 

Each instance needs at least one root disk (that contains the bootloader and core operating system files), and may have optional ephemeral disk. The content for the root disk either comes from an image stored within the Glance repository (and copied to storage attached to the destination hypervisor) or from a persistent block storage volume (via Cinder).

 

Difference between Root Disk vs Ephemeral Disk OpenStack

Root Disk:

  • The root disk contains the operating system for the image, and it is created using an image as a template.
  • If the size of the root disk is smaller than the minimum disk defined by the image, the instance is not deployed.
  • The OpenStack compute service supports the use of root disks based on OpenStack volumes in order to make root disks persistent.

 

Ephemeral Disk:

  • The ephemeral disk in a flavor defines how much additional disk space is going to be available to the instance.
  • To make this space available, a device is created in the instance.
  • The size of that device is the size defined for the ephemeral disk in the flavor.
  • This device is a raw device, so it needs to be partitioned and formatted with a file system.
  • By default, the size of an ephemeral disk in a flavor is 0 GB.

 

List Flavors in OpenStack

Below list of flavors exist on my undercloud node in OpenStack

$ openstack flavor list
+--------------------------------------+---------------+------+------+-----------+-------+-----------+
| ID                                   | Name          |  RAM | Disk | Ephemeral | VCPUs | Is Public |
+--------------------------------------+---------------+------+------+-----------+-------+-----------+
| 3cd8285a-7f9a-4176-91c5-6cc8d4b69d10 | compute       | 4096 |   20 |         0 |     1 | True      |
| 48c4e5fc-dba5-49e9-98a8-8fca11db781a | control       | 4096 |   20 |         0 |     1 | True      |
| c238e44a-d74e-4d08-91ae-33effb657005 | baremetal     | 4096 |   40 |         0 |     1 | True      |
| e3e95dfd-8a64-4cc0-a57f-bd8a133f5673 | block-storage | 4096 |   40 |         0 |     1 | True      |
| f95ea5d8-d776-4359-96ae-c5a099ddbdc1 | ceph-storage  | 4096 |   15 |         0 |     1 | True      |
| fd31fb4f-0ae5-47ce-a68f-3e5f412b503c | swift-storage | 4096 |   40 |         0 |     1 | True      |
+--------------------------------------+---------------+------+------+-----------+-------+-----------+

 

How to create a flavor with root disk and ephemeral disk in OpenStack?

Here below I am creating a flavor m1.exercise with 10 GB root disk and 2 GB Ephemeral Disk

$ openstack flavor create --vcpus 1 --ram 1024 --disk 10 --ephemeral 2 --swap 1024 m1.exercise
+----------------------------+--------------------------------------+
| Field                      | Value                                |
+----------------------------+--------------------------------------+
| OS-FLV-DISABLED:disabled   | False                                |
| OS-FLV-EXT-DATA:ephemeral  | 2                                    |
| disk                       | 10                                   |
| id                         | c8be1fd2-c3e5-4cc4-b6ec-c61a6f544f8c |
| name                       | m1.exercise                          |
| os-flavor-access:is_public | True                                 |
| properties                 |                                      |
| ram                        | 1024                                 |
| rxtx_factor                | 1.0                                  |
| swap                       | 1024                                 |
| vcpus                      | 1                                    |
+----------------------------+--------------------------------------+

 

Lastly I hope the this article on difference and comparison between root disk vs ephemeral disk in OpenStack was helpful. So, let me know your suggestions and feedback using the comment section.

 

Deepak Prasad

Deepak Prasad

He is the founder of GoLinuxCloud and brings over a decade of expertise in Linux, Python, Go, Laravel, DevOps, Kubernetes, Git, Shell scripting, OpenShift, AWS, Networking, and Security. With extensive experience, he excels in various domains, from development to DevOps, Networking, and Security, ensuring robust and efficient solutions for diverse projects. You can connect with him on his LinkedIn profile.

Can't find what you're searching for? Let us assist you.

Enter your query below, and we'll provide instant results tailored to your needs.

If my articles on GoLinuxCloud has helped you, kindly consider buying me a coffee as a token of appreciation.

Buy GoLinuxCloud a Coffee

For any other feedbacks or questions you can send mail to admin@golinuxcloud.com

Thank You for your support!!

1 thought on “define ephemeral disk in OpenStack and compare with persistent storage”

Leave a Comment