Re: How to manage disk space while working with Yocto?


Mikko Rapeli
 

Hi,

On Wed, Mar 16, 2022 at 12:54:14AM -0700, Sourabh Hegde wrote:
Hello All,

I am using Yocto for one of my project. I know that Yocto needs a good amount of disk space for build activities. And also I am working as non-root user in Ubuntu 20.04. But I often run into space issues during build.

WARNING: The free space of [...]/tmp-glibc (overlay) is running low (0.555GB left)
ERROR: No new tasks can be executed since the disk space monitor action is "STOPTASKS"!
WARNING: The free space of [...]/downloads (overlay) is running low (0.555GB left)
ERROR: No new tasks can be executed since the disk space monitor action is "STOPTASKS"!
WARNING: The free space of [...]/sstate-cache (overlay) is running low (0.555GB left)
ERROR: No new tasks can be executed since the disk space monitor action is "STOPTASKS"!

I have tried deleting $TMPDIR (build/tmp) , $SSTATE_DIR (build/sstate-cache) , $DL_DIR (build/downloads). But these things didn't help me.

Is there any way to allocate more space to user in Ubuntu? And also what is the best practice for space usage while working with Yocto?

Can anyone please let me know how to resolve this issue?

Your help will be much appreciated.
This is a common problem. I run to this almost weekly basis doing a lot yocto compiles
on my developer machine.

Solution for me is to manually check before compiling that I still have
100's gigabytes of diskspace free. If not, I will delete first build/tmp
directories. If that doesn't give me enough free space, I sometimes need to
delete the whole build directory which includes the sstate cache directories.
In worst case I need to delete also the download cache directories which
in my case lives outside of build directories.

On CI build servers I start every build by cleaning the build directory but I do
preserve the sstate cache, cache directory (prserv database from previous release),
and download cache. Size of the caches on each CI server is monitored separately.

Hope this helps,

-Mikko

Join yocto@lists.yoctoproject.org to automatically receive all group messages.