OpenStack storage types
There are different types of storage in OpenStack: ephemeral storage and persistent volumes. It’s important you understand the difference so you can best determine which type to use. This guide explains the differences between the two. It also describes two varieties of persistent storage you can use.
This type of storage is associated with a single unique instance. It exists only as long as the instance itself. It’s generally used for the root file system and operating system of the instance. The size and amount of ephemeral storage is determined by the flavor of the instance and the image used. Ephemeral storage persists as long as the instance isn’t deleted; it will not be lost and reset due to reboots.
Persistent volumes are manually created by users. Their size is determined by the user. Upon creation it’s raw data, but it can be attached (mounted) to instances and partitioned and formatted. They are used as if they are an external hard drive. They can only be attached to a single instance at once, although you can detach and reattach them to different instances.
Persistent volumes can be configured to be bootable to provide to persistent virtual image. They do not provide concurrent access from multiple instances. That requires additional configuration such as NFS or a cluster file system like GlusterFS.
Persistent volumes can be created in two different varieties: object storage and block storage.
With object storage, users access binary objects through a URL or REST API. It’s great for archiving or managing large datasets, you want to provide them with object storage. In addition, as an alternative to storing the images on a file system, OpenStack can store your virtual machine images inside of an object storage system, as well as back-ups and large media files.
Block storage provides users with access to persistent block-storage devices, which they can attach to running instances. They offer high performance and I/O and are ideal for resource intensive applications such as many databases. Block storage is also very effective for archiving large amounts of files.
OpenStack storage comparison
|Ephemeral storage||Block storage||Object storage|
|Used to||Run operating system and scratch space||Add additional persistent storage to a VM||Store data, including VM images|
|Accessed through||A file system||A block device that can be partitioned, formatted, and mounted||A REST API|
|Accessible from||Within a VM||Within a VM||Anywhere|
|Persists until||VM is terminated||Deleted by user||Deleted by user|