[lug] Convertion of ext4 Sparse Files

Will will.sterling at gmail.com
Fri Jan 5 15:09:51 MST 2018


dd if=/path/sparse_file of=/path/nonsparse_file

On Fri, Jan 5, 2018 at 2:55 PM, <stimits at comcast.net> wrote:

> Hi,
>
> I've been looking all over and am stumped. Files can be "sparse" where
> space isn't allocated until needed, and it is easy to create a sparse file.
> What I'm wondering...and am stumped about...there must be a way to take an
> image and convert it back to non-sparse...but how?
>
> cp with "--sparse=never" does not work (I'm trying on Fedora 23 through
> 27, plus Ubuntu 16.04). This may be a property of the file in question
> though...some people will have a large file with content such as
> text...this is an embedded system dd of a partition...it is a binary image
> containing an ext4 partition which can be copied via dd back onto other
> embedded systems...but this was converted to sparse format to save space.
> Is there a way to take such an image and put it back to its original size
> without the sparse attribute?
>
> Thanks!
>
> _______________________________________________
> Web Page:  http://lug.boulder.co.us
> Mailing List: http://lists.lug.boulder.co.us/mailman/listinfo/lug
> Join us on IRC: irc.hackingsociety.org port=6667 channel=#hackingsociety
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lug.boulder.co.us/pipermail/lug/attachments/20180105/29cd61ad/attachment.html>


More information about the LUG mailing list