Skip to content

Commit 22bb4a9

Browse files
authored
Merge pull request #41072 from mgarrellRH/CNV8909
CNV8909 Adding VM disk enlargement feature
2 parents 4b9be18 + d5e6bed commit 22bb4a9

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
@@ -3072,6 +3072,8 @@ Topics:
30723072
File: virt-preparing-cdi-scratch-space
30733073
- Name: Re-using statically provisioned persistent volumes
30743074
File: virt-reusing-statically-provisioned-persistent-volumes
3075+
- Name: Expanding a virtual machine disk
3076+
File: virt-expanding-vm-disk
30753077
- Name: Deleting data volumes
30763078
File: virt-deleting-datavolumes
30773079
# 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)