Skip to content

Commit 4b52dcf

Browse files
committed
CNV-5258: FS overhead space
1 parent 97186f6 commit 4b52dcf

File tree

4 files changed

+75
-0
lines changed

4 files changed

+75
-0
lines changed

_topic_map.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2538,6 +2538,8 @@ Topics:
25382538
File: virt-features-for-storage
25392539
- Name: Configuring local storage for virtual machines
25402540
File: virt-configuring-local-storage-for-vms
2541+
- Name: Reserving PVC space for file system overhead
2542+
File: virt-reserving-pvc-space-fs-overhead
25412543
- Name: Configuring CDI to work with namespaces that have a compute resource quota
25422544
File: virt-configuring-cdi-for-namespace-resourcequota
25432545
- Name: Uploading local disk images by using the web console
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
// Module included in the following assemblies:
2+
//
3+
// * virt/virtual_machines/virtual_disks/virt-reserving-pvc-space-fs-overhead.adoc
4+
5+
[id="virt-how-fs-overhead-affects-space-vm-disks_{context}"]
6+
= How file system overhead affects space for virtual machine disks
7+
8+
When you add a virtual machine disk to a persistent volume claim (PVC) that uses the `Filesystem` volume mode, you must ensure that there is enough space on the PVC for:
9+
10+
* The virtual machine disk.
11+
* The space that the Containerized Data Importer (CDI) reserves for file system overhead, such as metadata.
12+
13+
By default, the CDI reserves 5.5% of the PVC space for overhead, reducing the space available for virtual machine disks by that amount.
14+
15+
If a different value works better for your use case, you can configure the overhead value by editing the `CDI` object. You can change the value globally and you can specify values for specific storage classes.
Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
// Module included in the following assemblies:
2+
//
3+
// * virt/virtual_machines/virtual_disks/virt-reserving-pvc-space-fs-overhead.adoc
4+
5+
[id="virt-overriding-default-fs-overhead-value_{context}"]
6+
= Overriding the default file system overhead value
7+
8+
Change the amount of persistent volume claim (PVC) space that the Containerized Data Importer (CDI) reserves for file system overhead by editing the `spec.config.filesystemOverhead` attribute of the `CDI` object.
9+
10+
.Prerequisites
11+
12+
* Install the OpenShift CLI (`oc`).
13+
14+
.Procedure
15+
16+
. Open the `CDI` object for editing by running the following command:
17+
+
18+
[source,terminal]
19+
----
20+
$ oc edit cdi
21+
----
22+
23+
. Edit the `spec.config.filesystemOverhead` fields, populating them with your chosen values:
24+
+
25+
[source,yaml]
26+
----
27+
...
28+
spec:
29+
config:
30+
filesystemOverhead:
31+
global: "<new_global_value>" <1>
32+
storageClass:
33+
<storage_class_name>: "<new_value_for_this_storage_class>" <2>
34+
----
35+
<1> The file system overhead percentage that CDI uses across the cluster. For example, `global: "0.07"` reserves 7% of the PVC for file system overhead.
36+
<2> The file system overhead percentage for the specified storage class. For example, `mystorageclass: "0.04"` changes the default overhead value for PVCs in the `mystorageclass` storage class to 4%.
37+
38+
. Save and exit the editor to update the `CDI` object.
39+
40+
.Verification steps
41+
42+
* View the `CDI` status and verify your changes by running the following command:
43+
+
44+
[source,terminal]
45+
----
46+
$ oc get cdi -o yaml
47+
----
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
[id="virt-reserving-pvc-space-fs-overhead"]
2+
= Reserving PVC space for file system overhead
3+
include::modules/virt-document-attributes.adoc[]
4+
:context: virt-reserving-pvc-space-fs-overhead
5+
toc::[]
6+
7+
By default, the Containerized Data Importer (CDI) reserves space for file system overhead data in persistent volume claims (PVCs) that use the `Filesystem` volume mode. You can set the percentage that CDI reserves for this purpose globally and for specific storage classes.
8+
9+
include::modules/virt-how-fs-overhead-affects-space-vm-disks.adoc[leveloffset=+1]
10+
11+
include::modules/virt-overriding-default-fs-overhead-value.adoc[leveloffset=+1]

0 commit comments

Comments
 (0)