Motr  M0
DLD of Pools in Configuration Schema

Overview

Pools are used to partition hardware resources (devices, servers). Pool versions are used to track changes in pool membership. User can combine multiple hardware resources to form a pool. Hardware resource can be member of multiple pools.


Definitions

Pool is a set of hardware resources.
Pool Version Change set for pool.
Failure Set Set of failed hardware resources.
Permutation set Random combination sequence of hardware resources with same type.


Design Highlights

Hardware resources racks, enclosures & controllers are arranged like tree structure. Leaves of this hardware resource tree are storage devices (disks).

Pool is a root node of this hardware resources tree. There may be multiple pools defined by user as per requirements.

In case of resources failure from particular pool, motr uses different variant of same pool called pool versions. There are multiple pool versions available with a pool. Every hardware resource maintains information about it's subscription with multiple pool versions.

Every file in motr is associated with a pool and pool version through file attributes assigned on creation of object. It uses user assigned default pool version OR in case of failure of some of devices in pool, it fetches pool version from configuration which does not contain failed resources.

A pool version is a tree of virtual objects corresponding to hardware resources, viz:- rackv, enclv, crtlv and sdevv. Every virtual object is associated with its corresponding physical object.


Requirements

r.conf.pool Implementation must define pool in configuration schema and it's supporting operations.
r.conf.pool.pool_version Implementation must define pool_version in configuration schema and it's supporting operations.
r.conf.pool.pool_version.layout Pool_version stores distribution permutation along with other layout attributes, e.g. N, K, P.
r.conf.pool.pool_version_get Implementation must provide an interface to efficiently find the next available pool version which does not intersect with failure set.


Dependencies

failure_domains.permutations : Every pool version needs to keep failure permutations for hardware devices like racks, enclosure, controller etc. Failure domain implementation exports this interface and pool version add uses this interface to get permutations for each type of hardware resource.


Functional Specifications

Data Structures

Data Structures Defined as Configuration objects

Interfaces


Logical Specifications

Get Pool_version

Provides interface to find latest pool version which does not intersect with the failure set on configuration changes.

Following algorithm illustrates a simplistic implementation of m0_conf_pool_version_get(),

 1) for each pool_version V in pool P
    - for each device D in failure set F
      - find configuration object O for D in confc
      - for each pool_version v in O.pool_versions
        - if v.fid == V.fid
          - Fetch next pool version and repeat from step 1
    - return V

Unit Tests

  • Test 01 : pool object add/read/delete
  • Test 02 : poolversion object add/read/delete
  • Test 03 : process object add/read/delete
  • Test 04 : rack object add/read/delete
  • Test 05 : enclosure object add/read/delete
  • Test 06 : controller object add/read/delete
  • Test 07 : sdev object add/read/delete
  • Test 08 : m0_conf_pool_version_get() with NULL failure_set
  • Test 09 : m0_conf_pool_version_get() with failure set not NULL single device failure
  • Test 10 : m0_conf_pool_version_get() with failure set not NULL multiple device failure

System Tests

  • Test 01 : m0t1fs mount, NULL failure set Create file.
  • Test 02 : m0t1fs mount, Some devices reported failed (failure set != NULL). Create file.

References

For documentation links, please refer to this file : doc/motr-design-doc-list.rst

  • Pools in Configuration Schema