Skip to content

Increase the installer disk size by 1GB and switch to ext2 for KVM #23378

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jul 18, 2025

Conversation

saiarcot895
Copy link
Contributor

@saiarcot895 saiarcot895 commented Jul 18, 2025

Why I did it

Following #22199, the debug version of sonic-vs.bin file is at 4093MB (to be precise, one particular build was at 4291790831 bytes). This, in theory, should've fit fine in the 4096MB FAT32 installer disk that is created for building the sonic-vs.img QCOW2 image. However, it's short by 5MB. My guess for this reason is because FAT32 itself needs some space for metadata, and so we don't get the full 4096MB. This results in a failure to build the debug KVM image.

Work item tracking
  • Microsoft ADO (number only):

How I did it

As a fix, increase the installer disk size that we create by 1GB, which should be enough for now, and switch to ext2 filesystem instead of FAT32. This switch is needed because FAT32 only allows files up to 4GB (minus one byte), and the latest debug images are at around 4.1GB.

How to verify it

I locally made a loopback file of 4104MB, copied the sonic-vs.bin debug installer file generated in https://dev.azure.com/mssonic/build/_build/results?buildId=900622&view=results into it (which is 4093MB), and verified that it did get copied into there.

Which release branch to backport (provide reason below if selected)

  • 202205
  • 202211
  • 202305
  • 202311
  • 202405
  • 202411
  • 202505

Tested branch (Please provide the tested image version)

Description for the changelog

Link to config_db schema for YANG module changes

A picture of a cute animal (not mandatory but encouraged)

Following sonic-net#22199, the debug version of `sonic-vs.bin` file is at 4093MB
(to be precise, one particular build was at 4291790831 bytes). This, in
theory, should've fit fine in the 4096MB FAT32 installer disk that is
created for building the sonic-vs.img QCOW2 image. However, it's short
by 5MB. My guess for this reason is because FAT32 itself needs some
space for metadata, and so we don't get the full 4096MB. This results in
a failure to build the debug KVM image.

As a fix, increase the installer disk size that we create by 8MB, which
should be enough for any debug `sonic-vs.bin` file that we create for
this filesystem. I say "for this filesystem" because FAT32 allows files
up to 4GB (minus one byte). This means that if we need to create a debug
image larger than this, then the installer disk will need to use a
different filesystem, probably ext2 or ext4. Considering the ONIE recovery
environment is a Linux environment, this will probably be perfectly
fine if we do need to change to one of those two filesystems, as long as
nothing has FAT32 hardcoded anywhere.

Signed-off-by: Saikrishna Arcot <[email protected]>
@mssonicbld
Copy link
Collaborator

/azp run Azure.sonic-buildimage

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@saiarcot895
Copy link
Contributor Author

...and I just saw that the debug installer file in https://dev.azure.com/mssonic/build/_build/results?buildId=902172&view=results is at 4115MB. Looking at the diff between the prior build and this build, I don't see an obvious cause for the increase in size, but this might mean that the change to ext2/ext4 is needed now.

@mssonicbld
Copy link
Collaborator

/azp run Azure.sonic-buildimage

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@saiarcot895 saiarcot895 changed the title Increase the installer disk size by 8MB for KVM Increase the installer disk size by 1GB and switch to ext2 for KVM Jul 18, 2025
@qiluo-msft qiluo-msft merged commit 704da83 into sonic-net:master Jul 18, 2025
20 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants