Configuring Manila for MapR

To configure the MapR manila driver:

  1. 1. Log in to the host where manila is installed.
  2. Open /etc/manila/manila.conf file and append the following to the manila.conf file:
    default_share_type = default_share_type
    Note: Create the directory specified for maprfs_base_volume_dir parameter under maprfs before starting the manila driver. The value for <maprclinode> must be one or more (comma-separated list of) IP addresses of the nodes from where the maprcli commands can be run. The value for driver-handles-share-servers must be False as the driver does not manage the lifecycle of share-servers.
  3. Ensure that the list of protocols for share creation includes MAPRFS by verifying the value for the property enabled_share_protocols.
    For example, your manila.conf file entry for this property should look something similar to the following:
    # Specify list of protocols to be allowed for share creation.
    # Available values are '('NFS', 'CIFS', 'GLUSTERFS', 'HDFS',
    # 'CEPHFS')' (list value)
    #enabled_share_protocols = NFS,CIFS
    enabled_share_protocols = NFS,CIFS,MAPRFS
  4. Set the enabled_share_backends property in the manila.conf file to marpfs.
    For example, your manila.conf file entry for this property should look something similar to the following:
    #enabled_share_backends = <None>
    enabled_share_backends = maprfs
  5. Save and close the file.
  6. Add MAPRFS to the /usr/lib/python2.7/site-packages/manila/common/ file SUPPORTED_SHARE_PROTOCOLS parameter.
    For example:
  7. Append the following to /usr/lib/python2.7/site-packages/manila/ file:
    class MapRFSException(ManilaException):
      message = _("MapRFS exception occurred!")
  8. Create a directory for the MapR manila driver in /usr/lib/python2.7/site-packages/manila/share/drivers directory.
    For example:
    mkdir /usr/lib/python2.7/site-packages/manila/share/drivers/maprfs
  9. Copy the MaprManilaDriver.tar.gz from to your local host and unzip it.
  10. Copy the MapR manila driver, and, from the location where MaprManilaDriver.tar.gz was unzipped to the directory for the MapR manila driver.
    For example:
    cp /usr/lib/python2.7/site-packages/manila/share/drivers/maprfs/
    cp /usr/lib/python2.7/site-packages/manila/share/drivers/maprfs/
  11. Run the following command:
    touch /usr/lib/python2.7/site-packages/manila/share/drivers/maprfs/
  12. Restart the openstack-manila-share service.
After modifying the /etc/manila/manila.conf file for the MapR driver, the openstack-manila-share service may fail with the following error in the log file if you do not have the latest oslo.config python libraries:
"2016-10-17 06:14:19.611 24338 ERROR manila   File "/usr/lib/python2.7/site-packages/manila/share/drivers/maprfs/", line 31, in <module>
2016-10-17 06:14:19.611 24338 ERROR manila     cfg.PortOpt('maprfs_ssh_port',
2016-10-17 06:14:19.611 24338 ERROR manila AttributeError: 'module' object has no attribute 'PortOpt'"
Install the latest osla.config python libraries using the following command:
pip install oslo.config --upgrade