Created
March 10, 2018 19:21
-
-
Save mjrider/b236c51c53a47694c5283893edd61eb6 to your computer and use it in GitHub Desktop.
user-config for hetzner cloud, to get a smaller root partition
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#cloud-config | |
# do not reisze, we are going to do that our self. Because the resizefs will run before the disk setup | |
resize_rootfs: false | |
# setup disk, overwriting our live partition scheme | |
# results in a 4G/16GB split on a cx11 | |
# overwrite needs to be true because we are going to change the layout of an existing drive | |
disk_setup: | |
/dev/sda: | |
table_type: 'mbr' | |
layout: | |
- 20 | |
- 80 | |
overwrite: True | |
# run commands cloud-init to finish the changes | |
# reload partition table | |
# resize rootfs | |
runcmd: | |
- [ partx, --update, /dev/sda ] | |
- [ resize2fs, /dev/sda1 ] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I was unable to reproduce a change in disk size with this setup. I brought me up the CX11 with a single partition of the full disk size.