mirror of
https://github.com/openshift/openshift-docs.git
synced 2026-02-06 06:46:26 +01:00
38 lines
1.6 KiB
Plaintext
38 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 DataVolume (DV). The scratch space PVC is deleted
|
|
after the operation completes or aborts.
|
|
|
|
The CDIConfig object allows you to define which StorageClass to use to bind the
|
|
scratch space PVC by setting the `scratchSpaceStorageClass` in the `spec:`
|
|
section of the CDIConfig object.
|
|
|
|
If the defined StorageClass does not match a StorageClass in the cluster, then
|
|
the default StorageClass defined for the cluster is used. If there is no
|
|
default StorageClass defined in the cluster, the StorageClass 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 DataVolume. If the origin PVC is backed by
|
|
`block` volume mode, you must define a StorageClass 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.
|