Hi,<div><br></div><div>The best way to achieve this is to tune a little the mkimage script for the transfer manager of the system datastore (your case should be shared) to create the swap image in a local directory. The changes could be:</div>

<div><br></div><div>1.- Set up a scratch area in the nodes of your cloud for the local swap disks </div><div><br></div><div>2.- Go to $ONE_LOCATION/var/remotes/tm_mad/shared and change mkimage to:</div><div>   2.1.- update the CREATE_IMAGE command so of points to the scratch area</div>

<div>   2.2.- link the file created by CREATE_IMAGE to the original DST_PATH variable   </div><div><br></div><div>And that's it. You may also want to update delete command so it follows the links and deletes also the swap disks. Note that with this change any volatile disk will be created in the scratch area and will benefit from local I/O.</div>

<div><br></div><div>Cheers</div><div><br></div><div>Ruben</div><div><br><div class="gmail_quote">On Tue, Jun 12, 2012 at 8:25 AM, Alberto Zuin - Liste <span dir="ltr"><<a href="mailto:liste@albertozuin.eu" target="_blank">liste@albertozuin.eu</a>></span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hello,<br>
I have a configuration with two OpenNebula controllers in fault tolerance and two KVM nodes.<br>
The OpenNebula server is also a MooseFS controller and exports the main MooseFS shared volume in /var/lib/one directory to himself and to nodes.<br>
Now I want dynamically create swap disk, but i realized that mkswap create the disk in /var/lib/one/datastores/0/[<u></u>VMID]/, which is inside main shared volume: I want my swap disks in local node volume for speed purposes, not in shared disks.<br>


My best (complicated) idea is to create a new shared datastore and mount a local partition in every node on datastore directory (ex. /var/lib/one/datastores/100); then manually create "swap" partition in this datastore using real datablock empty disk: in this moment, the disk is only inside MooseFS volume. Then setup an rsync process that copy the datablock inside every node before instantiate the VM.<br>


I want to known if there is a easier best practice to do that.<br>
Thanks,<br>
Alberto<br>
<br>
-- <br>
----------------------------<br>
Alberto Zuin<br>
via Mare, 36/A<br>
36030 Lugo di Vicenza (VI)<br>
Italy<br>
P.I. 04310790284<br>
Tel. <a href="tel:%2B39.0499271575" value="+390499271575" target="_blank">+39.0499271575</a><br>
Fax. <a href="tel:%2B39.0492106654" value="+390492106654" target="_blank">+39.0492106654</a><br>
Cell. <a href="tel:%2B39.3286268626" value="+393286268626" target="_blank">+39.3286268626</a><br>
<a href="http://www.azns.it" target="_blank">www.azns.it</a> - <a href="mailto:alberto@azns.it" target="_blank">alberto@azns.it</a><br>
<br>
______________________________<u></u>_________________<br>
Users mailing list<br>
<a href="mailto:Users@lists.opennebula.org" target="_blank">Users@lists.opennebula.org</a><br>
<a href="http://lists.opennebula.org/listinfo.cgi/users-opennebula.org" target="_blank">http://lists.opennebula.org/<u></u>listinfo.cgi/users-opennebula.<u></u>org</a><br>
</blockquote></div><br><br clear="all"><div><br></div>-- <br>Ruben S. Montero, PhD<br>Project co-Lead and Chief Architect<br>OpenNebula - The Open Source Solution for Data Center Virtualization<br><a href="http://www.OpenNebula.org" target="_blank">www.OpenNebula.org</a> | <a href="mailto:rsmontero@opennebula.org" target="_blank">rsmontero@opennebula.org</a> | @OpenNebula<br>


</div>