anchor.diff:  toc::[]
   
   == Overview
  -OpenShift can utilize persistent storage using Block Storage
  -like Ceph RBD. Some familiarity with Kubernetes and Docker is assumed. It is
  -also assumed that there is access to an existing Ceph cluster and volume,
  -and that *ceph-common* package has been installed on all OpenShift nodes in the
  -cluster.
  -
  -The Kubernetes
  -link:../../architecture/additional_concepts/storage.html[persistent volume]
  -framework allows administrators to provision a cluster with persistent storage
  -and gives users a way to request those resources without having any knowledge of
  -the underlying infrastructure. Persistent volumes are not bound to a single
  -project or namespace; they can be shared across the OpenShift cluster.
  -link:../../architecture/additional_concepts/storage.html#persistent-volume-claims[Persistent
  -volume claims], however, are specific to a project or namespace and can be
  -requested by users.
  +
  +OpenShift clusters can be provisioned with
  +link:../../architecture/additional_concepts/storage.html[persistent storage]
  +using Ceph RBD. Persistent volumes (PVs) and persistent volume claims (PVCs) provide
  +a convenient method for sharing a volume across a project. While the
  +Ceph RBD specific information contained in a PV definition could also be defined
  +directly in a pod definition, doing so does not create the volume as a distinct
  +cluster resource, making the volume more susceptible to conflicts.
  +
  +This topic covers the specifics of using the Ceph RBD persistent storage type. Some
  +familiarity with OpenShift and
  +https://access.redhat.com/products/red-hat-ceph-storage[Ceph RBD] is beneficial.
  +See the
  +link:../../architecture/additional_concepts/storage.html[Persistent Storage]
  +concept topic for details on the OpenShift persistent volume (PV) framework in general.
  +
  +[NOTE]
  +====
  +_Project_ and _namespace_ are used interchangeably throughout this document. See
  +link:../../architecture/core_concepts/projects_and_users.html#namespaces[Projects
  +and Users] for details on the relationship.
  +====
   
   [IMPORTANT]
   ====
  
positive.code: ----
  ====
  
  Users can then link:../../dev_guide/persistent_volumes.html[request storage
  using persistent volume claims], which can now utilize your new persistent
  volume.
  
  [IMPORTANT]
  ====
  Persistent volume claims only exist in the user's namespace and can only be
  referenced by a pod within that same namespace. Any attempt to access a
  persistent volume from a different namespace causes the pod to fail.
  ====
  
negative.code: ====
  
  [[ceph-provisioning]]
  == Provisioning
  
  Storage must exist in the underlying infrastructure before it can be mounted as
  a volume in OpenShift. To provision Ceph volumes in OpenShift, the following
  information is required:
  
  - The ceph key to be used in an OpenShift secret object.
  - The ceph image name.
  - The file system type on top of the block storage (e.g., ext4).
  
  You must also ensure that the *ceph-common* package is installed on *_all_*
  schedulable OpenShift nodes:
  
  ----
  # yum install ceph-common
  ----
  
  [[creating-ceph-secret]]
  === Creating the Ceph Secret
  
  In a secret definition, the storage administrator must define the admin authorization key,
  which is then converted to base-64 for use by OpenShift. The `ceph auth get-key` command
  is run on a Ceph MON node to display the key value for the _client.admin_ user:
  
  .Ceph Secret Definition
  ====
  [source,yaml]
  ----
  apiVersion: v1
  kind: Secret
  metadata:
    name: ceph-secret
  data:
    key: QVFBOFF2SlZheUJQRVJBQWgvS2cwT1laQUhPQno3akZwekxxdGc9PQ== <1>
  
  ----
  <1> this base64 key is generated on one of the Ceph MON nodes using the following command:
    `ceph auth get-key client.admin | base64`
  and then copying the output and pasting it as the secret key's value.
  ====
  
  Save the secret definition to a file, for example *_ceph-secret.yaml_*,
  then create the secret:
  
  ====
  ----
  $ oc create -f ceph-secret.yaml
  secret "ceph-secret" created
  ----
  ====
  
  Verify that the secret was created:
  
  ====
  ----
  # oc get secret ceph-secret
  NAME          TYPE      DATA      AGE
  ceph-secret   Opaque    1         23d
  ----
  ====
  
  [[ceph-creating-pv]]
  === Creating the Persistent Volume
  
  The storage admin next defines the persistent volume (PV) in an object definition before creating
  it in OpenShift:
  
  .Persistent Volume Object Definition Using Ceph RBD
  