Bug 11886

Summary: losetup doesn't allow passing -c for resizing loopback device after increasing file size
Product: Busybox Reporter: Mikael Lepistö <elhigu>
Component: Standard ComplianceAssignee: unassigned
Status: RESOLVED FIXED    
Severity: normal CC: busybox-cvs
Priority: P5    
Version: unspecified   
Target Milestone: ---   
Hardware: All   
OS: Linux   
Host: Target:
Build:

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!