disk: ensure minimum size for filesystems

This commit fixes #2347 by ensuring that a minimum
size of 1GB is set for all file systems. The only
exception to this is the `/usr` which is set to 2GB,
since this was the only mountpoint that was previously
being checked.
This commit is contained in:
Gianluca Zuccarelli 2022-02-23 14:01:08 +00:00 committed by Christian Kellner
parent ab306943d4
commit 62c44e86f9
5 changed files with 16 additions and 13 deletions

View file

@ -466,9 +466,6 @@ func (t *imageType) checkOptions(customizations *blueprint.Customizations, optio
invalidMountpoints := []string{}
for _, m := range mountpoints {
if m.Mountpoint == "/usr" && m.MinSize < 2147483648 {
m.MinSize = 2147483648
}
if !isMountpointAllowed(m.Mountpoint) {
invalidMountpoints = append(invalidMountpoints, m.Mountpoint)
}

View file

@ -549,9 +549,6 @@ func (t *imageType) checkOptions(customizations *blueprint.Customizations, optio
invalidMountpoints := []string{}
for _, m := range mountpoints {
if m.Mountpoint == "/usr" && m.MinSize < 2147483648 {
m.MinSize = 2147483648
}
if !isMountpointAllowed(m.Mountpoint) {
invalidMountpoints = append(invalidMountpoints, m.Mountpoint)
}

View file

@ -537,9 +537,6 @@ func (t *imageType) checkOptions(customizations *blueprint.Customizations, optio
invalidMountpoints := []string{}
for _, m := range mountpoints {
if m.Mountpoint == "/usr" && m.MinSize < 2147483648 {
m.MinSize = 2147483648
}
if !isMountpointAllowed(m.Mountpoint) {
invalidMountpoints = append(invalidMountpoints, m.Mountpoint)
}

View file

@ -492,9 +492,6 @@ func (t *imageType) checkOptions(customizations *blueprint.Customizations, optio
invalidMountpoints := []string{}
for _, m := range mountpoints {
if m.Mountpoint == "/usr" && m.MinSize < 2147483648 {
m.MinSize = 2147483648
}
if !isMountpointAllowed(m.Mountpoint) {
invalidMountpoints = append(invalidMountpoints, m.Mountpoint)
}