Skip to content

Commit

Permalink
[Build] Increase the size of the installer image (sonic-net#11869)
Browse files Browse the repository at this point in the history
#### Why I did it
Fix the build failure caused by the installer image size too small. The installer image is only used during the build, not impact the final images.
See https://dev.azure.com/mssonic/build/_build/results?buildId=139926&view=logs&j=cef3d8a9-152e-5193-620b-567dc18af272&t=359769c4-8b5e-5976-a793-85da132e0a6f

```
+ fallocate -l 2048M ./sonic-installer.img
+ mkfs.vfat ./sonic-installer.img
mkfs.fat 4.2 (2021-01-31)
++ mktemp -d
+ tmpdir=/tmp/tmp.TqdDSc00Cn
+ mount -o loop ./sonic-installer.img /tmp/tmp.TqdDSc00Cn
+ cp target/sonic-vs.bin /tmp/tmp.TqdDSc00Cn/onie-installer.bin
cp: error writing '/tmp/tmp.TqdDSc00Cn/onie-installer.bin': No space left on device
[  FAIL LOG END  ] [ target/sonic-vs.img.gz ]
```

#### How I did it
Increase the size from 2048M to 4096M.
Why not increase to 16G like qcow2 image?
The qcow2 supports the sparse disk, although a big disk size allocated, but it will not consume the real disk size. The falocate does not support the sparse disk. We do not want to allocate a very big disk, but no use at all. It will require more space to build.
  • Loading branch information
xumia authored and zbud-msft committed Aug 31, 2022
1 parent 1d0d61c commit 45c8d02
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion scripts/build_kvm_image.sh
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ create_disk()

prepare_installer_disk()
{
fallocate -l 2048M $INSTALLER_DISK
fallocate -l 4096M $INSTALLER_DISK

mkfs.vfat $INSTALLER_DISK

Expand Down

0 comments on commit 45c8d02

Please sign in to comment.