Skip to content

Creating an EC Datastore

Warning

The following Erasure Coding profiles are the only officially supported HyperCloud EC profiles:

* 4 + 2 (k = 4, m = 2) (66.67% Storage Efficiency)
* 8 + 4 (k = 8, m = 4) (66.67% Storage Efficiency)
* 8 + 3 (k = 3, m = 3) (72.73% Storage Efficiency)

For best resiliency, SoftIron recommends k + m + 1, which allows recovery in the case where a whole storage node goes offline. Setting m to a value of 2 will create a system with minimum robustness and increase the risk of inaccessibility.

Danger

The CRUSH failure domain of host is the only supported configuration.

Warning

Deviation from these configurations incurs risk of cluster failure.

This process is manually accomplished via the CLI. To create a storage backend pool, you will need to ssh into the dashboard VM and run the following commands:

root@hypercloud-dashboard:~# storage osd erasure-code-profile set ec83 k=8 m=3  crush-failure-domain=host

root@hypercloud-dashboard:~# storage osd pool create ec83 2048 2048 erasure ec83
pool 'ec83' created

root@hypercloud-dashboard:~# storage osd pool set ec83 allow_ec_overwrites true
set pool 12 allow_ec_overwrites to true

root@hypercloud-dashboard:~# image pool init --pool ec83

root@hypercloud-dashboard:~# storage osd pool create ecdata
pool 'ecdata' created

root@hypercloud-dashboard:~# storage osd pool set ecdata size 3
set pool 13 size to 3

root@hypercloud-dashboard:~# storage osd pool application enable ecdata image
enabled application 'image' on pool 'ecdata'

Warning

If image is not enabled on the ecdata pool, the following warning from storage -s will occur:

# storage -s
cluster:
    id:     bad29d1f-c916-4352-816e-499df8b276ae
    health: HEALTH_WARN
            1 pool(s) do not have an application enabled

After this initial setup, you will then create a template:

  1. Navigate to /dashboard/staging/tmp
  2. Create a file for the template (e.g. tmp.tmpl)

    NAME         = ecdata
    DS_MAD       = ceph
    TM_MAD       = ceph
    DISK_TYPE    = image
    BRIDGE_LIST  = hypercloud-dashboard
    POOL_NAME    = ecdata
    EC_POOL_NAME = ec83
    STAGING_DIR  = /dashboard/staging/tmp
    
  3. Create a second template file (e.g. tmp.tmpl2)

    BRIDGE_LIST         = "hypercloud-dashboard"
    DISK_TYPE           = "IMAGE"
    CLONE_TARGET        = "SELF"
    CLONE_TARGET_SHARED = "SELF"
    CLONE_TARGET_SSH    = "SYSTEM"
    DISK_TYPE_SHARED    = "IMAGE"
    DISK_TYPE_SSH       = "FILE"
    LN_TARGET           = "NONE"
    LN_TARGET_SHARED    = "NONE"
    LN_TARGET_SSH       = "SYSTEM"
    TM_MAD_SYSTEM       = "ssh,shared"
    
  4. Run the following commands to create the templates for the datastore:

    root@hypercloud-dashboard:~# hypercloud datastore create tmp.tmpl 
    root@hypercloud-dashboard:~# hypercloud datastore update ecdata tmp.tmpl2 --append
    
  5. The newly created datastore is now available for use.