[lug] Convertion of ext4 Sparse Files

stimits at comcast.net stimits at comcast.net
Fri Jan 5 15:55:50 MST 2018


I have no method, I'm depending on the tools. Therein the problem shows itself...I do not have any way to intervene with any of the regular tools to tell the tool the input is sparse...it depends on the tool...and if the tool doesn't know better, it fails.
 
I have the original non-sparse file as well. A flash tool converted this to sparse, and then flashed to an embedded system. The partition was later cloned from that system. This clone is an exact match (both are loopback mountable ext4 and can be compared in detail) of the original image prior to conversion into sparse, so I know the embedded system did truly convert the sparse file into an exact match of the original. There is nothing non-standard about the tool, though it does specify the fill character as NULL...this is optional and normal and implies that upon expansion empty spaces will use a NULL character.
 
----- Original Message -----From: Orion Poplawski <orion at nwra.com>To: Boulder (Colorado) Linux Users Group -- General Mailing List <lug at lug.boulder.co.us>, stimits at comcast.netSent: Fri, 05 Jan 2018 22:50:28 -0000 (UTC)Subject: Re: [lug] Convertion of ext4 Sparse Files

I'm suspect of your method for determining "sparseness". What is it?

On 01/05/2018 03:48 PM, stimits at comcast.net wrote:> Unfortunately this does not work (currently testing on Fedora 27), at least> not for this file which was originally a dd of a GPT partition and then> converted to sparse at a later time. Output and input files are both the> sparse file size.>  > It may be a matter of dd or other tools not detecting this as sparse for> whatever reason, but I keep running into options for creating sparse files and> not the reverse, e.g., dd has "conv=sparse", but not the reverse, so I can't> force it to do a sparse to non-sparse conversion.>  > ----- Original Message -----> From: Will <will.sterling at gmail.com>> To: Boulder (Colorado) Linux Users Group -- General Mailing List> <lug at lug.boulder.co.us>> Sent: Fri, 05 Jan 2018 22:09:51 -0000 (UTC)> Subject: Re: [lug] Convertion of ext4 Sparse Files> dd if=/path/sparse_file of=/path/nonsparse_file> > On Fri, Jan 5, 2018 at 2:55 PM, <stimits at comcast.net> <mailto: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 <http://irc.hackingsociety.org>> port=6667 channel=#hackingsociety> > > > _______________________________________________> 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> 

-- Orion PoplawskiManager of NWRA Technical Systems 720-772-5637NWRA, Boulder/CoRA Office FAX: 303-415-97023380 Mitchell Lane orion at nwra.comBoulder, CO 80301 https://www.nwra.com/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lug.boulder.co.us/pipermail/lug/attachments/20180105/33ee1886/attachment.html>


More information about the LUG mailing list