<div dir="ltr"><br><br><div class="gmail_quote"><div dir="ltr">On Wed, Jun 21, 2017 at 11:03 PM Deepak Jagtap <<a href="mailto:deepak.jagtap@maxta.com">deepak.jagtap@maxta.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div>
<div id="m_-4431762883936163723divtagdefaultwrapper" style="font-size:12pt;color:#000000;font-family:Calibri,Arial,Helvetica,sans-serif" dir="ltr">
<p>Hi Allon,</p>
<p><br>
</p>
<p>I am trying to leverage snapshot capability of underlying filesystem.</p>
<p><span style="font-size:12pt">As per my understanding current snapshot </span><span style="font-size:12pt"></span><span style="font-size:12pt">works like this:</span></p>
<p>Base Image(raw)--->snap1(qcow)->snap2(qcow), i.e after each snapshot vm starts writing on newly created qcow image.</p>
<p>So in this case vm is going to do all new writes on snap2(qcow) voulme and will redirect read IOs to snap1 & Base image as required.</p></div></div></blockquote><div><br></div><div>Right</div><div><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div id="m_-4431762883936163723divtagdefaultwrapper" style="font-size:12pt;color:#000000;font-family:Calibri,Arial,Helvetica,sans-serif" dir="ltr">
<p>But in my case snapshots created by the filesystem are read only and it's in raw format.</p>
<p>As a result after creating snapshot vm disk configuration won't change after taking snapshot but will continue doing writes on same base image.</p>
<p>So snapshots will look like this:</p>
<p><span style="font-family:Calibri,Arial,Helvetica,sans-serif,EmojiFont,"Apple Color Emoji","Segoe UI Emoji",NotoColorEmoji,"Segoe UI Symbol","Android Emoji",EmojiSymbols;font-size:16px">Base Image(raw)--->snap1(raw)->snap2(raw)</span></p></div></div></blockquote><div>Not sure what is snap1 and snap2 - how do you create and use them</div><div>with your file system? what is the underlying file system? </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div id="m_-4431762883936163723divtagdefaultwrapper" style="font-size:12pt;color:#000000;font-family:Calibri,Arial,Helvetica,sans-serif" dir="ltr">
<p><span style="font-family:Calibri,Arial,Helvetica,sans-serif,EmojiFont,"Apple Color Emoji","Segoe UI Emoji",NotoColorEmoji,"Segoe UI Symbol","Android Emoji",EmojiSymbols;font-size:16px">Base Image will always remain writable, while the snapshots
will remain read only raw format.</span></p></div></div></blockquote><div><br></div><div>This works like ceph volumes.</div><div><br></div><div>Our flow for ceph is:</div><div><br></div><div>1. engine invokes VM.freeze vdsm api to ensure that guest file systems are consistent</div><div>2. engine create new snapshot via cinder api</div><div>3. engine may invokes VM.snapshot vdsm api (without the ceph disk) if memory snapshot is needed.</div><div> memory snapshot is stored in a new disk created by engine before this flow </div><div>4. engine invokes VM.thaw to unfreeze guest file systems</div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div id="m_-4431762883936163723divtagdefaultwrapper" style="font-size:12pt;color:#000000;font-family:Calibri,Arial,Helvetica,sans-serif" dir="ltr">
<p>Just wanted to confirm is this configurable so that vm continues referring base image after the snapshot instead of newly created qcow image?</p></div></div></blockquote><div>No, it will use new image, this is not possible with snapshot. <br></div><div><br></div><div>Vdsm has the basic building blocks to do what you need, except creating</div><div>and deleting snapshots. To implement such feature you need to add a new</div><div>type of storage in engine that will call the right vdsm apis when creating</div><div>and deleting snapshots, and new vdsm apis to create and delete snapshots.</div><div><br></div><div>Nir</div></div></div>