Skip to content

RADOS Dictionary Plugin

Peter Mauritius edited this page Dec 4, 2017 · 13 revisions

The Dovecot dictionaries are a good candidate to be implemented using the Ceph omap key/value store. They are a building block to enable a Dovecot, which runs exclusively on Ceph.

Dovecot uses two namespaces for dictionary keys.

  • shared/<key>: These are shared entries. These keys will be stored in a RADOS object named <oid>/shared. <key> will be used as omap key as given.

  • priv/<key>: These are private entries for a user. These keys will be stored in a RADOS object named <oid>/<username>. <key> will be used as omap key as given.

Configuration

To load the plugin, add dict_rados to the list of mail plugins. The name of the dict driver is rados. Add the plugin for example to 10-mail.conf as mail\_attribute\_dict. See Dovecot Dictionaries for details.

mail_attribute_dict = rados:oid=metadata:pool=mail_dictionary
mail_plugins = $mail_plugins dict_rados

The configuration parameters are:

  • oid: The RADOS object id to use.

  • pool: The RADOS pool to use for the dictionary objects. The pool name ist optional and defaults to mail_dictionary. If the pool is missing, it will be created.

All key/values are be stored in OMAP key/values of the object <oid>.

See also [Common Configuration](#common-configuration) for more information.

Testing

The source directory src/dict-rados contains a test application named test-*. They use the configuration in the same directory.

The configuration assumes a Ceph cluster running locally without cephx, that has for example been created using vstart.sh as decribed in Developer Guide (quick) or ceph/README.md.

../src/vstart.sh -X -n -l

Any other way to get a Ceph cluster is valid, too.