Re: Making discard/fstrim reliable

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

 



On Thu, Apr 03, 2014 at 07:08:34PM +0200, Lukáš Czerner wrote:
> All that said, while discard is a interesting functionality and can
> be abused in many _many_ ways. It looks like what you really need is
> something that is currently available in fallocate(1) from
> util-linux package. The option to look for is --dig-holes:
> 
> -d, --dig-holes
>       Detect  and  dig holes. Makes the file sparse in-place, without using extra disk space.
>       The minimal size of the hole depends on filesystem I/O block size (usually 4096 bytes).
>       Also, when using this option, --keep-size is implied.
> 
>       You can think of this as doing a "cp --sparse" and renaming the dest file as the origi‐
>       nal, without the need for extra disk space.

This applies to single host files right?

virt-sparsify takes a disk image and sparsifies it, by examining the
internals of the disk image to find unused space (not *zero* space,
but space that's unused -- it could contain deleted files or other
garbage).

Rich.

-- 
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
virt-top is 'top' for virtual machines.  Tiny program with many
powerful monitoring features, net stats, disk stats, logging, etc.
http://people.redhat.com/~rjones/virt-top
--
To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [Samba]     [Device Mapper]     [CEPH Development]
  Powered by Linux