summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorEduardo Otubo <otubo@redhat.com>2021-03-30 18:08:25 +0200
committerGitHub <noreply@github.com>2021-03-30 10:08:25 -0600
commit74fa008bfcd3263eb691cc0b3f7a055b17569f8b (patch)
tree35e37aefdcbd563189dca70bd3ac357b320a993c /doc
parent3b7e2e82310d417c0d59b268a6f47bc8f7996cab (diff)
downloadvyos-cloud-init-74fa008bfcd3263eb691cc0b3f7a055b17569f8b.tar.gz
vyos-cloud-init-74fa008bfcd3263eb691cc0b3f7a055b17569f8b.zip
Add support to resize rootfs if using LVM (#721)
This patch adds support to resize a single partition of a VM if it's using an LVM underneath. The patch detects if it's LVM if the given block device is a device mapper by its name (e.g. `/dev/dm-1`) and if it has slave devices under it on sysfs. After that syspath is updated to the real block device and growpart will be called to resize it (and automatically its Physical Volume). The Volume Group will be updated automatically and a final call to extend the rootfs to the remaining space available will be made. Using the same growpart configuration, the user can specify only one device to be resized when using LVM and growpart, otherwise cloud-init won't know which one should be resized and will fail. rhbz: #1810878 LP: #1799953 Signed-off-by: Eduardo Otubo <otubo@redhat.com> Signed-off-by: Scott Moser <smoser@brickies.net>
Diffstat (limited to 'doc')
-rw-r--r--doc/examples/cloud-config-growpart.txt2
1 files changed, 2 insertions, 0 deletions
diff --git a/doc/examples/cloud-config-growpart.txt b/doc/examples/cloud-config-growpart.txt
index 393d5164..09268117 100644
--- a/doc/examples/cloud-config-growpart.txt
+++ b/doc/examples/cloud-config-growpart.txt
@@ -13,6 +13,8 @@
#
# devices:
# a list of things to resize.
+# if the devices are under LVM, the list should be a single entry,
+# cloud-init will then extend the single entry, otherwise it will fail.
# items can be filesystem paths or devices (in /dev)
# examples:
# devices: [/, /dev/vdb1]