This repository has been archived by the owner on Jul 24, 2024. It is now read-only.
forked from gardenlinux/gardenlinux
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[orabos] A/B root partitions, Third for persistence
We could either have two completely separate paritions, and copy things manually around, or this. Btrfs offers the option create subvolumes for partitioning the data further up. Otherwise we would have to statically determine the size of the home, var, and var/tmp partitions (or at least: home and var). Home should be fairly limited, so that would not be an insurmountable problem. As the VMs will (eventually) only run with non-local storage, the partition will only be used for our data, which should be practically ephemeral, and is only persisted for a faster life-cycle. Brtfs also would offer us the option to use snapshots for rollback, partition the paths further, or and makes it easy to add more paths, in case of need.
- Loading branch information
Showing
12 changed files
with
78 additions
and
1 deletion.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |
1 change: 1 addition & 0 deletions
1
...bos/file.include/etc/repart.d/root_a.conf → .../file.include/etc/repart.d/10_root_a.conf
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,3 @@ | ||
[Partition] | ||
Type=root | ||
SizeMaxBytes=4G |
7 changes: 7 additions & 0 deletions
7
features/orabos/file.include/etc/repart.d/12_config_drive.conf
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |
2 changes: 1 addition & 1 deletion
2
...bos/file.include/etc/repart.d/root_b.conf → .../file.include/etc/repart.d/25_root_b.conf
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
[Partition] | ||
Type=root | ||
NoAuto=on | ||
SizeMaxBytes=4G |
10 changes: 10 additions & 0 deletions
10
features/orabos/file.include/etc/repart.d/50_persistent.conf
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |
18 changes: 18 additions & 0 deletions
18
features/orabos/file.include/etc/systemd/system/home.mount
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |
1 change: 1 addition & 0 deletions
1
features/orabos/file.include/etc/systemd/system/local-fs.target.wants/home.mount
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
../home.mount |
1 change: 1 addition & 0 deletions
1
features/orabos/file.include/etc/systemd/system/local-fs.target.wants/usr.mount
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
../usr.mount |
1 change: 1 addition & 0 deletions
1
features/orabos/file.include/etc/systemd/system/local-fs.target.wants/var-tmp.mount
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
../var-tmp.mount |
1 change: 1 addition & 0 deletions
1
features/orabos/file.include/etc/systemd/system/local-fs.target.wants/var.mount
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
../var.mount |
18 changes: 18 additions & 0 deletions
18
features/orabos/file.include/etc/systemd/system/var-tmp.mount
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |