13.9. Create a Share Type for the Defined Back End

The File Share Service allows you to define share types that you can use to create shares with specific settings. Share types work exactly like Block Storage volume types: each type has associated settings (namely, extra specifications), and invoking the type during share creation applies those settings.
When creating a share on a non-default back end, you need to explicitly specify which back end to use. To make the process seamless for users, create a share type and associate it with the share_backend_name value of your back end (whichever you chose in Section 13.6, “Define the File Share Service Back End”).
To create a share type named TYPENAME, run the following as an OpenStack admin:
# manila type-create TYPENAME SHAREHANDLING
SHAREHANDLING specifies whether or not the share type will use a driver to handle shares. This should be the value set in driver_handles_share_servers of your back end definition. Note that all the back end configurations from Section 13.6, “Define the File Share Service Back End” specifies driver_handles_share_servers=False; as such, SHAREHANDLING should also be false. So, to create a share type called glusterfs_native:
# manila type-create glusterfs_native false
Next, associate the glusterfs_native type to a specific back end. You can specify the back end through its share_backend_name value. For example, to associate the share type glusterfs_native to the back end defined in Section 13.6.1, “Define a Back End for the gluster_native Driver”, run:
# manila type-key glusterfs_native set share_backend_name='GLUSTERNATIVE'
Users should now be able to invoke the glusterfs_native type to create a share from the GLUSTERNATIVE back end.