I’m a bit confused with persistent volumes in OpenShift and I’m wondering what happens if a pod with a persistent volume fails, is that volume lost forever? Is it possible to migrate a volume to another pod when that pod fails? If so, which kind of persistent volume supports migration?
OpenShift does not provide persistent storage itself; this is something that you need to provide in a production installation.
You have many options for persistent storage, but the most commonly used are NFS, iSCSI or Fibre Channel. What to use depends on what storage you have available or what you design.
Any persistent storage backend is going to be persistent, and will be usable by a pod after it is stopped and restarted. That is what the word persistent means. There is no need to “migrate” storage; such a function, if necessary, is provided by the storage and is invisible to OpenShift.
Note well that most persistent storage can only be used by one pod at a time. This is fine for most applications, but some things will need persistent storage that can be used by multiple pods at the same time. For storage that can be shared between multiple pods, you can only use NFS or GlusterFS. So your storage will most likely need to provide both block storage (e.g. iSCSI or Ceph) and file storage (e.g. NFS or GlusterFS).
This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.