[lug] Convertion of ext4 Sparse Files

stimits at comcast.net stimits at comcast.net
Fri Jan 5 17:27:08 MST 2018


...
> What filesystem are you doing this on? ZFS, btrfs, XFS may all do"smart" things that you're not expecting here. Boring old ext[23]will behave as I've outlined in earlier message. My earlier outputwas done on ext4 and it looks like I'm expecting as well.
 
> Additionally, I don't think I understand why your file being sparselyallocated is an issue. (I may have missed it -- lots of email today.)Can you outline that for your readers? (Or point to earlierexplanation.)
...
 
The base systems tested on all run ext4. Fedora 23 through 27, plus Ubuntu 16.04. The partition this data belongs to is a root partition on an embedded system and is also ext4 (Ubuntu 16.04), without 64-bit extensions...it's plain vanilla ext4.
 
A copy of the sparse image was archived, but someone who needs to loopback mount this and edit without destroying a working system wants to know how to convert this back from sparse to non-sparse. The sparse image cannot be loopback mounted...perhaps it should be possible, but it isn't. That famous phrase the I.T. guy fears hearing when asked what's wrong: "It don't work!".
 
This sparse image was, at one point, flashed onto the embedded system. A clone can be created via dd, and the clone is an exact match of the non-sparse original image. There is a guarantee that when the original system was turned into sparse, and expanded during flash to occupy the full partition, that everything was correctly preserved...else it would not be possible for the clone to match the original. This is my original and my clone.
 
The other guy looking for help has only an inherited sparse image and a system he can't destroy. I've seen this enough times it just seems like it should be possible to convert sparse back to full size and loopback mount, but I'm starting to fear the sparse format involved has something odd or non-standard about it since none of the usual tools work with it.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lug.boulder.co.us/pipermail/lug/attachments/20180106/3b329923/attachment.html>


More information about the LUG mailing list