Code Monkey home page Code Monkey logo

mosaic's Introduction

Summary

Mosaic is a tool and library to configure hybrid storage to be used in VM/CT environments. A storage is supposed to be suitable for both -- keeping lots of small files for VM/CT meta-data as well as fast and scalable disks for VMs and CTs data.

Definitions

Mosaic: a place where metadata and data are. Mosaic consists of one (for now) place for metadata -- FS, and zero or more places for VM/CT data -- volumes.

Volume: this is where VM/CT files are. It can be thought of as a disk for VM or FS subtree for CT.

Overview

Both moctl (the tool) and libmosaic work on a pre-created storage that is described by a config file (in yaml). The config states the storage type (btrfs, loop, ploop, dmthin, etc.) and data location -- a string that is interpreted in type-specific manner. Other config options are, well, optional and also type-dependent.

When working with mosaic one should load config and then do whatever he wants. The moctl tool loads config on every start since all of the operations are "stateless" from the library point of view.

Config file example

type: btrfs
location: /foo/bar

Describes a btrfs mosaic located at /foo/bar. The metadata part is then in the /foo/bar, so are the volumes. Adding

layout:
    fs: subdir

will mean that the metadata is at /foo/bar/subdir. Volumes remain in the /foo/bar and thus do not intersect with metadata.

The detailed description of config file is in doc/config.txt

Tool usage

The moctl usage is

moctl <config_file> <action> <arguments>

The config file should exist, moctl loads one before doing actions. The actions are mount, umount, new, clone and drop.

The first two mount and umount metadata or volume, new and clone create new empty volume or clone one from the existing, drop removes the volume. Each action accepts its own set of arguments.

The detailed description of moctl is in doc/moctl.txt

Library API

The API is declared in include/uapi/mosaic.h. Typical workflow with it looks like

mosaic_t m;

m = mosaic_open(name, 0);
mosaic_make_vol(m, name, size_in_bytes, 0);
...
mosaic_close(m, 0);

The detailed description of the API is in doc/libmosaic.txt

mosaic's People

Contributors

xemul avatar kolyshkin avatar ligurio avatar

Stargazers

Mohamed Saher avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.