Project

General

Profile

Subtask #5878

Updated by Loïc Dachary over 10 years ago

"work in progress":https://github.com/dachary/ceph/tree/wip-5878 

 The "abstract API":https://github.com/dachary/ceph/blob/wip-4929/doc/dev/osd_internals/erasure-code.rst#erasure-code-library-abstract-api is provided by dynamically loaded plugins. 
 * core change  
 ** add *ceph osd pool create [name] [key=value] erasure-code-set <pool> <key> <value>* where *key* *<key>* and *value* *<value>* are arbitrary strings.  
 *** Update ceph Add osd pool create {set,get}-erasure-code around "MonCommands.h":https://github.com/ceph/ceph/blob/master/src/mon/MonCommands.h#L494 
 *** Implement "get":https://github.com/ceph/ceph/blob/df17d021a6b517588d04cda7430ac11b2a83ef9a/src/mon/OSDMonitor.cc#L2253 
 *** Implement "set":https://github.com/ceph/ceph/blob/df17d021a6b517588d04cda7430ac11b2a83ef9a/src/mon/OSDMonitor.cc#L3515 
 *** Add a map<string,string> erasure_code parameter list to "pg_pool_t":https://github.com/ceph/ceph/blob/df17d021a6b517588d04cda7430ac11b2a83ef9a/src/osd/osd_types.h 
 * configuration example ( 
 ** ceph osd pool create keys interpreted by the plugin ) set-erasure-code <pool> plugin-dir /var/lib/ceph/erasure-code-plugins (mandatory) 
 ** ceph osd pool create poolname erasure-code-dir=/var/lib/ceph/erasure-code-plugins set-erasure-code <pool> plugin jerasure (mandatory) 
 erasure-code-plugin=jerasure (mandatory) erasure-code-m=10 ** ceph osd pool set-erasure-code <pool> m 10 (optional) erasure-code-k=3 
 ** ceph osd pool set-erasure-code <pool> k 3 (optional) erasure-code-algorithm=Reed-Solomon 
 ** ceph osd pool set-erasure-code <pool> algorithm Reed-Solomon (optional) 
 ** ... there can be more, depending on the plugin / algorithm 
 * "src/osd/ErasureCodePluginInterface.h":https://github.com/dachary/ceph/blob/wip-4929/doc/dev/osd_internals/erasure-code.rst#erasure-code-library-abstract-api 
 * plugin loader and examples 
 ** "draft implementation":https://github.com/ceph/ceph/commit/5a2b1d66ae17b78addc14fee68c73985412f3c8c 
 * unit tests 
 ** in the test file ceph osd pool set-erasure-code <pool> plugin-dir src/test/osd/erasure-code-plugin 
 ** simple minded xor based erasure code plugin that only supports M=2,K=1 
 ** the plugin can be directed to trigger errors for tests purposes 
 ** implement the test plugin to be the basis of a documented example to follow when implementing a new plugin 

Back