Bug 11886 - losetup doesn't allow passing -c for resizing loopback device after increasing file size
Summary: losetup doesn't allow passing -c for resizing loopback device after increasin...
Status: RESOLVED FIXED
Alias: None
Product: Busybox
Classification: Unclassified
Component: Standard Compliance (show other bugs)
Version: unspecified
Hardware: All Linux
: P5 normal
Target Milestone: ---
Assignee: unassigned
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-05-22 09:40 UTC by Mikael Lepistö
Modified: 2019-05-23 14:12 UTC (History)
1 user (show)

See Also:
Host:
Target:
Build:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Mikael Lepistö 2019-05-22 09:40:23 UTC
While working in docker images I need to create internal ext4 partition to be able to run docker in docker (docker:dind image). 

If I preallocate big filesystem there, it will cause base image size to be really big, even if just few megabytes are really needed.

I could try to create sparse file to host the filesystem, but with that the problem is that docker doesn't support them and when docker image is saved, sparse file will be written as whole.

So now I'm trying to use this method to resize partition to be bigger on the fly when allocated space is running low 

https://askubuntu.com/questions/260620/resize-dev-loop0-and-increase-space

Is there any way to install losetup with -c switch supported to busybox?
Comment 1 Denys Vlasenko 2019-05-23 14:12:22 UTC
Implemented in git, thanks!