Hi,
* On Sat, Feb 04, 2012 at 02:10:30PM -0600, Eric Sandeen <sandeen@xxxxxxxxxx>
wrote:
On 2/4/12 2:04 PM, Eric Sandeen wrote:
Now that ext4, xfs, & ocfs2 can support punch hole, a tool to
"re-sparsify" a file by punching out ranges of 0s might be in order.
Gah, of course I sent the version with the actual hole punch commented out ;)
Try this one.
[root@inode sparsify]# ./sparsify -v fsfile
blocksize is 4096
orig start/end 0/536870912/0
new start/end/min 0/536870912/4096
punching out holes of minimum size 4096 in range 0-536870912
punching at 16384 len 16384
punching at 49152 len 134168576
punching at 134234112 len 134201344
punching at 268455936 len 134197248
punching at 402669568 len 134201344
[root@inode sparsify]#
Hm but something is weird, right after the punch-out xfs says
it uses 84K:
[root@inode sparsify]# du -hc fsfile
84K fsfile
84K total
but then after an xfs_repair it looks saner:
# du -hc fsfile
4.8M fsfile
4.8M total
something to look into I guess... weird.
_______________________________________________
xfs mailing list
xfs@xxxxxxxxxxx
http://oss.sgi.com/mailman/listinfo/xfs
So I tried with both resparsify and with cp --sparse, the results
before xfs_repair looks different (5 extents vs 1) but after that
it looks similar (5 extents vs 4)
Regards,
--
Raghavendra Prabhu
GPG Id : 0xD72BE977
Fingerprint: B93F EBCB 8E05 7039 CD3C A4B8 A616 DCA1 D72B E977
www: wnohang.net
att
Description: Text document
pgpV9xWtTmR9O.pgp
Description: PGP signature
|