1
0
mirror of https://github.com/openshift/openshift-docs.git synced 2026-02-07 09:46:53 +01:00
Files
openshift-docs/modules/virt-understanding-scratch-space.adoc

28 lines
1.6 KiB
Plaintext

// Module included in the following assemblies:
//
// * virt/virtual_machines/virtual_disks/virt-preparing-cdi-scratch-space.adoc
[id="virt-understanding-scratch-space_{context}"]
= Understanding scratch space
The Containerized Data Importer (CDI) requires scratch space (temporary storage) to complete some operations, such as importing and uploading virtual machine images.
During this process, the CDI provisions a scratch space PVC equal to the size of the PVC backing the destination data volume (DV).
The scratch space PVC is deleted after the operation completes or aborts.
The `CDIConfig` object allows you to define which storage class to use to bind the scratch space PVC by setting the `scratchSpaceStorageClass` in the `spec:` section of the `CDIConfig` object.
If the defined storage class does not match a storage class in the cluster, then the default storage class defined for the cluster is used.
If there is no default storage class defined in the cluster, the storage class used to provision the original DV or PVC is used.
[NOTE]
====
The CDI requires requesting scratch space with a `file` volume mode, regardless of the PVC backing the origin data volume.
If the origin PVC is backed by `block` volume mode, you must define a storage class capable of provisioning `file` volume mode PVCs.
====
[discrete]
== Manual provisioning
If there are no storage classes, the CDI will use any PVCs in the project that match the size requirements for the image.
If there are no PVCs that match these requirements, the CDI import pod will remain in a *Pending* state until an appropriate PVC is made available or until a timeout function kills the pod.