From d0ec0c1800097250594a17e88cae28b423a8eff2 Mon Sep 17 00:00:00 2001 From: zsdc Date: Wed, 4 Nov 2020 18:31:58 +0200 Subject: T3039: Enabled growpart and resizefs (modified) modules Since partition size is hardcoded into VyOS images for virtual environments, it is not impossible to use all available space on storage. This change enables two Cloud-init modules: - `growpart` to grow persistence partition; - `resizefs_vyos` to resize filesystem size to the whole partition. The `resizefs_vyos` module forked from the main `resizefs` to allow resizing not only root partition but any custom also. --- config/cloud.cfg.d/10_vyos.cfg | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'config') diff --git a/config/cloud.cfg.d/10_vyos.cfg b/config/cloud.cfg.d/10_vyos.cfg index 6af79e52..583c263c 100644 --- a/config/cloud.cfg.d/10_vyos.cfg +++ b/config/cloud.cfg.d/10_vyos.cfg @@ -19,6 +19,8 @@ disable_vmware_customization: true # The modules that run in the 'init' stage cloud_init_modules: + - growpart + - resizefs_vyos # The modules that run in the 'config' stage cloud_config_modules: @@ -43,3 +45,13 @@ system_info: templates_dir: /etc/cloud/templates/ upstart_dir: /etc/init/ + +# Set partitions info for the growpart module +growpart: + mode: auto + devices: ["/usr/lib/live/mount/persistence/"] + ignore_growroot_disabled: false + +# Set partitions info for the resizefs module +resizefs_list: ["/usr/lib/live/mount/persistence/"] + -- cgit v1.2.3