[one-users] OpenNebula 3.4 and swap disk

Ruben S. Montero rsmontero at opennebula.org
Wed Jun 13 01:34:47 PDT 2012


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:

1.- Set up a scratch area in the nodes of your cloud for the local swap

2.- Go to $ONE_LOCATION/var/remotes/tm_mad/shared and change mkimage to:
   2.1.- update the CREATE_IMAGE command so of points to the scratch area
   2.2.- link the file created by CREATE_IMAGE to the original DST_PATH

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.



On Tue, Jun 12, 2012 at 8:25 AM, Alberto Zuin - Liste
<liste at albertozuin.eu>wrote:

> Hello,
> I have a configuration with two OpenNebula controllers in fault tolerance
> and two KVM nodes.
> 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.
> Now I want dynamically create swap disk, but i realized that mkswap create
> the disk in /var/lib/one/datastores/0/[**VMID]/, which is inside main
> shared volume: I want my swap disks in local node volume for speed
> purposes, not in shared disks.
> 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.
> I want to known if there is a easier best practice to do that.
> Thanks,
> Alberto
> --
> ----------------------------
> Alberto Zuin
> via Mare, 36/A
> 36030 Lugo di Vicenza (VI)
> Italy
> P.I. 04310790284
> Tel. +39.0499271575
> Fax. +39.0492106654
> Cell. +39.3286268626
> www.azns.it - alberto at azns.it
> ______________________________**_________________
> Users mailing list
> Users at lists.opennebula.org
> http://lists.opennebula.org/**listinfo.cgi/users-opennebula.**org<http://lists.opennebula.org/listinfo.cgi/users-opennebula.org>

Ruben S. Montero, PhD
Project co-Lead and Chief Architect
OpenNebula - The Open Source Solution for Data Center Virtualization
www.OpenNebula.org | rsmontero at opennebula.org | @OpenNebula
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opennebula.org/pipermail/users-opennebula.org/attachments/20120613/79099024/attachment-0003.htm>

More information about the Users mailing list