一、编辑/etc/manila/manila-share.conf

[DEFAULT]
...
enabled_share_backends = generic,backendubuntu

[generic]
share_driver = manila.share.drivers.generic.GenericShareDriver
interface_driver = manila.network.linux.interface.OVSInterfaceDriver
driver_handles_share_servers = True
service_instance_flavor_id = 6
# service_instance_password = manila
service_instance_user = centos
service_p_w_picpath_name = centos
share_backend_name = GENERIC

path_to_private_key = /etc/manila/ssh/id_rsa
path_to_public_key = /etc/manila/ssh/id_rsa.pub

[backendubuntu]
share_driver = manila.share.drivers.generic.GenericShareDriver
interface_driver = manila.network.linux.interface.OVSInterfaceDriver
driver_handles_share_servers = True
service_instance_flavor_id = 6
service_instance_password = manila
service_instance_user = manila
service_p_w_picpath_name = manila
share_backend_name = backendubuntu

# path_to_private_key = /etc/manila/ssh/id_rsa
# path_to_public_key = /etc/manila/ssh/id_rsa.pub

二、配置多后端

manila type-key default_share_type set share_backend_name=GENERIC

manila type-create backendubuntu True
manila type-key backendubuntu set share_backend_name=backendubuntu

manila type-create backendcentos True
manila type-key backendcentos set share_backend_name=GENERIC

三、创建share 指定后端

manila create NFS 1 --name demo-share1 \
       --share-network demo-share-network1 \
       --share-type backendubuntu