<div dir="ltr"><div>thanks for the reply. What i really wanna to ask is thin clone/mirror supported or not.</div><div> </div><div>I noticed the time later SCSI commad GET LBA STATUS can fullfil this requiremnt .</div><div>
 </div><div>Before block copy, send GET LBA STATUS to check the corresponding blocks mapped or not.</div><div>if not, just skip copy. </div><div class="gmail_extra"><br><br><div class="gmail_quote">On Mon, Jan 28, 2013 at 5:06 PM, Zdenek Kabelac <span dir="ltr"><<a href="mailto:zdenek.kabelac@gmail.com" target="_blank">zdenek.kabelac@gmail.com</a>></span> wrote:<br>
<blockquote style="margin:0px 0px 0px 0.8ex;padding-left:1ex;border-left-color:rgb(204,204,204);border-left-width:1px;border-left-style:solid" class="gmail_quote">Dne 27.1.2013 11:01, devicemapper niko napsal(a):<div class="im">
<br>
<blockquote style="margin:0px 0px 0px 0.8ex;padding-left:1ex;border-left-color:rgb(204,204,204);border-left-width:1px;border-left-style:solid" class="gmail_quote">
Hi,everyone<br>
if we dd between thin provisioned devices,<br>
can we just get allocated blocks copied ?<br>
</blockquote>
<br></div>
Nope - devices mapper target operates on block level - not on the filesystem<br>
level - so it has no knowledge about file layout.<br>
<br>
What I could eventually imagine is some kind of block compactification (just like kernel does for hugepages) - but it's currently not being developed....<div class="im"><br>
<br>
<br>
<blockquote style="margin:0px 0px 0px 0.8ex;padding-left:1ex;border-left-color:rgb(204,204,204);border-left-width:1px;border-left-style:solid" class="gmail_quote">
Will the output thin device get fully provisioned?<br>
I glanced through the dm-thin code,<br>
it turns out unmapped blocks return zeroed,am i right?<br>
</blockquote>
<br></div>
depends on settings - you could have either zeroed block or block<br>
with content left on the disk - i.e. running thin with 1MB block/chunk size<br>
means - before the first use whole 1MB must be zeroed - so it has its price.<div class="im"><br>
<br>
<blockquote style="margin:0px 0px 0px 0.8ex;padding-left:1ex;border-left-color:rgb(204,204,204);border-left-width:1px;border-left-style:solid" class="gmail_quote">
Is there a trick to tell upper applications that all u got are zeroes.<br>
or should they scan zeroed blocks themselves to trigger WRITE_SAME to reduce<br>
I/O load?<br>
</blockquote>
<br>
<br></div>
Documentation/device-mapper/<u></u>thin-provisioning.txt<br>
see flag: skip_block_zeroing<br>
<br>
Eventually for lvm2   lvcreate --zero y|n for thin pool creation.<span><font color="#888888"><br>
<br>
Zdenek<br>
<br>
</font></span></blockquote></div><br></div></div>