2011-10-20, 14:56(+00), Stephane CHAZELAS:
[...]
> On extent based FS (ext4, btrfs...), there might be a way to
> guarantee as few extents as possible, but I don't know it.

Actually, with both ext4 and btrfs, it is possible to defrag a
file in place. So you could un-sparse the file first:

 make sure it is not being used otherwise and:
cat < old.img 1<> old.img
or
pv < old.img 1<> old.img

to get a progress bar.

and defrag it:

e4defrag -v old.img
btrfs filesystem defragment -v old.img

(not tested).
-- 
Stephane

--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to