From: thornber@redhat.com
To: device-mapper development <dm-devel@redhat.com>
Subject: Re: dd between thin provisioned devices
Date: Mon, 28 Jan 2013 12:54:13 +0000 [thread overview]
Message-ID: <20130128125412.GB2442@raspberrypi> (raw)
In-Reply-To: <CABSD0hKsdtxyQCeZPzFhwpiKY7kmapkPxWJLFidK4VujHnTqTg@mail.gmail.com>
On Sun, Jan 27, 2013 at 06:01:25PM +0800, devicemapper niko wrote:
> Hi,everyone
>
> if we dd between thin provisioned devices,
> can we just get allocated blocks copied ?
> Will the output thin device get fully provisioned?
I think what you want to do is take a thin snapshot. This is a clone
of a thin device's mapping tree. Initially all blocks will be
identical, but sharing will be broken as you write to either the
original thin device or the snapshot.
> I glanced through the dm-thin code,
> it turns out unmapped blocks return zeroed,am i right?
A read to an unprovisioned block will always return zeroes. If you
write to an unprovisioned block any data that is not covered by the
write will be zeroed iff you have set the appropriate flag.
> Is there a trick to tell upper applications that all u got are zeroes.
> or should they scan zeroed blocks themselves to trigger WRITE_SAME to
> reduce I/O load?
Not sure what you're trying to do here. You can use the thin tools to
grab a snapshot of the _metadata_ on a live system. From this you can
work out what was shared at the time. Of course there'll always be a
potential race with this kind of approach. Why has your application
forgotten where it's written?
- Joe
prev parent reply other threads:[~2013-01-28 12:54 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-01-27 10:01 dd between thin provisioned devices devicemapper niko
2013-01-28 9:06 ` Zdenek Kabelac
2013-01-28 11:07 ` devicemapper niko
2013-01-28 12:54 ` thornber [this message]
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=20130128125412.GB2442@raspberrypi \
--to=thornber@redhat.com \
--cc=dm-devel@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.