7 Erasure-coded pools require less storage space compared to replicated
8 pools. The erasure-coding support has higher computational requirements and
9 only supports a subset of the operations allowed on an object (for instance,
10 partial write is not supported).
18 An erasure-coded pool is created to store a large number of 1GB
19 objects (imaging, genomics, etc.) and 10% of them are read per
20 month. New objects are added every day and the objects are not
21 modified after being written. On average there is one write for 10,000
24 A replicated pool is created and set as a cache tier for the
25 erasure coded pool. An agent demotes objects (i.e. moves them from the
26 replicated pool to the erasure-coded pool) if they have not been
29 The erasure-coded pool crush ruleset targets hardware designed for
30 cold storage with high latency and slow access time. The replicated
31 pool crush ruleset targets faster hardware to provide better response
34 Cheap multidatacenter storage
35 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
37 Ten datacenters are connected with dedicated network links. Each
38 datacenter contains the same amount of storage with no power-supply
39 backup and no air-cooling system.
41 An erasure-coded pool is created with a crush map ruleset that will
42 ensure no data loss if at most three datacenters fail
43 simultaneously. The overhead is 50% with erasure code configured to
44 split data in six (k=6) and create three coding chunks (m=3). With
45 replication the overhead would be 400% (four replicas).
50 Set up an erasure-coded pool::
52 $ ceph osd pool create ecpool 12 12 erasure
54 Set up an erasure-coded pool and the associated crush ruleset::
56 $ ceph osd crush rule create-erasure ecruleset
57 $ ceph osd pool create ecpool 12 12 erasure \
60 Set the ruleset failure domain to osd (instead of the host which is the default)::
62 $ ceph osd erasure-code-profile set myprofile \
63 crush-failure-domain=osd
64 $ ceph osd erasure-code-profile get myprofile
68 technique=reed_sol_van
69 crush-failure-domain=osd
70 $ ceph osd pool create ecpool 12 12 erasure myprofile
72 Control the parameters of the erasure code plugin::
74 $ ceph osd erasure-code-profile set myprofile \
76 $ ceph osd erasure-code-profile get myprofile
80 technique=reed_sol_van
81 $ ceph osd pool create ecpool 12 12 erasure \
84 Choose an alternate erasure code plugin::
86 $ ceph osd erasure-code-profile set myprofile \
87 plugin=example technique=xor
88 $ ceph osd erasure-code-profile get myprofile
93 $ ceph osd pool create ecpool 12 12 erasure \
96 Display the default erasure code profile::
98 $ ceph osd erasure-code-profile ls
100 $ ceph osd erasure-code-profile get default
104 technique=reed_sol_van
106 Create a profile to set the data to be distributed on six OSDs (k+m=6) and sustain the loss of three OSDs (m=3) without losing data::
108 $ ceph osd erasure-code-profile set myprofile k=3 m=3
109 $ ceph osd erasure-code-profile get myprofile
113 technique=reed_sol_van
114 $ ceph osd erasure-code-profile ls
118 Remove a profile that is no longer in use (otherwise it will fail with EBUSY)::
120 $ ceph osd erasure-code-profile ls
123 $ ceph osd erasure-code-profile rm myprofile
124 $ ceph osd erasure-code-profile ls
127 Set the ruleset to take ssd (instead of default)::
129 $ ceph osd erasure-code-profile set myprofile \
131 $ ceph osd erasure-code-profile get myprofile
135 technique=reed_sol_van