sonic-buildimage/installer
Lijitha ck 90801dc1b2
Support for updating tmpfs size according to Image size (#7484)
#### Why I did it
while sonic upgrade, Image will be extracted to tmpfs for installation so tmpfs size should be larger than image size. Image installation will fail if image size is larger than tmpfs size.

we are facing below error while installing debug image with size greater than tmpfs which is 1.5g in marvell armhf platform.

sonic-installer install <url>
New image will be installed, continue? [y/N]: y
Downloading image...
...99%, 1744 MB, 708 KB/s, 0 seconds left...
Installing image SONiC-OS-202012.0-dirty-20210311.224845 and setting it as default...
Command: bash /tmp/sonic_image
tar: installer/fs.zip: Wrote only 7680 of 10240 bytes
tar: installer/onie-image-arm64.conf: Cannot write: No space left on device
tar: Exiting with failure status due to previous errors
Verifying image checksum ... OK.
Preparing image archive ...

#### How I did it
compare downloaded image size with tmpfs size, if size less than image size update the tmpfs size according to image size.

#### How to verify it
Install an Image with size larger than tmpfs. we verified by installing debug image with size 1.9gb which is larger than tmpfs size 1.5gb.
2021-06-20 23:55:02 -07:00
..
arm64 [installer]: Prevent filesystem corruption (#7264) 2021-04-12 10:48:44 -07:00
armhf [installer]: Prevent filesystem corruption (#7264) 2021-04-12 10:48:44 -07:00
x86_64 [installer]: Prevent filesystem corruption (#7264) 2021-04-12 10:48:44 -07:00
sharch_body.sh Support for updating tmpfs size according to Image size (#7484) 2021-06-20 23:55:02 -07:00