Skip to content

Commit d5e6bed

Browse files
author
Matthew Garrell
committed
CNV8909 Adding VM disk enlargement feature
CNV8909 fixing typo CNV8909 Making changes based on initial SME review CNV8909 Changes based on QE review CNV8909 Changes based on peer review CNV8909 Changes based on peer review 2 CNV8909 Changes based on peer review 3 CNV8909 Changes based on peer review 4 CNV8909 Changes based on peer review 5 CNV8909 Changes based on peer review 6 CNV8909 Changes based on peer review 7
1 parent 4e4349c commit d5e6bed

File tree

3 files changed

+63
-0
lines changed

3 files changed

+63
-0
lines changed

_topic_maps/_topic_map.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3029,6 +3029,8 @@ Topics:
30293029
File: virt-preparing-cdi-scratch-space
30303030
- Name: Re-using statically provisioned persistent volumes
30313031
File: virt-reusing-statically-provisioned-persistent-volumes
3032+
- Name: Expanding a virtual machine disk
3033+
File: virt-expanding-vm-disk
30323034
- Name: Deleting data volumes
30333035
File: virt-deleting-datavolumes
30343036
# Templates
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
// Module included in the following assemblies:
2+
//
3+
// * virt/virtual_machines/virtual_disks/virt-vm-disk-resizing.adoc
4+
5+
:_content-type: PROCEDURE
6+
[id="virt-enlarging-vm-disk_{context}"]
7+
= Enlarging a virtual machine disk
8+
9+
VM disk enlargement makes extra space available to the virtual machine. However, it is the responsibility of the VM owner to decide how to consume the storage.
10+
11+
If the disk is a `Filesystem` PVC, the matching file expands to the remaining size while reserving some space for file system overhead.
12+
13+
.Procedure
14+
15+
. Edit the `PersistentVolumeClaim` manifest of the VM disk that you want to expand:
16+
+
17+
[source,terminal]
18+
19+
----
20+
$ oc edit pvc <pvc_name>
21+
----
22+
23+
. Change the value of `spec.resource.requests.storage` attribute to a larger size.
24+
+
25+
[source,yaml]
26+
27+
----
28+
apiVersion: v1
29+
kind: PersistentVolumeClaim
30+
metadata:
31+
name: vm-disk-expand
32+
spec:
33+
accessModes:
34+
- ReadWriteMany
35+
resources:
36+
requests:
37+
storage: 3Gi <1>
38+
...
39+
----
40+
<1> The VM disk size that can be increased
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
:_content-type: ASSEMBLY
2+
[id="virt-vm-disk-resizing"]
3+
= Expanding a virtual machine disk
4+
include::modules/virt-document-attributes.adoc[]
5+
include::modules/common-attributes.adoc[]
6+
:context: virt-expanding-vm-disk
7+
8+
toc::[]
9+
10+
You can enlarge the size of a virtual machine's (VM) disk to provide a greater storage capacity by resizing the disk's persistent volume claim (PVC).
11+
12+
However, you cannot reduce the size of a VM disk.
13+
14+
include::modules/virt-enlarging-vm-disk.adoc[leveloffset=+1]
15+
16+
[id="additional-resources_virt-vm-disk-resizing"]
17+
== Additional resources
18+
19+
* link:https://docs.microsoft.com/en-us/windows-server/storage/disk-management/extend-a-basic-volume[Extending a basic volume in Windows].
20+
* link:https://access.redhat.com/solutions/29095[Extending an existing file system partition without destroying data in Red Hat Enterprise Linux].
21+
* link:https://access.redhat.com/solutions/24770[Extending a logical volume and its file system online in Red Hat Enterprise Linux].

0 commit comments

Comments
 (0)