diff --git a/features/orabos/file.exclude b/features/orabos/file.exclude index 9f9728d1c..00cd97748 100644 --- a/features/orabos/file.exclude +++ b/features/orabos/file.exclude @@ -1,3 +1,4 @@ /etc/systemd/network/99-default.network /etc/systemd/system/systemd-resolved.service.d/wait-for-networkd.conf +/etc/repart.d/root.conf /etc/kernel/cmdline.d/99-no-gpt-auto.cfg diff --git a/features/orabos/file.include/etc/repart.d/root_a.conf b/features/orabos/file.include/etc/repart.d/10_root_a.conf similarity index 57% rename from features/orabos/file.include/etc/repart.d/root_a.conf rename to features/orabos/file.include/etc/repart.d/10_root_a.conf index 1aadd2dc7..d539b66f2 100644 --- a/features/orabos/file.include/etc/repart.d/root_a.conf +++ b/features/orabos/file.include/etc/repart.d/10_root_a.conf @@ -1,2 +1,3 @@ [Partition] Type=root +SizeMaxBytes=4G diff --git a/features/orabos/file.include/etc/repart.d/12_config_drive.conf b/features/orabos/file.include/etc/repart.d/12_config_drive.conf new file mode 100644 index 000000000..86ea9ace5 --- /dev/null +++ b/features/orabos/file.include/etc/repart.d/12_config_drive.conf @@ -0,0 +1,7 @@ +# This needs to stay as long as we use config-drives +# It doesn't add much in case we don't. +# As the time of writing metal3 and nova/ironic do. +[Partition] +Type=linux-generic +Label=config-2 +SizeMaxBytes=64M diff --git a/features/orabos/file.include/etc/repart.d/root_b.conf b/features/orabos/file.include/etc/repart.d/25_root_b.conf similarity index 57% rename from features/orabos/file.include/etc/repart.d/root_b.conf rename to features/orabos/file.include/etc/repart.d/25_root_b.conf index 0a7b2e9d9..d539b66f2 100644 --- a/features/orabos/file.include/etc/repart.d/root_b.conf +++ b/features/orabos/file.include/etc/repart.d/25_root_b.conf @@ -1,3 +1,3 @@ [Partition] Type=root -NoAuto=on +SizeMaxBytes=4G diff --git a/features/orabos/file.include/etc/repart.d/50_persistent.conf b/features/orabos/file.include/etc/repart.d/50_persistent.conf new file mode 100644 index 000000000..a12c2b2af --- /dev/null +++ b/features/orabos/file.include/etc/repart.d/50_persistent.conf @@ -0,0 +1,10 @@ +[Partition] +Type=linux-generic +Label=persistent +Format=btrfs +Subvolumes=/home /srv /var /var/tmp +CopyFiles=/home +CopyFiles=/srv +CopyFiles=/var +ExcludeFiles=/var/tmp +Weight=4000 diff --git a/features/orabos/file.include/etc/systemd/system/home.mount b/features/orabos/file.include/etc/systemd/system/home.mount new file mode 100644 index 000000000..5e741023a --- /dev/null +++ b/features/orabos/file.include/etc/systemd/system/home.mount @@ -0,0 +1,18 @@ +[Unit] +Description=Directory (/home) +Documentation=man:file-hierarchy(7) +ConditionPathIsSymbolicLink=!/home +DefaultDependencies=no +Conflicts=umount.target +Before=local-fs.target umount.target +After=-.mount +After=blockdev@dev-disk-by\x2dlabel-persistent.target + +[Mount] +What=/dev/disk/by-label/persistent +Where=/home +Type=btrfs +Options=subvol=/home + +[Install] +WantedBy=local-fs.target diff --git a/features/orabos/file.include/etc/systemd/system/local-fs.target.wants/home.mount b/features/orabos/file.include/etc/systemd/system/local-fs.target.wants/home.mount new file mode 120000 index 000000000..966bd5b2a --- /dev/null +++ b/features/orabos/file.include/etc/systemd/system/local-fs.target.wants/home.mount @@ -0,0 +1 @@ +../home.mount \ No newline at end of file diff --git a/features/orabos/file.include/etc/systemd/system/local-fs.target.wants/usr.mount b/features/orabos/file.include/etc/systemd/system/local-fs.target.wants/usr.mount new file mode 120000 index 000000000..a570574e4 --- /dev/null +++ b/features/orabos/file.include/etc/systemd/system/local-fs.target.wants/usr.mount @@ -0,0 +1 @@ +../usr.mount \ No newline at end of file diff --git a/features/orabos/file.include/etc/systemd/system/local-fs.target.wants/var-tmp.mount b/features/orabos/file.include/etc/systemd/system/local-fs.target.wants/var-tmp.mount new file mode 120000 index 000000000..91b1278db --- /dev/null +++ b/features/orabos/file.include/etc/systemd/system/local-fs.target.wants/var-tmp.mount @@ -0,0 +1 @@ +../var-tmp.mount \ No newline at end of file diff --git a/features/orabos/file.include/etc/systemd/system/local-fs.target.wants/var.mount b/features/orabos/file.include/etc/systemd/system/local-fs.target.wants/var.mount new file mode 120000 index 000000000..985663fa5 --- /dev/null +++ b/features/orabos/file.include/etc/systemd/system/local-fs.target.wants/var.mount @@ -0,0 +1 @@ +../var.mount \ No newline at end of file diff --git a/features/orabos/file.include/etc/systemd/system/var-tmp.mount b/features/orabos/file.include/etc/systemd/system/var-tmp.mount new file mode 100644 index 000000000..ae0a2a4a1 --- /dev/null +++ b/features/orabos/file.include/etc/systemd/system/var-tmp.mount @@ -0,0 +1,18 @@ +[Unit] +Description=Directory (/var/tmp) +Documentation=man:file-hierarchy(7) +ConditionPathIsSymbolicLink=!/var/tmp +DefaultDependencies=no +Conflicts=umount.target +Before=local-fs.target umount.target +After=var.mount +After=blockdev@dev-disk-by\x2dlabel-persistent.target + +[Mount] +What=/dev/disk/by-label/persistent +Where=/var/tmp +Type=btrfs +Options=subvol=/var/tmp + +[Install] +WantedBy=local-fs.target diff --git a/features/orabos/file.include/etc/systemd/system/var.mount b/features/orabos/file.include/etc/systemd/system/var.mount new file mode 100644 index 000000000..00439e8f3 --- /dev/null +++ b/features/orabos/file.include/etc/systemd/system/var.mount @@ -0,0 +1,18 @@ +[Unit] +Description=Directory (/var) +Documentation=man:file-hierarchy(7) +ConditionPathIsSymbolicLink=!/var +DefaultDependencies=no +Conflicts=umount.target +Before=local-fs.target umount.target +After=-.mount +After=blockdev@dev-disk-by\x2dlabel-persistent.target + +[Mount] +What=/dev/disk/by-label/persistent +Where=/var +Type=btrfs +Options=subvol=/var + +[Install] +WantedBy=local-fs.target