Bug 1079210

Summary: virt-sparsify --in-place cannot sparsify as much as it should
Product: [Community] Virtualization Tools Reporter: Richard W.M. Jones <rjones>
Component: libguestfsAssignee: Richard W.M. Jones <rjones>
Status: CLOSED UPSTREAM QA Contact:
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: unspecifiedCC: acathrow, mbooth, ptoscano
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-04-08 10:21:19 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
Comment none

Description Richard W.M. Jones 2014-03-21 08:43:57 UTC
Created attachment 915873 [details]
Comment

(This comment was longer than 65,535 characters and has been moved to an attachment by Red Hat Bugzilla).

Comment 1 Richard W.M. Jones 2014-03-21 10:44:27 UTC
Note to self: I cannot reproduce this on my own 32 bit Rawhide VM.

Comment 2 Richard W.M. Jones 2014-03-26 20:49:47 UTC
Also happens -- though less often -- on x86-64.  I asked on
linux-fsdevel:

http://marc.info/?l=linux-fsdevel&m=139586683225825&w=2

Comment 3 Richard W.M. Jones 2014-03-26 20:50:38 UTC
Example failure on x86-64:

Sparsify in-place operation completed with no errors.
test virt-sparsify: 336296 K -> 18856 K
test virt-sparsify --in-place: size_after (18856) too large

Comment 4 Richard W.M. Jones 2014-04-08 10:21:19 UTC
I suspect what is happening here is that the journal is
not getting trimmed.  As there are two filesystems, one of
which is 400 MB in size, at least 20 MB or so could potentially
be used by the journal.

I have changed the test so it measures the reduction in size
of the image instead of the final size:

https://github.com/libguestfs/libguestfs/commit/595bd5022a251a396050c247003ac60328a7facf