Example: Creating a 10+2+2 EC volume using maprcli
This example shows the steps to use maprcli
to create a 10+2+2
erasure coded (EC) volume in an HPE Ezmeral Data Fabric cluster.
Prerequisites
The erasure coding scheme in this example requires at least 14 worker nodes in the
Data Fabric cluster. The erasure coding
scheme, 10+2+2
requires 10 data nodes, two global parity nodes, and
two local parity nodes.
About this task
This example shows the steps to use maprcli
to create a volume in a
Data Fabric cluster that uses 10+2+2 erasure
coding (EC), which is an erasure coding scheme with local parity. This example
includes creating custom tiering rules and offload schedules.
Procedure
-
Create a schedule.
Schedules specify recurring points in time at which certain actions are to occur. In the following example, an erasure coding schedule specifies how often data is automatically offloaded to a different storage tier. Data is offloaded according to the tier rules.
For more information about schedules, see Creating a Schedule in the HPE Ezmeral Data Fabric documentation.
In the following example,- The name of the EC schedule is:
my_ec_schedule
- The offloading frequency is:
hourly
- The
id
is a unique number that is not one of the default schedules (1
through4
).
maprcli schedule create -schedule '{ "id":5, "name":"my_ec_schedule", "inuse":0, "rules":[ { "frequency":"hourly", "retain":"10y" } ] }'
- The name of the EC schedule is:
-
Create an erasure coded tier with default values.
In the following example, the type parameter value,
ectier
specifies that an erasure coded tier is created.maprcli tier create -name mywarm_tier -type ectier
-
Create a tier rule.
Tier rules define the criteria for offloading data.
In the following example, the rule
my_rule
specifies data that is owned by themapr
user and was last modified 10 minutes (600 seconds) ago.maprcli tier rule create -name my_rule -expr "(u:mapr & m:600s)"
-
Create an erasure coded volume.
The
ecscheme
parameter specifies the erasure coding scheme. In the following example, the erasure coding scheme is10+2+2
, which specifies an erasure coding scheme with 10 data nodes, two local parity nodes, and two global parity nodes.For more information about erasure coding schemes, see Erasure Coding Scheme for Data Protection and Recovery in the HPE Ezmeral Data Fabric documentation.
In the following example, the volume is enabled for data tiering by setting the
tieringenable
parameter totrue
. Thetieringenable
parameter must be used instead of theecenable
parameter because a tier name is also specified.maprcli volume create -name my_volume -path "/my_vol" -tieringenable true -tiername mywarm_tier -ecscheme "10+2+2" -ectopology "/data" -tieringrule my_rule -offloadschedule 5
-
(Optional) Force an offload to occur.
maprcli volume offload -name my_volume