From: "Richard W.M. Jones" <rjones@redhat.com>
To: "Lukáš Czerner" <lczerner@redhat.com>
Cc: linux-fsdevel@vger.kernel.org, pbonzini@redhat.com
Subject: Re: Making discard/fstrim reliable
Date: Thu, 3 Apr 2014 18:23:11 +0100 [thread overview]
Message-ID: <20140403172311.GQ1302@redhat.com> (raw)
In-Reply-To: <alpine.LFD.2.00.1404031853360.2124@localhost.localdomain>
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@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
next prev parent reply other threads:[~2014-04-03 17:23 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-03-26 20:47 Making discard/fstrim reliable Richard W.M. Jones
2014-04-02 18:18 ` Jeff Moyer
2014-04-02 18:59 ` Richard W.M. Jones
2014-04-02 20:02 ` Jeff Moyer
2014-04-02 20:26 ` Richard W.M. Jones
2014-04-10 15:05 ` Richard W.M. Jones
2014-04-03 17:08 ` Lukáš Czerner
2014-04-03 17:23 ` Richard W.M. Jones [this message]
2014-04-03 17:57 ` Paolo Bonzini
2014-04-03 18:08 ` Richard W.M. Jones
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20140403172311.GQ1302@redhat.com \
--to=rjones@redhat.com \
--cc=lczerner@redhat.com \
--cc=linux-fsdevel@vger.kernel.org \
--cc=pbonzini@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.