disk: add default minimum directory sizes
Currently, we only specify a minimum size for - `/` (1 GiB), and - `/usr` (2 GiB). This ensures that - a separate `/usr` partition is at least 2 GiB, - `/` is always at least 1 GiB, - if `/usr` it not a separate partition, `/` is at least 3 GiB. We could (or should), in the future, make it possible for image types to override this mapping as part of their default config, for example, if an image type by default requires a larger `/usr`.
This commit is contained in:
parent
efa10e56e1
commit
275e60f199
1 changed files with 6 additions and 0 deletions
|
|
@ -38,6 +38,12 @@ func NewPartitionTable(basePT *PartitionTable, mountpoints []blueprint.Filesyste
|
|||
}
|
||||
}
|
||||
|
||||
// TODO: make these overrideable for each image type
|
||||
newPT.EnsureDirectorySizes(map[string]uint64{
|
||||
"/": 1073741824,
|
||||
"/usr": 2147483648,
|
||||
})
|
||||
|
||||
// Calculate partition table offsets and sizes
|
||||
newPT.relayout(imageSize)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue