Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
External Contributor Checklist
🚨 Please review the guidelines for contributing to this repository.
Make sure that all commits follow the conventional commit specification for the Mender project.
Make sure that all commits are signed with
git --signoff
. Also note that the signoff author must match the author of the commit.Description
Instead of allocating the whole image on the disk, only allocate the parts that actually contain data. This reduces the required disk space to store or create images. The image does appear to have the normal size but if inspected with
du
orls -lsh
the difference becomes apparent.Example with the image i build:
This is done by the
conv=sparse
flag of dd. Alternatively a file can made sparse withfallocate -d <file>
. But this may only collapse a file, not reduce its footprint while it is created. This may also improve read and write performance of those files in the empty areas, but i did not observe a big speed-up during the image creation.