Re: Convert one .img disk created with sparse=true to no sparse

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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 majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux