blob: 1c01ecb2894e87f8858adbefe5b35901111af315 [file] [log] [blame]
{
"parent": "legacy_disk_layout.json",
"layouts": {
# The following number for size (4966) is determined such that the
# size of image with "base" disk layout is exactly 10GiB. GCE images
# are expected to be multiple of 1GiB. We choose 10GiB because it's
# the default boot disk size on GCE.
#
# For now, we determine the starting sector number of the stateful
# partition with cgpt (see below) on a built image. But ideally
# we should arrive at this number based on legacy_disk_layout.json.
#
# Partitions are expected to be aligned to 4096 block boundary,
# that is, 2 MiB.
#
# number of 512-byte sectors in 10GiB: 20,971,520
# stateful partition starting sector: 8,704,000 (cgpt show /dev/sda)
# stateful partition size in MiB: 5,990 (2MiB aligned)
# stateful partition size less 1GiB in MiB: 4,966
#
# NOTEs:
# image_type and disk_layout are different. Only disk_layout is used for controlling
# the size of partitions.
#
# Both base and test image will use usb disk_layout by default. To use base disk_layout,
# we need to specify `--disk_layout=base`. This is what COS builder used.
#
# Both base and test image's size will be 8GiB without specifying disk_layout.
# disk_layout is usb by default. The size of the image is the sum
# of ROOT-A(2GiB)+ROOT-B(2MiB)+Stateful Partition(~5GiB). ROOT-B's size is specified
# in the usb section of legacy_disk_layout.json
#
# Both base and test image's size will be 9GiB by COS builder, which will use base
# disk_layout. The size is sum of ROOT-A(2GiB)+ROOT-B(2GiB)+Stateful Parition(~5B).
#
# We never have a 10GiB size of image in practice. When create VM on GCE, the default
# image size is 10GiB.
"common": [
{
# STATE
"num": 1,
"size": "4966 MiB",
"fs_options": {
# A consequence of this option is that some file system
# structures are initialized lazily when resizing,
# resulting in much faster resize2fs invocations.
"ext4": "-O metadata_csum"
}
}
]
}
}