From 77b8b434611484e7be59c56d6c4f30eb9075714b Mon Sep 17 00:00:00 2001 From: Colin Walters Date: Thu, 13 Sep 2018 17:40:56 -0400 Subject: [PATCH] WIP: rework partitioning Try to match the design in https://github.com/coreos/fedora-coreos-tracker/issues/18 - no lvm - separate /var --- fedora-coreos-base.yaml | 11 ++++++++++- image.ks | 16 +++++++--------- 2 files changed, 17 insertions(+), 10 deletions(-) diff --git a/fedora-coreos-base.yaml b/fedora-coreos-base.yaml index e7aca06629..3cad1836eb 100644 --- a/fedora-coreos-base.yaml +++ b/fedora-coreos-base.yaml @@ -49,10 +49,19 @@ postprocess: echo '%sudo ALL=(ALL) NOPASSWD: ALL' > /etc/sudoers.d/coreos-sudo-group # We're not using resolved yet rm -f /usr/lib/systemd/system/systemd-resolved.service + # Growpart /var by default + cat > /usr/lib/systemd/system/coreos-growpart-var.service </usr/lib/systemd/system-preset/42-coreos.preset << EOF # Presets here that eventually should live in the generic fedora presets # This one is from https://github.com/dustymabe/ignition-dracut enable coreos-firstboot-complete.service + enable coreos-growpart-var.service EOF # Let's have a non-boring motd, just like CL (although theirs is more subdued # nowadays compared to early versions with ASCII art). One thing we do here @@ -79,7 +88,7 @@ packages: - bridge-utils nfs-utils biosdevname iptables-services - NetworkManager dnsmasq hostname # Storage - - container-storage-setup cloud-utils-growpart + - cloud-utils-growpart - lvm2 iscsi-initiator-utils sg3_utils - device-mapper-multipath - xfsprogs e2fsprogs mdadm diff --git a/image.ks b/image.ks index b1c89c832e..49eeae05d8 100644 --- a/image.ks +++ b/image.ks @@ -17,17 +17,17 @@ firewall --disabled network --bootproto=dhcp --onboot=on zerombr -clearpart --initlabel --all +clearpart --initlabel --all --disklabel gpt # Add the following to kernel boot args: # - ip=dhcp # how to get network # - rd.neednet=1 # tell dracut we need network # - $coreos_firstboot # This is actually a GRUB variable bootloader --timeout=1 --append="no_timer_check console=ttyS0,115200n8 console=tty0 net.ifnames=0 biosdevname=0 ip=dhcp rd.neednet=1 rw $coreos_firstboot" +# https://github.com/coreos/fedora-coreos-tracker/issues/18 part /boot --size=300 --fstype="xfs" --label=boot -part pv.01 --grow -volgroup coreos pv.01 -logvol / --size=3000 --fstype="xfs" --name=root --vgname=coreos --label=root +part / --size=3000 --fstype="xfs" --label=root +part /var --size=3000 --fstype="xfs" --label=var --grow reboot @@ -36,11 +36,9 @@ reboot # https://github.com/dustymabe/ignition-dracut/pull/12 touch /boot/coreos-firstboot -# Configure docker-storage-setup to resize the partition table on boot -# https://github.com/projectatomic/docker-storage-setup/pull/25 -echo 'GROWPART=true' >> /etc/sysconfig/docker-storage-setup -# https://pagure.io/atomic-wg/issue/343 -echo 'ROOT_SIZE=+100%FREE' >> /etc/sysconfig/docker-storage-setup +# See https://github.com/projectatomic/container-storage-setup/pull/25 +# Basically, we only want to growpart on *virtual* disk images. +touch /boot/coreos-growpart # Remove any persistent NIC rules generated by udev rm -vf /etc/udev/rules.d/*persistent-net*.rules