Skip to content

Commit b7454be

Browse files
ader1990pothos
authored andcommitted
Increase partition sizes
The /usr partition was too small some time ago and we gained space again by switching to btrfs with compression and also removing/splitting out content. The /boot partition is too small all the time and we added many hacks to fit the kernel+initrd under 60 MB. To handle the case where the /oem partition is too small for the A/B-updated OEM extensions we added the workaround to write the inactive one (or both) to the rootfs. All this would not be needed if we had increased the partition sizes a few years ago so that we could now assume that most nodes have the increased sizes and we can make use of them. Still, we can do it now to prepare for the next time when in five or ten years we have serious size problems and run out of workarounds. We have to do the change now and wait a few years so that most nodes have been provisioned with the new layout. Then we can drop the workarounds and have a full featured kernel and initrd, and we can also increase the /usr filesystem to make use of the larger partition. Ideally we use large enough sizes that we never have to worry again but since we also want to support small ARM boards which might only have 8 GB internal storage, let's target this when increasing the partition sizes. With 1 GB /boot, two 2 GB /usr, and 1 GB /oem partitions we are already at 6 GB, leaving 2 GB for the rootfs. TODO: check if we need to limit the partition extraction of /usr for the update payload to the combined filesystem+verity size. TODO: reduce the rootfs size a bit to make sure we don't overshoot 8 GB. Signed-off-by: Adrian Vladu <avladu@cloudbasesolutions.com> Signed-off-by: Kai Lueke <kailuke@microsoft.com>
1 parent 198eb73 commit b7454be

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

build_library/disk_layout.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
"label":"EFI-SYSTEM",
1414
"fs_label":"EFI-SYSTEM",
1515
"type":"efi",
16-
"blocks":"262144",
16+
"blocks":"2097152",
1717
"fs_type":"vfat",
1818
"mount":"/boot",
1919
"features": []
@@ -27,7 +27,7 @@
2727
"label":"USR-A",
2828
"uuid":"7130c94a-213a-4e5a-8e26-6cce9662f132",
2929
"type":"flatcar-rootfs",
30-
"blocks":"2097152",
30+
"blocks":"4194304",
3131
"fs_blocks":"260094",
3232
"fs_type":"btrfs",
3333
"fs_compression":"zstd",
@@ -38,7 +38,7 @@
3838
"label":"USR-B",
3939
"uuid":"e03dd35c-7c2d-4a47-b3fe-27f15780a57c",
4040
"type":"flatcar-rootfs",
41-
"blocks":"2097152",
41+
"blocks":"4194304",
4242
"fs_blocks":"262144"
4343
},
4444
"5":{
@@ -51,7 +51,7 @@
5151
"label":"OEM",
5252
"fs_label":"OEM",
5353
"type":"data",
54-
"blocks":"262144",
54+
"blocks":"2097152",
5555
"fs_type":"btrfs",
5656
"fs_compression":"zlib",
5757
"mount":"/oem"

0 commit comments

Comments
 (0)